Skip to content

Commit 8bf82d9

Browse files
committed
Eval company or -1 in context m2o fields #163427
1 parent 9f4eb1e commit 8bf82d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

product.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CategoryCompany(ModelSQL, CompanyValueMixin):
3939
__name__ = 'product.category.lot_sequence'
4040
category = fields.Many2One('product.category', 'Category', required=True,
4141
ondelete='CASCADE', context={
42-
'company': Eval('company'),
42+
'company': Eval('company', -1),
4343
},
4444
depends=['company'])
4545
lot_sequence = fields.Many2One(
@@ -82,7 +82,7 @@ class TemplateCompany(ModelSQL, CompanyValueMixin):
8282
__name__ = 'product.template.lot_sequence'
8383
template = fields.Many2One('product.template', 'Template', required=True,
8484
ondelete='CASCADE', context={
85-
'company': Eval('company'),
85+
'company': Eval('company', -1),
8686
},
8787
depends=['company'])
8888
lot_sequence = fields.Many2One(

0 commit comments

Comments
 (0)