ICT template

This commit is contained in:
2026-06-16 14:58:13 +02:00
parent 36ee92cbb2
commit 38af948374
9 changed files with 206 additions and 95 deletions

View File

@@ -339,6 +339,32 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_invoice_ict_commission_final"/>
</record>
<record model="ir.action.report" id="report_sale_commission_ict">
<field name="name">Commission invoice Sale</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">account_invoice/sale_commission_ict.fodt</field>
<field name="single" eval="True"/>
</record>
<record model="ir.action.keyword" id="report_sale_commission_ict_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_sale_commission_ict"/>
</record>
<record model="ir.action.report" id="report_purchase_commission_ict">
<field name="name">Commission invoice Purchase</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">account_invoice/purchase_commission_ict.fodt</field>
<field name="single" eval="True"/>
</record>
<record model="ir.action.keyword" id="report_purchase_commission_ict_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_purchase_commission_ict"/>
</record>
<record model="ir.sequence.type" id="sequence_type_account_invoice">
<field name="name">Invoice</field>
</record>

View File

@@ -17128,9 +17128,9 @@
</office:master-styles>
<office:body>
<office:text>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;purchase in records&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;set_lang(purchase.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;purchase.set_lang(purchase.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;invoice in records&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;set_lang(invoice.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;invoice.set_lang(invoice.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:sequence-decls>
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
@@ -17143,7 +17143,7 @@
<table:table-column table:style-name="Tableau1.A"/>
<table:table-row table:style-name="Tableau1.1">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P12" loext:marker-style-name="T9"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in purchase.report_address.splitlines()&quot;&gt;</text:placeholder><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:span><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P12" loext:marker-style-name="T9"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in invoice.report_commission_address.splitlines()&quot;&gt;</text:placeholder><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:span><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder><text:span text:style-name="T9"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
@@ -17155,11 +17155,11 @@
<table:table-row table:style-name="Tableau2.1">
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P13" loext:marker-style-name="T14"><text:span text:style-name="T14">COMMISSION INVOICE</text:span><text:span text:style-name="T14"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T16"><text:span text:style-name="T14">INVOICE N. <text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_invoice_number&gt;</text:placeholder></text:span><text:span text:style-name="T16"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T13"><text:span text:style-name="T14">CONTRACT N. <text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_contract_number&gt;</text:placeholder></text:span><text:span text:style-name="T14"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T16"><text:span text:style-name="T14">INVOICE N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_invoice_number&gt;</text:placeholder></text:span><text:span text:style-name="T16"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T13"><text:span text:style-name="T14">CONTRACT N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_contract_number&gt;</text:placeholder></text:span><text:span text:style-name="T14"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P13" loext:marker-style-name="T13"><text:span text:style-name="T11"><text:placeholder text:placeholder-type="text">&lt;format_date(purchase.purchase_date or today, purchase.party.lang)&gt;</text:placeholder></text:span><text:span text:style-name="T11"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T13"><text:span text:style-name="T11"><text:placeholder text:placeholder-type="text">&lt;format_date(invoice.report_commission_date or today, invoice.party.lang)&gt;</text:placeholder></text:span><text:span text:style-name="T11"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
@@ -17170,8 +17170,8 @@
<table:table-column table:style-name="Tableau4.C"/>
<table:table-row table:style-name="Tableau4.1">
<table:table-cell table:style-name="Tableau4.A1" table:number-columns-spanned="3" office:value-type="string">
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9">Bill of Lading N. <text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_bl_number&gt;</text:placeholder> dated <text:placeholder text:placeholder-type="text">&lt;format_date(purchase.report_commission_bl_date, purchase.party.lang) if purchase.report_commission_bl_date else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T2"><text:span text:style-name="T9">M/V <text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_vessel&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9">Bill of Lading N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_bl_number&gt;</text:placeholder> dated <text:placeholder text:placeholder-type="text">&lt;format_date(invoice.report_commission_bl_date, invoice.party.lang) if invoice.report_commission_bl_date else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T2"><text:span text:style-name="T9">M/V <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_vessel&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
@@ -17179,16 +17179,16 @@
<table:table-row table:style-name="Tableau4.1">
<table:table-cell table:style-name="Tableau4.A1" office:value-type="string">
<text:h text:style-name="P10" text:outline-level="1" loext:marker-style-name="T17"><text:span text:style-name="T17">COMMISSION</text:span><text:span text:style-name="T17"/></text:h>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_invoice_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_invoice_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<table:table table:name="Tableau3" table:style-name="Tableau3">
<table:table-column table:style-name="Tableau3.A"/>
<table:table-column table:style-name="Tableau3.B"/>
<table:table-row table:style-name="Tableau3.1">
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_quantity_unit_upper&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_quantity_unit_upper&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_quantity_display&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_quantity_display&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau3.1">
@@ -17196,12 +17196,12 @@
<text:p text:style-name="P14" loext:marker-style-name="T2"><text:span text:style-name="T9">Lbs</text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_lbs_display&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_lbs_display&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9">Your commission: <text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_secondary_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9">Your commission: <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_secondary_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14"><text:span text:style-name="T9">VAT 0% RATE</text:span></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau4.A1" table:number-columns-spanned="2" office:value-type="string">
@@ -17214,15 +17214,15 @@
<text:p text:style-name="P17" loext:marker-style-name="T2"><text:span text:style-name="T10">TOTAL DUE TO YOU</text:span><text:span text:style-name="T10"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau4.B3" office:value-type="string">
<text:p text:style-name="P18" loext:marker-style-name="T2"><text:span text:style-name="T10"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_currency_name&gt;</text:placeholder></text:span><text:span text:style-name="T10"/></text:p>
<text:p text:style-name="P18" loext:marker-style-name="T2"><text:span text:style-name="T10"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_currency_name&gt;</text:placeholder></text:span><text:span text:style-name="T10"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau4.B3" office:value-type="string">
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T10"><text:placeholder text:placeholder-type="text">&lt;purchase.report_commission_total_display&gt;</text:placeholder></text:span><text:span text:style-name="T10"/></text:p>
<text:p text:style-name="P15" loext:marker-style-name="T2"><text:span text:style-name="T10"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_total_display&gt;</text:placeholder></text:span><text:span text:style-name="T10"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P21" loext:marker-style-name="T9"/>
<text:p text:style-name="P16" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;purchase.company.party.name&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P16" loext:marker-style-name="T9"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;invoice.company.party.name&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>
</office:body>

View File

@@ -3625,9 +3625,9 @@
</office:master-styles>
<office:body>
<office:text>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;sale in records&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;set_lang(sale.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;sale.set_lang(sale.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;invoice in records&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;set_lang(invoice.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;replace text:p=&quot;invoice.set_lang(invoice.party.lang)&quot;&gt;</text:placeholder></text:p>
<text:sequence-decls>
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
@@ -3639,7 +3639,7 @@
<table:table-column table:style-name="Tableau1.A"/>
<table:table-row table:style-name="Tableau1.1">
<table:table-cell table:style-name="Tableau1.A1" office:value-type="string">
<text:p text:style-name="P7" loext:marker-style-name="T4"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in sale.report_address.splitlines()&quot;&gt;</text:placeholder><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:span><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P7" loext:marker-style-name="T4"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in invoice.report_commission_address.splitlines()&quot;&gt;</text:placeholder><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:span><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder><text:span text:style-name="T4"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
@@ -3653,11 +3653,11 @@
<table:table-row table:style-name="Tableau3.1">
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P8" loext:marker-style-name="T11"><text:span text:style-name="T11">COMMISSION INVOICE</text:span><text:span text:style-name="T11"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T12"><text:span text:style-name="T11">INVOICE N. <text:placeholder text:placeholder-type="text">&lt;sale.report_commission_invoice_number&gt;</text:placeholder></text:span><text:span text:style-name="T12"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T10"><text:span text:style-name="T11">CONTRACT N. <text:placeholder text:placeholder-type="text">&lt;sale.report_commission_contract_number&gt;</text:placeholder></text:span><text:span text:style-name="T11"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T12"><text:span text:style-name="T11">INVOICE N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_invoice_number&gt;</text:placeholder></text:span><text:span text:style-name="T12"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T10"><text:span text:style-name="T11">CONTRACT N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_contract_number&gt;</text:placeholder></text:span><text:span text:style-name="T11"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" table:number-columns-spanned="3" office:value-type="string">
<text:p text:style-name="P8" loext:marker-style-name="T10"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;format_date(sale.sale_date or today, sale.party.lang)&gt;</text:placeholder></text:span><text:span text:style-name="T7"/></text:p>
<text:p text:style-name="P8" loext:marker-style-name="T10"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;format_date(invoice.report_commission_date or today, invoice.party.lang)&gt;</text:placeholder></text:span><text:span text:style-name="T7"/></text:p>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
@@ -3667,8 +3667,8 @@
</table:table-row>
<table:table-row table:style-name="Tableau3.1">
<table:table-cell table:style-name="Tableau3.A2" table:number-columns-spanned="4" office:value-type="string">
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4">Bill of Lading N. <text:placeholder text:placeholder-type="text">&lt;sale.report_commission_bl_number&gt;</text:placeholder> dated <text:placeholder text:placeholder-type="text">&lt;format_date(sale.report_commission_bl_date, sale.party.lang) if sale.report_commission_bl_date else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T3"><text:span text:style-name="T4">M/V <text:placeholder text:placeholder-type="text">&lt;sale.report_commission_vessel&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4">Bill of Lading N. <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_bl_number&gt;</text:placeholder> dated <text:placeholder text:placeholder-type="text">&lt;format_date(invoice.report_commission_bl_date, invoice.party.lang) if invoice.report_commission_bl_date else &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T3"><text:span text:style-name="T4">M/V <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_vessel&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
<table:covered-table-cell/>
<table:covered-table-cell/>
@@ -3677,16 +3677,16 @@
<table:table-row table:style-name="Tableau3.1">
<table:table-cell table:style-name="Tableau3.A2" table:number-columns-spanned="2" office:value-type="string">
<text:h text:style-name="P6" text:outline-level="1" loext:marker-style-name="T14"><text:span text:style-name="T14">COMMISSION</text:span><text:span text:style-name="T14"/></text:h>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_invoice_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_invoice_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<table:table table:name="Tableau2" table:style-name="Tableau2">
<table:table-column table:style-name="Tableau2.A"/>
<table:table-column table:style-name="Tableau2.B"/>
<table:table-row table:style-name="Tableau2.1">
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_quantity_unit_upper&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_quantity_unit_upper&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_quantity_display&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_quantity_display&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau2.1">
@@ -3694,12 +3694,12 @@
<text:p text:style-name="P9" loext:marker-style-name="T3"><text:span text:style-name="T4">Lbs</text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_lbs_display&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_lbs_display&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4">Your commission: <text:placeholder text:placeholder-type="text">&lt;sale.report_commission_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_secondary_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4">Your commission: <text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_secondary_rate_line&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P9" loext:marker-style-name="T3"><text:span text:style-name="T4">VAT 0% RATE</text:span><text:span text:style-name="T4"/></text:p>
</table:table-cell>
<table:covered-table-cell/>
@@ -3714,15 +3714,15 @@
</table:table-cell>
<table:covered-table-cell/>
<table:table-cell table:style-name="Tableau3.C4" office:value-type="string">
<text:p text:style-name="P13" loext:marker-style-name="T3"><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_currency_name&gt;</text:placeholder></text:span><text:span text:style-name="T5"/></text:p>
<text:p text:style-name="P13" loext:marker-style-name="T3"><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_currency_name&gt;</text:placeholder></text:span><text:span text:style-name="T5"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.C4" office:value-type="string">
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text">&lt;sale.report_commission_total_display&gt;</text:placeholder></text:span><text:span text:style-name="T5"/></text:p>
<text:p text:style-name="P10" loext:marker-style-name="T3"><text:span text:style-name="T5"><text:placeholder text:placeholder-type="text">&lt;invoice.report_commission_total_display&gt;</text:placeholder></text:span><text:span text:style-name="T5"/></text:p>
</table:table-cell>
</table:table-row>
</table:table>
<text:p text:style-name="P19" loext:marker-style-name="T4"/>
<text:p text:style-name="P11" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;sale.company.party.name&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P11" loext:marker-style-name="T4"><text:span text:style-name="T4"><text:placeholder text:placeholder-type="text">&lt;invoice.company.party.name&gt;</text:placeholder></text:span><text:span text:style-name="T4"/></text:p>
<text:p text:style-name="P20" loext:marker-style-name="T15"/>
<text:p text:style-name="P14"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</office:text>

View File

@@ -405,18 +405,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_purchase"/>
</record>
<record model="ir.action.report" id="report_purchase_commission_ict">
<field name="name">Commission invoice</field>
<field name="model">purchase.purchase</field>
<field name="report_name">purchase.purchase</field>
<field name="report">purchase/purchase_commission_ict.fodt</field>
</record>
<record model="ir.action.keyword" id="report_purchase_commission_ict_keyword">
<field name="keyword">form_print</field>
<field name="model">purchase.purchase,-1</field>
<field name="action" ref="report_purchase_commission_ict"/>
</record>
<record model="ir.ui.view" id="purchase_line_view_form">
<field name="model">purchase.line</field>
<field name="type">form</field>

View File

@@ -58,8 +58,8 @@ class Configuration(ModelSingleton, ModelSQL, ModelView):
_REPORT_LABELS = (
('sale_report_label', 'sale', 'report_sale', 'Proforma'),
('sale_commission_report_label', 'sale',
'report_sale_commission_ict', 'Commission invoice'),
('sale_commission_report_label', 'account_invoice',
'report_sale_commission_ict', 'Commission invoice Sale'),
('sale_bill_report_label', 'sale', 'report_bill', 'Draft'),
('invoice_report_label', 'account_invoice', 'report_invoice',
'Invoice'),
@@ -74,8 +74,8 @@ class Configuration(ModelSingleton, ModelSQL, ModelView):
('invoice_payment_order_report_label', 'purchase_trade',
'report_payment_order', 'Payment Order'),
('purchase_report_label', 'purchase', 'report_purchase', 'Purchase'),
('purchase_commission_report_label', 'purchase',
'report_purchase_commission_ict', 'Commission invoice'),
('purchase_commission_report_label', 'account_invoice',
'report_purchase_commission_ict', 'Commission invoice Purchase'),
('shipment_shipping_report_label', 'stock',
'report_shipment_in_shipping', 'Shipping instructions'),
('shipment_insurance_report_label', 'purchase_trade',

View File

@@ -319,6 +319,97 @@ class Invoice(metaclass=PoolMeta):
]
return lines or list(self.lines or [])
def _get_report_commission_trade(self):
for line in self._get_report_invoice_lines():
origin = getattr(line, 'origin', None)
if not origin:
continue
trade = getattr(origin, 'sale', None) or getattr(origin, 'purchase', None)
if trade:
return trade
@property
def report_commission_address(self):
trade = self._get_report_commission_trade()
return getattr(trade, 'report_address', '') or ''
@property
def report_commission_date(self):
trade = self._get_report_commission_trade()
return (
getattr(trade, 'sale_date', None)
or getattr(trade, 'purchase_date', None)
or self.invoice_date)
def _get_report_commission_value(self, name):
trade = self._get_report_commission_trade()
return getattr(trade, name, '') if trade else ''
@property
def report_commission_invoice_number(self):
return self._get_report_commission_value(
'report_commission_invoice_number')
@property
def report_commission_contract_number(self):
return self._get_report_commission_value(
'report_commission_contract_number')
@property
def report_commission_bl_number(self):
return self._get_report_commission_value(
'report_commission_bl_number')
@property
def report_commission_bl_date(self):
return self._get_report_commission_value(
'report_commission_bl_date')
@property
def report_commission_vessel(self):
return self._get_report_commission_value(
'report_commission_vessel')
@property
def report_commission_invoice_line(self):
return self._get_report_commission_value(
'report_commission_invoice_line')
@property
def report_commission_quantity_unit_upper(self):
return self._get_report_commission_value(
'report_commission_quantity_unit_upper')
@property
def report_commission_quantity_display(self):
return self._get_report_commission_value(
'report_commission_quantity_display')
@property
def report_commission_lbs_display(self):
return self._get_report_commission_value(
'report_commission_lbs_display')
@property
def report_commission_rate_line(self):
return self._get_report_commission_value(
'report_commission_rate_line')
@property
def report_commission_secondary_rate_line(self):
return self._get_report_commission_value(
'report_commission_secondary_rate_line')
@property
def report_commission_currency_name(self):
return self._get_report_commission_value(
'report_commission_currency_name')
@property
def report_commission_total_display(self):
return self._get_report_commission_value(
'report_commission_total_display')
@staticmethod
def _get_report_related_lots(line):
lots = []
@@ -1940,6 +2031,7 @@ class InvoiceReport(ReportTemplateMixin, BaseInvoiceReport):
def _resolve_configured_report_path(cls, action):
report_path = cls._get_action_report_path(action) or ''
action_name = cls._get_action_name(action)
legacy_prefix = None
if (report_path.endswith('/prepayment.fodt')
or action_name == 'Prepayment'):
@@ -1955,9 +2047,21 @@ class InvoiceReport(ReportTemplateMixin, BaseInvoiceReport):
elif (report_path.endswith('/commission__ict_final.fodt')
or action_name == 'CN/DN Commission'):
field_name = 'invoice_commission_cndn_report_template'
elif (report_path.endswith('/sale_commission_ict.fodt')
or action_name == 'Commission invoice Sale'):
field_name = 'sale_commission_report_template'
legacy_prefix = 'sale/'
elif (report_path.endswith('/purchase_commission_ict.fodt')
or action_name == 'Commission invoice Purchase'):
field_name = 'purchase_commission_report_template'
legacy_prefix = 'purchase/'
else:
field_name = 'invoice_report_template'
return cls._resolve_template_path(action, field_name, 'account_invoice')
resolved_path = cls._resolve_template_path(
action, field_name, 'account_invoice')
if legacy_prefix and resolved_path.startswith(legacy_prefix):
return 'account_invoice/%s' % resolved_path.rsplit('/', 1)[-1]
return resolved_path
class SaleReport(ReportTemplateMixin, BaseSaleReport):
@@ -1967,10 +2071,7 @@ class SaleReport(ReportTemplateMixin, BaseSaleReport):
def _resolve_configured_report_path(cls, action):
report_path = cls._get_action_report_path(action)
action_name = cls._get_action_name(action)
if (report_path.endswith('/sale_commission_ict.fodt')
or action_name == 'Commission invoice'):
field_name = 'sale_commission_report_template'
elif report_path.endswith('/bill.fodt') or action_name == 'Bill':
if report_path.endswith('/bill.fodt') or action_name == 'Bill':
field_name = 'sale_bill_report_template'
elif report_path.endswith('/sale_final.fodt') or action_name == 'Sale (final)':
field_name = 'sale_final_report_template'
@@ -1986,9 +2087,5 @@ class PurchaseReport(ReportTemplateMixin, BasePurchaseReport):
def _resolve_configured_report_path(cls, action):
report_path = cls._get_action_report_path(action)
action_name = cls._get_action_name(action)
if (report_path.endswith('/purchase_commission_ict.fodt')
or action_name == 'Commission invoice'):
return cls._resolve_template_path(
action, 'purchase_commission_report_template', 'purchase')
return cls._resolve_template_path(
action, 'purchase_report_template', 'purchase')

View File

@@ -4556,7 +4556,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
config_model.search.return_value = [
Mock(
sale_report_template='sale_melya.fodt',
sale_commission_report_template='sale_commission_ict.fodt',
sale_commission_report_template='sale/sale_commission_ict.fodt',
sale_bill_report_template='bill_melya.fodt',
sale_final_report_template='sale_final_melya.fodt',
invoice_report_template='invoice_melya.fodt',
@@ -4568,7 +4568,7 @@ class PurchaseTradeTestCase(ModuleTestCase):
invoice_payment_order_report_template='payment_order.fodt',
purchase_report_template='purchase_melya.fodt',
purchase_commission_report_template=(
'purchase_commission_ict.fodt'),
'purchase/purchase_commission_ict.fodt'),
)
]
@@ -4601,6 +4601,18 @@ class PurchaseTradeTestCase(ModuleTestCase):
'report': 'account_invoice/commission__ict_final.fodt',
}),
'account_invoice/commission__ict_final.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Commission invoice Sale',
'report': 'account_invoice/sale_commission_ict.fodt',
}),
'account_invoice/sale_commission_ict.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Commission invoice Purchase',
'report': 'account_invoice/purchase_commission_ict.fodt',
}),
'account_invoice/purchase_commission_ict.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Payment Order',
@@ -4623,6 +4635,8 @@ class PurchaseTradeTestCase(ModuleTestCase):
invoice_report_template='',
invoice_cndn_report_template='',
invoice_commission_cndn_report_template='',
sale_commission_report_template='',
purchase_commission_report_template='',
invoice_prepayment_report_template='',
invoice_packing_list_report_template='',
invoice_payment_order_report_template='',
@@ -4638,6 +4652,16 @@ class PurchaseTradeTestCase(ModuleTestCase):
'name': 'Invoice',
'report': 'account_invoice/invoice.fodt',
})
with self.assertRaises(UserError):
report_class._resolve_configured_report_path({
'name': 'Commission invoice Sale',
'report': 'account_invoice/sale_commission_ict.fodt',
})
with self.assertRaises(UserError):
report_class._resolve_configured_report_path({
'name': 'Commission invoice Purchase',
'report': 'account_invoice/purchase_commission_ict.fodt',
})
with self.assertRaises(UserError):
report_class._resolve_configured_report_path({
'name': 'Payment Order',
@@ -4673,12 +4697,6 @@ class PurchaseTradeTestCase(ModuleTestCase):
'report': 'sale/sale.fodt',
}),
'sale/sale_melya.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Commission invoice',
'report': 'sale/sale_commission_ict.fodt',
}),
'sale/sale_commission_ict.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Bill',
@@ -4715,12 +4733,6 @@ class PurchaseTradeTestCase(ModuleTestCase):
'report': 'purchase/purchase.fodt',
}),
'purchase/purchase_melya.fodt')
self.assertEqual(
report_class._resolve_configured_report_path({
'name': 'Commission invoice',
'report': 'purchase/purchase_commission_ict.fodt',
}),
'purchase/purchase_commission_ict.fodt')
def test_shipment_reports_use_templates_from_configuration(self):
'shipment report paths are resolved from purchase_trade configuration'

View File

@@ -5,10 +5,6 @@
<field name="sale_report_template" colspan="3"/>
<label name="sale_report_label"/>
<field name="sale_report_label" colspan="3"/>
<label name="sale_commission_report_template"/>
<field name="sale_commission_report_template" colspan="3"/>
<label name="sale_commission_report_label"/>
<field name="sale_commission_report_label" colspan="3"/>
<label name="sale_bill_report_template"/>
<field name="sale_bill_report_template" colspan="3"/>
<label name="sale_bill_report_label"/>
@@ -29,6 +25,14 @@
<field name="invoice_commission_cndn_report_template" colspan="3"/>
<label name="invoice_commission_cndn_report_label"/>
<field name="invoice_commission_cndn_report_label" colspan="3"/>
<label name="sale_commission_report_template"/>
<field name="sale_commission_report_template" colspan="3"/>
<label name="sale_commission_report_label"/>
<field name="sale_commission_report_label" colspan="3"/>
<label name="purchase_commission_report_template"/>
<field name="purchase_commission_report_template" colspan="3"/>
<label name="purchase_commission_report_label"/>
<field name="purchase_commission_report_label" colspan="3"/>
<label name="invoice_prepayment_report_template"/>
<field name="invoice_prepayment_report_template" colspan="3"/>
<label name="invoice_prepayment_report_label"/>
@@ -49,10 +53,6 @@
<field name="purchase_report_template" colspan="3"/>
<label name="purchase_report_label"/>
<field name="purchase_report_label" colspan="3"/>
<label name="purchase_commission_report_template"/>
<field name="purchase_commission_report_template" colspan="3"/>
<label name="purchase_commission_report_label"/>
<field name="purchase_commission_report_label" colspan="3"/>
<separator id="shipment_templates" string="Shipment" colspan="4"/>
<label name="shipment_shipping_report_template"/>

View File

@@ -410,18 +410,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="report_sale"/>
</record>
<record model="ir.action.report" id="report_sale_commission_ict">
<field name="name">Commission invoice</field>
<field name="model">sale.sale</field>
<field name="report_name">sale.sale</field>
<field name="report">sale/sale_commission_ict.fodt</field>
</record>
<record model="ir.action.keyword" id="report_sale_commission_ict_keyword">
<field name="keyword">form_print</field>
<field name="model">sale.sale,-1</field>
<field name="action" ref="report_sale_commission_ict"/>
</record>
<record model="ir.action.report" id="report_bill">
<field name="name">Draft</field>
<field name="model">sale.sale</field>