añadido sal global discount desde OCA/sale-workflow
This commit is contained in:
parent
d6583b9333
commit
1763d458c3
20 changed files with 1334 additions and 0 deletions
26
sale_global_discount/views/report_sale_order.xml
Normal file
26
sale_global_discount/views/report_sale_order.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
|
||||
<xpath expr="//div[@name='total']/div/table/tr[1]" position="before">
|
||||
<t t-if="doc.global_discount_ids">
|
||||
<tr>
|
||||
<td><strong>Subtl. before disc.</strong></td>
|
||||
<td class="text-right">
|
||||
<span t-field="doc.amount_untaxed_before_global_discounts"
|
||||
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid #dddddd;">
|
||||
<td><strong>Global Discounts</strong><br />
|
||||
<t t-esc="'→'.join(['{:.2f}%'.format(x.discount) for x in doc.global_discount_ids])"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="doc.amount_global_discount"
|
||||
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
22
sale_global_discount/views/sale_order_views.xml
Normal file
22
sale_global_discount/views/sale_order_views.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Copyright 2020 Tecnativa - David Vidal
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="pricelist_id" position="after">
|
||||
<field name="global_discount_ids" widget="many2many_tags" groups="base_global_discount.group_global_discount" />
|
||||
<field name="global_discount_ids_readonly" string="Sale Global Discounts" widget="many2many_tags" groups="!base_global_discount.group_global_discount" />
|
||||
</field>
|
||||
<field name="amount_untaxed" position="before">
|
||||
<field name="amount_untaxed_before_global_discounts"/>
|
||||
<field name="amount_global_discount"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
Loading…
Add table
Add a link
Reference in a new issue