Fix usage of context company

Default value of company should be -1 to get the right cast and an impossible
value.
Replace False by None as other value in "in" clause.

issue3394
review1119002
This commit is contained in:
Cédric Krier
2013-10-09 18:25:39 +02:00
parent 773e8976c3
commit 39cbfcbec8
+1 -1
View File
@@ -52,7 +52,7 @@ class PriceList(ModelSQL, ModelView):
company = fields.Many2One('company.company', 'Company', required=True,
select=True, domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
Eval('context', {}).get('company', 0)),
Eval('context', {}).get('company', -1)),
])
lines = fields.One2Many('product.price_list.line', 'price_list', 'Lines')