Fix missing target field in operand of domain

This commit is contained in:
Cédric Krier
2024-10-30 11:24:15 +01:00
parent 1fdda8bdb2
commit e5658ccf92
9 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -810,7 +810,7 @@ class Tax(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
company = fields.Many2One('company.company', "Company", required=True)
invoice_account = fields.Many2One('account.account', 'Invoice Account',
domain=[
('company', '=', Eval('company')),
('company', '=', Eval('company', -1)),
('type.statement', '=', 'balance'),
('closed', '!=', True),
],
+1 -1
View File
@@ -213,7 +213,7 @@ class AgentSelection(sequence_ordered(), MatchMixin, ModelSQL, ModelView):
employee = fields.Many2One(
'company.employee', "Employee",
domain=[
('company', '=', Eval('company')),
('company', '=', Eval('company', -1)),
])
@classmethod
+1 -1
View File
@@ -567,5 +567,5 @@ class SendTestView(ModelView):
email = fields.Many2One(
'marketing.email', "Email", required=True,
domain=[
('list_', '=', Eval('list_')),
('list_', '=', Eval('list_', -1)),
])
+3 -3
View File
@@ -127,7 +127,7 @@ class BOMInput(ModelSQL, ModelView):
unit = fields.Many2One(
'product.uom', "Unit", required=True,
domain=[
('category', '=', Eval('uom_category')),
('category', '=', Eval('uom_category', -1)),
])
quantity = fields.Float(
"Quantity", digits='unit', required=True,
@@ -277,13 +277,13 @@ class OpenBOMTreeStart(ModelView):
unit = fields.Many2One(
'product.uom', "Unit", required=True,
domain=[
('category', '=', Eval('category')),
('category', '=', Eval('category', -1)),
])
category = fields.Many2One('product.uom.category', 'Category',
readonly=True)
bom = fields.Many2One('product.product-production.bom',
'BOM', required=True, domain=[
('product', '=', Eval('product')),
('product', '=', Eval('product', -1)),
])
product = fields.Many2One('product.product', 'Product', readonly=True)
+3 -2
View File
@@ -41,10 +41,11 @@ class Routing(metaclass=PoolMeta):
If(Bool('supplier_service'),
['OR',
[
('template.products', '=', Eval('supplier_service')),
('template.products',
'=', Eval('supplier_service', -1)),
('product', '=', None),
],
('product', '=', Eval('supplier_service')),
('product', '=', Eval('supplier_service', -1)),
],
[]),
('party', '=', Eval('supplier', -1)),
+1 -1
View File
@@ -99,7 +99,7 @@ class SplitProductionStart(ModelView):
unit = fields.Many2One(
'product.uom', "Unit", required=True,
domain=[
('category', '=', Eval('uom_category')),
('category', '=', Eval('uom_category', -1)),
])
uom_category = fields.Many2One(
'product.uom.category', "UoM Category", readonly=True,
+1 -1
View File
@@ -220,7 +220,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',
@@ -327,8 +327,8 @@ class QuotationLine(ModelSQL, ModelView):
quotation = fields.Many2One('purchase.request.quotation', 'Quotation',
ondelete='CASCADE', required=True,
domain=[
('supplier', '=', Eval('supplier')),
])
('supplier', '=', Eval('supplier', -1)),
])
quotation_state = fields.Function(fields.Selection(
'get_quotation_state', 'Quotation State'),
'on_change_with_quotation_state', searcher='search_quotation_state')
@@ -590,7 +590,7 @@ class PurchaseRequest(metaclass=PoolMeta):
'purchase.request.quotation.line', 'Preferred Quotation Line',
domain=[
('quotation_state', '=', 'received'),
('request', '=', Eval('id'))
('request', '=', Eval('id', -1))
],
help="The quotation that will be chosen to create the purchase\n"
"otherwise first ordered received quotation line will be selected.")
+1 -1
View File
@@ -14,7 +14,7 @@ class PurchaseSecondaryMixin:
purchase_secondary_uom = fields.Many2One(
'product.uom', "Purchase Secondary UoM",
domain=[
('category', '!=', Eval('default_uom_category')),
('category', '!=', Eval('default_uom_category', -1)),
],
help="The secondary Unit of Measure for purchases.")
purchase_secondary_uom_factor = fields.Float(