Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
32
sale_order_general_discount/views/product_view.xml
Executable file
32
sale_order_general_discount/views/product_view.xml
Executable file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">sale_order_general_discount.product_normal_form_view</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='group_standard_price']" position="inside">
|
||||
<field
|
||||
name="bypass_general_discount"
|
||||
string="Don't apply general discount"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.sale_order_general_discount.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority" eval="24" />
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='group_standard_price']" position="inside">
|
||||
<field
|
||||
name="bypass_general_discount"
|
||||
string="Don't apply general discount"
|
||||
invisible="product_variant_count > 1"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
20
sale_order_general_discount/views/res_partner_view.xml
Executable file
20
sale_order_general_discount/views/res_partner_view.xml
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//page[@name='sales_purchases']//field[@name='user_id']"
|
||||
position="after"
|
||||
>
|
||||
<label for="sale_discount" />
|
||||
<div>
|
||||
<field name="sale_discount" string="Discount" class="oe_inline" /> %
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
23
sale_order_general_discount/views/sale_order_view.xml
Executable file
23
sale_order_general_discount/views/sale_order_view.xml
Executable file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="sale_order_general_discount_form_view" model="ir.ui.view">
|
||||
<field name="name">sale.order.general.discount.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='tax_totals']" position="before">
|
||||
<div class="oe_row" style="float:right;">
|
||||
<label for="general_discount" />
|
||||
<field
|
||||
name="general_discount"
|
||||
style="width: 5.5rem;"
|
||||
class="oe_subtotal_footer_separator mr-0"
|
||||
string="Discount (%)"
|
||||
/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user