27.03.26
This commit is contained in:
@@ -4011,7 +4011,7 @@
|
||||
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
|
||||
<text:p text:style-name="P14">At <text:placeholder text:placeholder-type="text"><invoice.report_rate_currency_upper></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><invoice.report_rate_value></text:placeholder><text:s/>PER <text:placeholder text:placeholder-type="text"><invoice.report_rate_unit_upper></text:placeholder><text:s/>(<text:placeholder text:placeholder-type="text"><invoice.report_rate_price_words></text:placeholder>) <text:placeholder text:placeholder-type="text"><invoice.report_rate_pricing_text></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"/>
|
||||
<text:p text:style-name="P14">FREIGHT VALUE: <text:placeholder text:placeholder-type="text"><invoice.currency.symbol if invoice.currency else 'USD'></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><format_number(invoice.freight_amount, invoice.party.lang) if hasattr(invoice, 'freight_amount') else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14">FREIGHT VALUE: <text:placeholder text:placeholder-type="text"><invoice.report_freight_currency_symbol></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><format_number(invoice.report_freight_amount, invoice.party.lang) if invoice.report_freight_amount != '' else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"/>
|
||||
<text:p text:style-name="P17">WE CERTIFY THAT THE MERCHANDISE IS OF <text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><invoice.report_origin or ''></text:placeholder></text:span><text:s/>ORIGIN</text:p>
|
||||
<text:p text:style-name="P31"><text:soft-page-break/>L/C NUMBER </text:p>
|
||||
@@ -4100,4 +4100,4 @@
|
||||
<text:p text:style-name="P38"/>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
</office:document>
|
||||
|
||||
@@ -5,30 +5,30 @@
|
||||
<dc:title>Final Invoice</dc:title>
|
||||
<meta:initial-creator>willen</meta:initial-creator>
|
||||
<meta:creation-date>2018-12-09T16:20:00</meta:creation-date>
|
||||
<dc:date>2026-03-27T07:47:28.825000000</dc:date>
|
||||
<dc:date>2026-03-27T08:01:16.333000000</dc:date>
|
||||
<meta:print-date>2007-08-28T18:19:00</meta:print-date>
|
||||
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
|
||||
<meta:editing-duration>PT3H13M1S</meta:editing-duration>
|
||||
<meta:editing-cycles>12</meta:editing-cycles>
|
||||
<meta:editing-duration>PT3H13M14S</meta:editing-duration>
|
||||
<meta:editing-cycles>13</meta:editing-cycles>
|
||||
|
||||
<meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="68" meta:word-count="226" meta:character-count="3098" meta:non-whitespace-character-count="2521"/></office:meta>
|
||||
<office:settings>
|
||||
<config:config-item-set config:name="ooo:view-settings">
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">8114</config:config-item>
|
||||
<config:config-item config:name="ViewAreaTop" config:type="long">9437</config:config-item>
|
||||
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="ViewAreaWidth" config:type="long">27264</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">13187</config:config-item>
|
||||
<config:config-item config:name="ViewAreaHeight" config:type="long">13242</config:config-item>
|
||||
<config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
|
||||
<config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
|
||||
<config:config-item-map-indexed config:name="Views">
|
||||
<config:config-item-map-entry>
|
||||
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">10739</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">13841</config:config-item>
|
||||
<config:config-item config:name="ViewLeft" config:type="long">10084</config:config-item>
|
||||
<config:config-item config:name="ViewTop" config:type="long">16424</config:config-item>
|
||||
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">8114</config:config-item>
|
||||
<config:config-item config:name="VisibleTop" config:type="long">9437</config:config-item>
|
||||
<config:config-item config:name="VisibleRight" config:type="long">27263</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">21299</config:config-item>
|
||||
<config:config-item config:name="VisibleBottom" config:type="long">22677</config:config-item>
|
||||
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
|
||||
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
|
||||
@@ -101,7 +101,7 @@
|
||||
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">663327</config:config-item>
|
||||
<config:config-item config:name="Rsid" config:type="int">665618</config:config-item>
|
||||
<config:config-item config:name="RsidRoot" config:type="int">84510</config:config-item>
|
||||
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
|
||||
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
|
||||
@@ -172,7 +172,7 @@
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#808080" draw:fill-color="#cfe7f5" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="true"/>
|
||||
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:font-independent-line-spacing="false">
|
||||
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
|
||||
@@ -747,7 +747,7 @@
|
||||
</style:style>
|
||||
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
|
||||
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" officeooo:paragraph-rsid="0008cfeb" style:font-size-asian="10pt" style:font-name-complex="Arial1" style:font-size-complex="10pt"/>
|
||||
<style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" style:font-size-asian="10pt" style:font-name-complex="Times New Roman" style:font-size-complex="10pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="footer">
|
||||
<style:paragraph-properties style:writing-mode="lr-tb"/>
|
||||
@@ -3930,7 +3930,6 @@
|
||||
<text:p text:style-name="P18"/>
|
||||
<text:p text:style-name="P21"><text:placeholder text:placeholder-type="text"></for></text:placeholder></text:p>
|
||||
<text:p text:style-name="P21"/>
|
||||
<text:p text:style-name="P21"/>
|
||||
<text:p text:style-name="P34"><text:placeholder text:placeholder-type="text"><invoice.report_incoterm></text:placeholder></text:p>
|
||||
<text:p text:style-name="P31"><text:span text:style-name="T1">ALL DETAILS AND SPECIFICATIONS AS PER</text:span> <text:span text:style-name="T3">BENEFICIARY </text:span></text:p>
|
||||
<text:p text:style-name="P27">PROFORMA INVOICE NO. <text:placeholder text:placeholder-type="text"><invoice.report_proforma_invoice_number></text:placeholder><text:s/>DATED <text:placeholder text:placeholder-type="text"><format_date(invoice.report_proforma_invoice_date, invoice.party.lang) if invoice.report_proforma_invoice_date else ''></text:placeholder>.</text:p>
|
||||
@@ -4005,16 +4004,16 @@
|
||||
<table:table-row table:style-name="Tableau8.1">
|
||||
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
|
||||
<text:p text:style-name="P14">At <text:placeholder text:placeholder-type="text"><invoice.report_rate_currency_upper></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><invoice.report_rate_value></text:placeholder><text:s/>PER <text:placeholder text:placeholder-type="text"><invoice.report_rate_unit_upper></text:placeholder><text:s/>(<text:placeholder text:placeholder-type="text"><invoice.report_rate_price_words></text:placeholder>) <text:placeholder text:placeholder-type="text"><invoice.report_rate_pricing_text></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"><text:soft-page-break/></text:p>
|
||||
<text:p text:style-name="P14">FREIGHT VALUE: <text:placeholder text:placeholder-type="text"><invoice.currency.symbol if invoice.currency else 'USD'></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><format_number(invoice.freight_amount, invoice.party.lang) if hasattr(invoice, 'freight_amount') else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"/>
|
||||
<text:p text:style-name="P14"><text:soft-page-break/>FREIGHT VALUE: <text:placeholder text:placeholder-type="text"><invoice.report_freight_currency_symbol></text:placeholder><text:s/><text:placeholder text:placeholder-type="text"><format_number(invoice.report_freight_amount, invoice.party.lang) if invoice.report_freight_amount != '' else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P14"/>
|
||||
<text:p text:style-name="P17">WE CERTIFY THAT THE MERCHANDISE IS OF <text:span text:style-name="T7"><text:placeholder text:placeholder-type="text"><invoice.report_origin or ''></text:placeholder></text:span><text:s/>ORIGIN</text:p>
|
||||
<text:p text:style-name="P33">L/C NUMBER </text:p>
|
||||
<text:p text:style-name="P33"/>
|
||||
</table:table-cell>
|
||||
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
|
||||
<text:p text:style-name="P36"><text:s text:c="3"/><text:placeholder text:placeholder-type="text"><format_currency(invoice.total_amount, invoice.party.lang, invoice.currency)></text:placeholder><text:soft-page-break/><text:s/></text:p>
|
||||
<text:p text:style-name="P24"/>
|
||||
<text:p text:style-name="P36"><text:s text:c="3"/><text:placeholder text:placeholder-type="text"><format_currency(invoice.total_amount, invoice.party.lang, invoice.currency)></text:placeholder><text:s/></text:p>
|
||||
<text:p text:style-name="P24"><text:soft-page-break/></text:p>
|
||||
<text:p text:style-name="P35"/>
|
||||
</table:table-cell>
|
||||
</table:table-row>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
@@ -46,6 +46,18 @@ class Invoice(metaclass=PoolMeta):
|
||||
return lot
|
||||
return line.lots[0]
|
||||
|
||||
def _get_report_freight_fee(self):
|
||||
pool = Pool()
|
||||
Fee = pool.get('fee.fee')
|
||||
shipment = self._get_report_shipment()
|
||||
if not shipment:
|
||||
return None
|
||||
fees = Fee.search([
|
||||
('shipment_in', '=', shipment.id),
|
||||
('product.name', '=', 'Maritime freight'),
|
||||
], limit=1)
|
||||
return fees[0] if fees else None
|
||||
|
||||
def _get_report_shipment(self):
|
||||
lot = self._get_report_lot()
|
||||
if not lot:
|
||||
@@ -316,6 +328,22 @@ class Invoice(metaclass=PoolMeta):
|
||||
return shipment.number or ''
|
||||
return ''
|
||||
|
||||
@property
|
||||
def report_freight_amount(self):
|
||||
fee = self._get_report_freight_fee()
|
||||
if fee:
|
||||
return fee.get_amount()
|
||||
return ''
|
||||
|
||||
@property
|
||||
def report_freight_currency_symbol(self):
|
||||
fee = self._get_report_freight_fee()
|
||||
if fee and fee.currency:
|
||||
return fee.currency.symbol or ''
|
||||
if self.currency:
|
||||
return self.currency.symbol or ''
|
||||
return 'USD'
|
||||
|
||||
|
||||
class InvoiceLine(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice.line'
|
||||
|
||||
Reference in New Issue
Block a user