[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

@@ -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,
)