[MIG] base_global_discount: 16.0

This commit is contained in:
ferran-73
2022-12-29 09:31:50 +01:00
parent f800171d05
commit 7dcd35caf2
3 changed files with 3 additions and 17 deletions

View File

@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Base Global Discount",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Base",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-backend",

View File

@@ -22,17 +22,3 @@ class ResPartner(models.Model):
string="Purchase Global Discounts",
domain=[("discount_scope", "=", "purchase")],
)
# HACK: Looks like UI doesn't behave well with Many2many fields and
# negative groups when the same field is shown. In this case, we want to
# show the readonly version to any not in the global discount group.
# TODO: Check in future versions if it's fixed
customer_global_discount_ids_readonly = fields.Many2many(
string="Sale Global Discounts (readonly)",
related="customer_global_discount_ids",
readonly=True,
)
supplier_global_discount_ids_readonly = fields.Many2many(
string="Purchase Global Discounts (readonly)",
related="supplier_global_discount_ids",
readonly=True,
)

View File

@@ -14,7 +14,7 @@
attrs="{'invisible': [('is_company', '=', False), ('parent_id', '!=', False)]}"
/>
<field
name="customer_global_discount_ids_readonly"
name="customer_global_discount_ids"
string="Sale Global Discounts"
widget="many2many_tags"
groups="!base_global_discount.group_global_discount"
@@ -30,7 +30,7 @@
attrs="{'invisible': [('is_company', '=', False), ('parent_id', '!=', False)]}"
/>
<field
name="supplier_global_discount_ids_readonly"
name="supplier_global_discount_ids"
string="Purchase Global Discounts"
readonly="1"
widget="many2many_tags"