[FIX] l10n_gcc_invoice: also add description/label of the invoice line
We did not add the description of the invoice line on the print-out of the invoice. (probably because description is not translatable and the name of the product is) If a product is set, the name of the product becomes the description (label) on the invoice line, but of course this depends on the language. So, we only add the description if it does not correspond to either the English (/standard language) or Arabic product description. (People can always add both languages in the same field) Of course, if the product is not set, it will also just show the description (label). Also put the : of the payment reference in Arabic on the other side. closes odoo/odoo#81620 X-original-commit: 3485c7ad368d9c841d75a0b0614082b8989e2afc Signed-off-by: Florian Gilbert <flg@odoo.com> Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
@@ -254,11 +254,18 @@
|
||||
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
|
||||
<t t-if="not line.display_type" name="account_invoice_line_accountable">
|
||||
<td name="account_invoice_line_name">
|
||||
<span t-field="line.product_id.name" t-options="{'widget': 'text'}"/>
|
||||
<t t-if="line.product_id.name != line.with_context(lang='ar_001').product_id.name">
|
||||
<br/>
|
||||
<span t-field="line.with_context(lang='ar_001').product_id.name"
|
||||
t-options="{'widget': 'text'}"/>
|
||||
<t t-set="translation_name" t-value="line.with_context(lang='ar_001').product_id.name"/>
|
||||
<t t-if="line.product_id">
|
||||
<span t-field="line.product_id.name" t-options="{'widget': 'text'}"/>
|
||||
<t t-if="line.product_id.name != translation_name">
|
||||
<br/>
|
||||
<span t-field="line.with_context(lang='ar_001').product_id.name"
|
||||
t-options="{'widget': 'text'}"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="line.name and line.name != line.product_id.name and line.name != translation_name">
|
||||
<t t-if="line.product_id"><br/></t>
|
||||
<span t-field="line.name" t-options="{'widget': 'text'}"/>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@@ -400,10 +407,10 @@
|
||||
</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<p>رقم إشارة الدفعة:
|
||||
<p>
|
||||
<b>
|
||||
<span t-field="o.payment_reference"/>
|
||||
</b>
|
||||
<span t-field="o.payment_reference"/> :
|
||||
</b>رقم إشارة الدفعة
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user