You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
728 B

# Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
customer_global_discount_ids = fields.Many2many(
comodel_name="global.discount",
column1="partner_id",
column2="global_discount_id",
string="Sale Global Discounts",
domain=[("discount_scope", "=", "sale")],
)
supplier_global_discount_ids = fields.Many2many(
comodel_name="global.discount",
column1="partner_id",
column2="global_discount_id",
string="Purchase Global Discounts",
domain=[("discount_scope", "=", "purchase")],
)