mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[IMP] base_global_discount: add specific security group
This way, it will be easier to decide who can set discount or not. The current group scope is too broad.
This commit is contained in:
@@ -41,9 +41,12 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_global_discount"
|
||||
<menuitem
|
||||
id="menu_global_discount"
|
||||
action="action_global_discount_tree"
|
||||
name="Global Discounts"
|
||||
sequence="1" parent="base.menu_ir_property"/>
|
||||
sequence="1" parent="base.menu_ir_property"
|
||||
groups="base_global_discount.group_global_discount"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -8,11 +8,16 @@
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale" position="inside">
|
||||
<field name="customer_global_discount_ids" widget="many2many_tags"
|
||||
<field name="customer_global_discount_ids" widget="many2many_tags" groups="base_global_discount.group_global_discount"
|
||||
attrs="{'invisible': [('customer', '=', False), ('is_company', '=', False), ('parent_id', '!=', False)]}"/>
|
||||
<field name="customer_global_discount_ids_readonly" widget="many2many_tags"
|
||||
groups="!base_global_discount.group_global_discount"
|
||||
attrs="{'invisible': [('customer', '=', False), ('is_company', '=', False), ('parent_id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group name="purchase" position="inside">
|
||||
<field name="supplier_global_discount_ids" widget="many2many_tags"
|
||||
<field name="supplier_global_discount_ids" widget="many2many_tags" groups="base_global_discount.group_global_discount"
|
||||
attrs="{'invisible': [('supplier', '=', False), ('is_company', '=', False), ('parent_id', '!=', False)]}"/>
|
||||
<field name="supplier_global_discount_ids" widget="many2many_tags" groups="!base_global_discount.group_global_discount"
|
||||
attrs="{'invisible': [('supplier', '=', False), ('is_company', '=', False), ('parent_id', '!=', False)]}"/>
|
||||
</group>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user