From b4e37467f1c936bd2873f1608833d36fe24ac905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 9 Oct 2013 18:25:52 +0200 Subject: [PATCH] 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 --- stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index f504f9e6b4..a990d12fe8 100644 --- a/stock.py +++ b/stock.py @@ -16,7 +16,7 @@ class Configuration: shipment_drop_sequence = fields.Property(fields.Many2One('ir.sequence', 'Drop Shipment Sequence', domain=[ ('company', 'in', - [Eval('context', {}).get('company'), False]), + [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.drop'), ], required=True)) @@ -35,7 +35,7 @@ class ShipmentDrop(Workflow, ModelSQL, ModelView): }, domain=[ ('id', If(Eval('context', {}).contains('company'), '=', '!='), - Eval('context', {}).get('company', 0)), + Eval('context', {}).get('company', -1)), ], depends=['state']) reference = fields.Char('Reference', select=1,