[ADD] base_global_discount: New Module 11.0

This commit is contained in:
David
2019-08-21 12:36:02 +02:00
committed by Ernesto Tejeda
parent a1546d803d
commit b47b5ff22a
20 changed files with 715 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# 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')],
)