Change pricelist behaviour
parent
63e648fad7
commit
5c332d89aa
|
|
@ -90,14 +90,26 @@ class Partner(models.Model):
|
|||
collective_bill = fields.Boolean(string='Sammelrechnung', default=True)
|
||||
country_id = fields.Many2one('res.country', string='Country', ondelete='restrict', default=_default_country_id)
|
||||
commission_account_ids = fields.Many2many(comodel_name='commission.account', string='Provisionsempfänger')
|
||||
commission_percentage = fields.Float(string='Provision in %')
|
||||
partner_flash = fields.Char()
|
||||
fax = fields.Char(string='Fax')
|
||||
user_id = fields.Many2one(track_visibility='onchange')
|
||||
|
||||
# make pricelist searchable (store=True) --> code copied from: \ext\odoo\addons\product\models\res_partner.py!
|
||||
# property_product_pricelist = fields.Many2one(
|
||||
# 'product.pricelist', 'Sale Pricelist', compute='_compute_product_pricelist', store=True, default=1,
|
||||
# inverse="_inverse_product_pricelist", company_dependent=False, # NOT A REAL PROPERTY
|
||||
# help="This pricelist will be used, instead of the default one, for sales to the current partner",
|
||||
# track_visibility='onchange')
|
||||
|
||||
property_product_pricelist = fields.Many2one(
|
||||
'product.pricelist', 'Sale Pricelist', compute='_compute_product_pricelist', store=True, default=1,
|
||||
inverse="_inverse_product_pricelist", company_dependent=False, # NOT A REAL PROPERTY
|
||||
'product.pricelist', 'Sale Pricelist',
|
||||
# compute='_compute_product_pricelist',
|
||||
compute='',
|
||||
store=True,
|
||||
default=lambda self: self.env['product.pricelist'].search([('company_id', '=', None)], limit=1),
|
||||
# inverse="_inverse_product_pricelist",
|
||||
company_dependent=False, # NOT A REAL PROPERTY
|
||||
help="This pricelist will be used, instead of the default one, for sales to the current partner",
|
||||
track_visibility='onchange')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue