mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[14.0][IMP]repair_discount, discount column in repair order PDF
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
"depends": ["repair"],
|
||||
"data": [
|
||||
"views/mrp_repair_view.xml",
|
||||
"report/repair_templates_repair_order.xml",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
39
repair_discount/report/repair_templates_repair_order.xml
Normal file
39
repair_discount/report/repair_templates_repair_order.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="repair_discount_report_repairorder"
|
||||
inherit_id="repair.report_repairorder"
|
||||
>
|
||||
<xpath
|
||||
expr="//table[hasclass('o_main_table')]/thead/tr/t/th[1]"
|
||||
position="after"
|
||||
>
|
||||
<th
|
||||
t-if="any(o.operations.mapped('discount')) or any(o.fees_lines.mapped('discount'))"
|
||||
class="text-center"
|
||||
>Discount (%)</th>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-if='o.operations']/tr[1]/td[1]" position="attributes">
|
||||
<attribute name="colspan">6</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//tr[@t-as='line']/t/td[1]" position="after">
|
||||
<td
|
||||
t-if="any(o.operations.mapped('discount')) or any(o.fees_lines.mapped('discount'))"
|
||||
class="text-center"
|
||||
>
|
||||
<span t-if="line.discount" t-esc="line.discount" />
|
||||
</td>
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-if='o.fees_lines']/tr[1]/td[1]" position="attributes">
|
||||
<attribute name="colspan">6</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//tr[@t-as='fees']/t/td[1]" position="after">
|
||||
<td
|
||||
t-if="any(o.operations.mapped('discount')) or any(o.fees_lines.mapped('discount'))"
|
||||
class="text-center"
|
||||
>
|
||||
<span t-if="fees.discount" t-esc="fees.discount" />
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user