Skip to content

Commit

Permalink
[MIG] base_global_discount: 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ferran-S73 committed Jan 27, 2023
1 parent f800171 commit 7dcd35c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion base_global_discount/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 0 additions & 14 deletions base_global_discount/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
4 changes: 2 additions & 2 deletions base_global_discount/views/res_partner_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 7dcd35c

Please sign in to comment.