Change string domain into list
This commit is contained in:
1 parent
7b2f503088
commit
b23dddb733
2 files changed
+7
-7
No files matched your search
+6
-6
@@ -15,17 +15,17 @@ class OrderPoint(ModelSQL, ModelView):
|
||||
|
||||
product = fields.Many2One(
|
||||
'product.product', 'Product', required=True, select=1,
|
||||
domain="[('type', '=', 'stockable'), ('purchasable', 'in', " \
|
||||
"type == 'purchase' and [True] or [True, False])]",
|
||||
domain=[('type', '=', 'stockable'), "('purchasable', 'in', " \
|
||||
"type == 'purchase' and [True] or [True, False])"],
|
||||
on_change=['product'])
|
||||
warehouse_location = fields.Many2One(
|
||||
'stock.location', 'Warehouse Location', select=1,
|
||||
domain="[('type', '=', 'warehouse')]",
|
||||
domain=[('type', '=', 'warehouse')],
|
||||
states={'invisible': "type != 'purchase'",
|
||||
'required': "type == 'purchase'"},)
|
||||
storage_location = fields.Many2One(
|
||||
'stock.location', 'Storage Location', select=1,
|
||||
domain="[('type', '=', 'storage')]",
|
||||
domain=[('type', '=', 'storage')],
|
||||
states={'invisible': "type != 'internal'",
|
||||
'required': "type == 'internal'"},)
|
||||
location = fields.Function(
|
||||
@@ -33,7 +33,7 @@ class OrderPoint(ModelSQL, ModelView):
|
||||
fnct_search='search_location', string='Location')
|
||||
provisioning_location = fields.Many2One(
|
||||
'stock.location', 'Provisioning Location',
|
||||
domain="[('type', '=', 'storage')]",
|
||||
domain=[('type', '=', 'storage')],
|
||||
states={'invisible': "type != 'internal'",
|
||||
'required': "type == 'internal'"},)
|
||||
type = fields.Selection(
|
||||
@@ -45,7 +45,7 @@ class OrderPoint(ModelSQL, ModelView):
|
||||
max_quantity = fields.Float('Maximal Quantity', required=True,
|
||||
digits="(16, unit_digits)", depends=['unit_digits'])
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
domain="[('id', '=', context.get('company', 0))]")
|
||||
domain=["('id', '=', context.get('company', 0))"])
|
||||
unit = fields.Function('get_unit', type='many2one', relation='product.uom',
|
||||
string='Unit')
|
||||
unit_digits = fields.Function('get_unit_digits', type='integer',
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class PurchaseRequest(ModelSQL, ModelView):
|
||||
'get_purchase', type='many2one', relation='purchase.purchase',
|
||||
string='Purchase')
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
readonly=True, domain="[('id', '=', context.get('company', 0))]")
|
||||
readonly=True, domain=["('id', '=', context.get('company', 0))"])
|
||||
origin = fields.Reference('Origin', selection='origin_get', readonly=True,
|
||||
required=True)
|
||||
state = fields.Function(
|
||||
|
||||
Reference in new issue
Block a user