Template Melya
This commit is contained in:
@@ -1546,7 +1546,6 @@
|
||||
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P4"/>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6">Buyer:</text:span></text:span></text:p>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><invoice.party.rec_name if invoice.party else ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><'TAX ID: ' + invoice.party_tax_identifier.code if invoice.party_tax_identifier else ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><for each="line in invoice.report_address.splitlines()"></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"/></text:span></text:p>
|
||||
@@ -1705,7 +1704,7 @@
|
||||
<text:p text:style-name="P19"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6">Net weight: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12"><text:placeholder text:placeholder-type="text"><format_number_symbol(invoice.report_net, invoice.party.lang, invoice.lines[0].unit, digits=2) if invoice.lines else ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:s/></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P19"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6">Gross weight: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T12"><text:placeholder text:placeholder-type="text"><format_number_symbol(invoice.report_gross, invoice.party.lang, invoice.lines[0].unit, digits=2) if invoice.lines else ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:s/></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P4"/>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6">Packaging: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><invoice.report_nb_bale or ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P8"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6">Packaging: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text"><invoice.report_packaging or ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="Normal"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/></text:p>
|
||||
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
|
||||
@@ -1426,7 +1426,6 @@
|
||||
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
|
||||
<text:p text:style-name="P4"/>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T5">Buyer:</text:span></text:span></text:p>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6"><text:placeholder text:placeholder-type="text"><invoice.party.rec_name if invoice.party else ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6"><text:placeholder text:placeholder-type="text"><invoice.report_address or ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T6"><text:placeholder text:placeholder-type="text"><'TAX ID: ' + invoice.party_tax_identifier.code if invoice.party_tax_identifier else ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P4"/>
|
||||
@@ -1491,7 +1490,7 @@
|
||||
<text:p text:style-name="P11"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T5">Net weight: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T8"><text:placeholder text:placeholder-type="text"><format_number_symbol(invoice.report_net, invoice.party.lang, invoice.lines[0].unit, digits=2) if invoice.lines else ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"> </text:span></text:span></text:p>
|
||||
<text:p text:style-name="P11"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T5">Gross weight: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T8"><text:placeholder text:placeholder-type="text"><format_number_symbol(invoice.report_gross, invoice.party.lang, invoice.lines[0].unit, digits=2) if invoice.lines else ''></text:placeholder></text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"> </text:span></text:span></text:p>
|
||||
<text:p text:style-name="P4"/>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T5">Packaging: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><invoice.report_nb_bale or ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="P7"><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T5">Packaging: </text:span></text:span><text:span text:style-name="Police_20_par_20_défaut"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><invoice.report_packaging or ''></text:placeholder></text:span></text:span></text:p>
|
||||
<text:p text:style-name="Normal"><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/><text:tab/></text:p>
|
||||
<text:p text:style-name="Standard"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
</office:text>
|
||||
|
||||
@@ -1080,6 +1080,14 @@ class Invoice(metaclass=PoolMeta):
|
||||
return 'Unchanged'
|
||||
return nb_bale
|
||||
|
||||
@property
|
||||
def report_packaging(self):
|
||||
nb_bale = self.report_nb_bale
|
||||
if nb_bale.startswith('NB ') and ': ' in nb_bale:
|
||||
label, quantity = nb_bale[3:].split(': ', 1)
|
||||
return f"{quantity} {label}"
|
||||
return nb_bale
|
||||
|
||||
@property
|
||||
def report_net_display(self):
|
||||
net = self.report_net
|
||||
|
||||
@@ -4307,6 +4307,18 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
|
||||
self.assertEqual(invoice.report_cndn_nb_bale, 'Unchanged')
|
||||
|
||||
def test_invoice_report_packaging_displays_quantity_before_unit(self):
|
||||
'invoice packaging label displays quantity before package unit'
|
||||
Invoice = Pool().get('account.invoice')
|
||||
|
||||
lot = Mock(lot_qt=Decimal('990'), lot_unit=Mock(symbol='BAGS25'))
|
||||
line = Mock(type='line', quantity=Decimal('1000'), lot=lot)
|
||||
invoice = Invoice()
|
||||
invoice.lines = [line]
|
||||
|
||||
self.assertEqual(invoice.report_nb_bale, 'NB BAGS25: 990')
|
||||
self.assertEqual(invoice.report_packaging, '990 BAGS25')
|
||||
|
||||
def test_invoice_report_positive_rate_lines_keep_positive_components(self):
|
||||
'invoice final note pricing section keeps only positive component lines'
|
||||
Invoice = Pool().get('account.invoice')
|
||||
|
||||
@@ -519,10 +519,9 @@
|
||||
<table:table-cell table:style-name="Tableau1.A1" table:number-columns-spanned="5" office:value-type="string">
|
||||
<text:p text:style-name="P4" loext:marker-style-name="T7"/>
|
||||
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><sale.party.rec_name></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><sale.full_number></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><sale.party.addresses[0].city if sale.party and sale.party.addresses else ''></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><sale.reference if sale.reference else ''></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><for each="line in sale.report_address.splitlines()"></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"><line></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P1" loext:marker-style-name="T1"><text:span text:style-name="T1"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:span><text:span text:style-name="T1"/></text:p>
|
||||
<text:p text:style-name="P2" loext:marker-style-name="T1"/>
|
||||
</table:table-cell>
|
||||
<table:covered-table-cell/>
|
||||
|
||||
@@ -1720,7 +1720,7 @@
|
||||
</office:binary-data>
|
||||
</draw:image>
|
||||
</draw:frame><text:tab/><text:tab/><text:span text:style-name="T1">PROFORMA INVOICE</text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T10">Proforma Nr:<text:tab/><text:tab/><text:tab/>Date:</text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T10">Order reference:<text:tab/><text:tab/><text:tab/>Date:</text:span></text:p>
|
||||
<text:p text:style-name="Standard"><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text"><sale.report_melya_proforma_number></text:placeholder></text:span><text:tab/><text:tab/><text:tab/><text:span text:style-name="T35"><text:placeholder text:placeholder-type="text"><format_date(sale.sale_date, sale.party.lang) if sale.sale_date else ''></text:placeholder></text:span></text:p>
|
||||
<text:p text:style-name="Standard"/>
|
||||
<text:p text:style-name="Standard"/>
|
||||
|
||||
Reference in New Issue
Block a user