fix company
This commit is contained in:
parent
62fd9448e2
commit
1fc34895b0
|
|
@ -1,3 +1,5 @@
|
|||
from lib2to3.fixes.fix_input import context
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.osv.expression import TERM_OPERATORS_NEGATION
|
||||
|
|
@ -42,7 +44,8 @@ class PropertyInherit(models.Model):
|
|||
|
||||
field = self.env[model]._fields[name]
|
||||
field_id = self.env['ir.model.fields']._get(model, name).id
|
||||
company_id = self.env.company.id or self.env.context.get('company_id') if self.env.context.get('company_id') else False
|
||||
context_company= self.env.context.get('company_id') if self.env.context.get('company_id') else False
|
||||
company_id = self.env.company.id or context_company
|
||||
if field.type == 'many2one':
|
||||
comodel = self.env[field.comodel_name]
|
||||
model_pos = len(model) + 2
|
||||
|
|
|
|||
Loading…
Reference in New Issue