Fix missing target field in operand of domain
This commit is contained in:
@@ -21,7 +21,7 @@ class InvoiceLine(metaclass=PoolMeta):
|
||||
secondary_unit = fields.Many2One(
|
||||
'product.uom', "Secondary Unit", ondelete='RESTRICT',
|
||||
domain=[
|
||||
('category', '=', Eval('product_secondary_uom_category')),
|
||||
('category', '=', Eval('product_secondary_uom_category', -1)),
|
||||
],
|
||||
states={
|
||||
'invisible': ((Eval('type') != 'line')
|
||||
|
||||
@@ -236,7 +236,7 @@ class AmendmentLine(ModelSQL, ModelView):
|
||||
'party.address', "Invoice Address",
|
||||
domain=[
|
||||
('party', '=', If(Eval('invoice_party'),
|
||||
Eval('invoice_party'), Eval('party'))),
|
||||
Eval('invoice_party', -1), Eval('party', -1))),
|
||||
],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
|
||||
@@ -130,7 +130,7 @@ class Product(metaclass=PoolMeta):
|
||||
product_customers = fields.One2Many(
|
||||
'sale.product_customer', 'product', "Customers",
|
||||
domain=[
|
||||
('template', '=', Eval('template')),
|
||||
('template', '=', Eval('template', -1)),
|
||||
],
|
||||
states={
|
||||
'invisible': ~Eval('salable', False),
|
||||
|
||||
@@ -17,10 +17,10 @@ class Line(metaclass=PoolMeta):
|
||||
If(Bool(Eval('product')),
|
||||
['OR',
|
||||
[
|
||||
('template.products', '=', Eval('product')),
|
||||
('template.products', '=', Eval('product', -1)),
|
||||
('product', '=', None),
|
||||
],
|
||||
('product', '=', Eval('product')),
|
||||
('product', '=', Eval('product', -1)),
|
||||
],
|
||||
[]),
|
||||
('party', '=', Eval('customer', -1)),
|
||||
@@ -79,10 +79,10 @@ class AmendmentLine(metaclass=PoolMeta):
|
||||
domain=[
|
||||
['OR',
|
||||
[
|
||||
('template.products', '=', Eval('product')),
|
||||
('template.products', '=', Eval('product', -1)),
|
||||
('product', '=', None),
|
||||
],
|
||||
('product', '=', Eval('product')),
|
||||
('product', '=', Eval('product', -1)),
|
||||
],
|
||||
('party', '=', Eval('party', -1)),
|
||||
],
|
||||
|
||||
@@ -14,7 +14,7 @@ class SaleSecondaryMixin:
|
||||
sale_secondary_uom = fields.Many2One(
|
||||
'product.uom', "Sale Secondary UoM",
|
||||
domain=[
|
||||
('category', '!=', Eval('default_uom_category')),
|
||||
('category', '!=', Eval('default_uom_category', -1)),
|
||||
],
|
||||
help="The secondary Unit of Measure for sales.")
|
||||
sale_secondary_uom_factor = fields.Float(
|
||||
|
||||
@@ -84,7 +84,7 @@ class Subscription(Workflow, ModelSQL, ModelView):
|
||||
'party.address', "Invoice Address",
|
||||
domain=[
|
||||
('party', '=', If(Bool(Eval('invoice_party',)),
|
||||
Eval('invoice_party'), Eval('party'))),
|
||||
Eval('invoice_party', -1), Eval('party', -1))),
|
||||
],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
|
||||
@@ -74,7 +74,7 @@ class SubscriptionLine(metaclass=PoolMeta):
|
||||
|
||||
asset_lot = fields.Many2One('stock.lot', "Asset Lot",
|
||||
domain=[
|
||||
('subscription_services', '=', Eval('service')),
|
||||
('subscription_services', '=', Eval('service', -1)),
|
||||
],
|
||||
states={
|
||||
'required': ((Eval('subscription_state') == 'running')
|
||||
|
||||
@@ -431,7 +431,7 @@ class Move(metaclass=PoolMeta):
|
||||
lot = fields.Many2One(
|
||||
'stock.lot', "Lot", ondelete='RESTRICT',
|
||||
domain=[
|
||||
('product', '=', Eval('product')),
|
||||
('product', '=', Eval('product', -1)),
|
||||
],
|
||||
states={
|
||||
'readonly': Eval('state').in_(['cancelled', 'done']),
|
||||
@@ -855,7 +855,7 @@ class InventoryLine(metaclass=PoolMeta):
|
||||
__name__ = 'stock.inventory.line'
|
||||
lot = fields.Many2One('stock.lot', 'Lot',
|
||||
domain=[
|
||||
('product', '=', Eval('product')),
|
||||
('product', '=', Eval('product', -1)),
|
||||
],
|
||||
states={
|
||||
'readonly': Eval('inventory_state') != 'draft',
|
||||
|
||||
@@ -43,7 +43,7 @@ class Product(metaclass=PoolMeta):
|
||||
locations = fields.One2Many('stock.product.location', 'product',
|
||||
"Default Locations",
|
||||
domain=[
|
||||
('template', '=', Eval('template')),
|
||||
('template', '=', Eval('template', -1)),
|
||||
],
|
||||
states={
|
||||
'invisible': ~Eval('type').in_(['goods', 'assets']),
|
||||
|
||||
@@ -21,7 +21,7 @@ class Move(metaclass=PoolMeta):
|
||||
secondary_unit = fields.Many2One(
|
||||
'product.uom', "Secondary Unit", ondelete='RESTRICT',
|
||||
domain=[
|
||||
('category', '=', Eval('product_secondary_uom_category')),
|
||||
('category', '=', Eval('product_secondary_uom_category', -1)),
|
||||
],
|
||||
states={
|
||||
'invisible': ~Eval('product_secondary_uom_category'),
|
||||
|
||||
Reference in New Issue
Block a user