Files
server-backend/base_global_discount/models/res_partner.py
Ernesto Tejeda b215abe4f7 [MIG] base_global_discount: Migration to 13.0
[UPD] Update base_global_discount.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-backend-13.0/server-backend-13.0-base_global_discount
Translate-URL: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-base_global_discount/
2021-12-21 19:57:41 +01:00

25 lines
826 B
Python

# 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",
relation="customer_global_discount_rel",
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",
relation="supplier_global_discount_rel",
column1="partner_id",
column2="global_discount_id",
string="Purchase Global Discounts",
domain=[("discount_scope", "=", "purchase")],
)