Add default value on company_id field of pricelist
This commit is contained in:
committed by
Raphaël Valyi
parent
41bfd4fc6c
commit
fc29b2b480
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import product
|
||||
from . import pricelist
|
||||
|
||||
13
product_usability/pricelist.py
Normal file
13
product_usability/pricelist.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ProductPricelist(models.Model):
|
||||
_inherit = 'product.pricelist'
|
||||
|
||||
company_id = fields.Many2one(
|
||||
default=lambda self: self.env['res.company']._company_default_get(
|
||||
'product.pricelist'))
|
||||
Reference in New Issue
Block a user