From 0614e11c0ea2b99b626abc464e30e248dc04bbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 9 Oct 2013 18:25:13 +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 --- statement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/statement.py b/statement.py index 1c42140cb0..15f2e1daa8 100644 --- a/statement.py +++ b/statement.py @@ -19,13 +19,13 @@ class Statement(Workflow, ModelSQL, ModelView): company = fields.Many2One('company.company', 'Company', required=True, select=True, states=_STATES, domain=[ ('id', If(Eval('context', {}).contains('company'), '=', '!='), - Eval('context', {}).get('company', 0)), + Eval('context', {}).get('company', -1)), ], depends=_DEPENDS) journal = fields.Many2One('account.statement.journal', 'Journal', required=True, domain=[ - ('company', '=', Eval('context', {}).get('company', 0)), + ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'readonly': (Eval('state') != 'draft') | Eval('lines'),