| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | <template id="report_invoice_document" inherit_id="account.report_invoice_document"> |
| 4 | <xpath expr="//td[@name='account_invoice_line_name']" position="inside"> |
| 5 | <t t-set="pos_orders" t-value="o.sudo().pos_order_ids"/> |
| 6 | <t t-if="pos_orders"> |
| 7 | <div style="margin-left:15px; font-style: italic"> |
| 8 | <t t-set="down_payment_product" t-value="pos_orders[0].config_id.down_payment_product_id"/> |
| 9 | <t t-if="line.product_id == down_payment_product"> |
| 10 | <t t-set="sale_orders" t-value="pos_orders[0].lines.filtered(lambda l: l.product_id == down_payment_product and l.price_subtotal_incl == line.price_total).mapped('sale_order_origin_id')"/> |
| 11 | <t t-if="sale_orders"> |
| 12 | <t t-set="sale_order" t-value="sale_orders[0]"/> |
| 13 | <t t-foreach="sale_order.order_line" t-as="sale_order_line"> |
| 14 | <t t-if="sale_order_line.product_id != down_payment_product and sale_order_line.tax_ids == line.tax_ids"> |
| 15 | <div> |
| 16 | <span style="margin-right: 5px;"><t t-esc="int(sale_order_line.product_uom_qty)"/>x</span> |
| 17 | <span t-esc="sale_order_line.name" /> |
| 18 | <span style="margin: 0px 5px;">:</span> |
| 19 | <t t-esc="sale_order_line.price_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
| 20 | </div> |
| 21 | </t> |
| 22 | </t> |
| 23 | <div style="font-weight: bold">From <t t-esc="sale_order.name"/> </div> |
| 24 | </t> |
| 25 | </t> |
| 26 | </div> |
| 27 | </t> |
| 28 | </xpath> |
| 29 | </template> |
| 30 | </odoo> |