This commit is contained in:
2026-03-27 06:51:43 +01:00
parent af4ae99dc0
commit 0979021f41
3 changed files with 16 additions and 8 deletions

View File

@@ -3901,7 +3901,7 @@
</table:table-cell>
<table:table-cell table:style-name="Tableau5.A1" office:value-type="string">
<text:p text:style-name="P25">QUANTITY: <text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_lbs, invoice.party.lang) if invoice.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;format_number(invoice.report_net, invoice.party.lang) if invoice.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder> MTS)</text:p>
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;invoice.report_product_description&gt;</text:placeholder><text:s/>CROP <text:placeholder text:placeholder-type="text">&lt;invoice.report_crop_name&gt;</text:placeholder></text:p>
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;invoice.report_description_upper or invoice.report_product_description&gt;</text:placeholder><text:s/>CROP <text:placeholder text:placeholder-type="text">&lt;invoice.report_crop_name&gt;</text:placeholder></text:p>
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;invoice.report_attributes_name&gt;</text:placeholder></text:p>
<text:p text:style-name="P31"/>
<text:p text:style-name="P31"><text:placeholder text:placeholder-type="text">&lt;invoice.report_incoterm&gt;</text:placeholder></text:p>
@@ -4068,4 +4068,4 @@
<text:p text:style-name="P37"/>
</office:text>
</office:body>
</office:document>
</office:document>

View File

@@ -3910,10 +3910,8 @@
<table:table-cell table:style-name="Tableau5.A1" office:value-type="string">
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in invoice.lines&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P27"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;line.type == &apos;line&apos;&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;line.description&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;description in line.description.split(&apos;\n&apos;)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;description&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;if test=&quot;line.report_description_upper&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;line.report_description_upper&gt;</text:placeholder></text:p>
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text">&lt;/if&gt;</text:placeholder></text:p>
<text:p text:style-name="P26">QUANTITY <text:placeholder text:placeholder-type="text">&lt;format_number(line.report_lbs, invoice.party.lang) if line.report_lbs != &apos;&apos; else &apos;&apos;&gt;</text:placeholder><text:s/>LBS (<text:placeholder text:placeholder-type="text">&lt;format_number(line.report_net, invoice.party.lang) if line.report_net != &apos;&apos; else &apos;&apos;&gt;</text:placeholder> MTS)</text:p>
<text:p text:style-name="P20"><text:placeholder text:placeholder-type="text">&lt;line.report_product_description or line.product_name or &apos;&apos;&gt;</text:placeholder><text:s/>CROP <text:placeholder text:placeholder-type="text">&lt;line.report_crop_name&gt;</text:placeholder></text:p>
@@ -4084,4 +4082,4 @@
<text:p text:style-name="P39"/>
</office:text>
</office:body>
</office:document>
</office:document>

View File

@@ -101,6 +101,12 @@ class Invoice(metaclass=PoolMeta):
return line.product.description or ''
return ''
@property
def report_description_upper(self):
if self.lines:
return (self.lines[0].description or '').upper()
return ''
@property
def report_crop_name(self):
trade = self._get_report_trade()
@@ -288,6 +294,10 @@ class InvoiceLine(metaclass=PoolMeta):
return origin.product.description or ''
return ''
@property
def report_description_upper(self):
return (self.description or '').upper()
@property
def report_crop_name(self):
trade = self._get_report_trade()
@@ -313,4 +323,4 @@ class InvoiceLine(metaclass=PoolMeta):
net = self.report_net
if net == '':
return ''
return Decimal(net) * Decimal('2.20462')
return round(Decimal(net) * Decimal('2204.62'),2)