Fix company context domain when company is not in context
(transplanted from bd5b84915e07ee15f66015464d9952f81d5fa5d9)
This commit is contained in:
1 parent
7da79fbad6
commit
1c756c3276
1 file changed
+2
-1
@@ -17,7 +17,8 @@ class Sale(ModelWorkflow, ModelSQL, ModelView):
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
states={
|
||||
'readonly': "state != 'draft' or bool(lines)",
|
||||
}, domain="[('id', '=', context.get('company', 0))]")
|
||||
}, domain="[('id', 'company' in context and '=' or '!=', " \
|
||||
"context.get('company', 0))]")
|
||||
reference = fields.Char('Reference', readonly=True, select=1)
|
||||
description = fields.Char('Description', states={
|
||||
'readonly': "state != 'draft'",
|
||||
|
||||
Reference in new issue
Block a user