Raise NotImplementedError when setting Function field without setter
issue7985 review265101002
This commit is contained in:
+2
-1
@@ -31,7 +31,8 @@ class Invoice(metaclass=PoolMeta):
|
||||
('ignored', 'Ignored'),
|
||||
('recreated', 'Recreated'),
|
||||
], 'Exception State'), 'get_sale_exception_state')
|
||||
sales = fields.Function(fields.One2Many('sale.sale', None, 'Sales'),
|
||||
sales = fields.Function(fields.Many2Many(
|
||||
'sale.sale', None, None, "Sales"),
|
||||
'get_sales', searcher='search_sales')
|
||||
|
||||
def get_sale_exception_state(self, name):
|
||||
|
||||
@@ -187,8 +187,9 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
('paid', 'Paid'),
|
||||
('exception', 'Exception'),
|
||||
], 'Invoice State', readonly=True, required=True)
|
||||
invoices = fields.Function(fields.One2Many('account.invoice', None,
|
||||
'Invoices'), 'get_invoices', searcher='search_invoices')
|
||||
invoices = fields.Function(fields.Many2Many(
|
||||
'account.invoice', None, None, "Invoices"),
|
||||
'get_invoices', searcher='search_invoices')
|
||||
invoices_ignored = fields.Many2Many('sale.sale-ignored-account.invoice',
|
||||
'sale', 'invoice', 'Ignored Invoices', readonly=True)
|
||||
invoices_recreated = fields.Many2Many(
|
||||
@@ -210,10 +211,11 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
('sent', 'Sent'),
|
||||
('exception', 'Exception'),
|
||||
], 'Shipment State', readonly=True, required=True)
|
||||
shipments = fields.Function(fields.One2Many('stock.shipment.out', None,
|
||||
'Shipments'), 'get_shipments', searcher='search_shipments')
|
||||
shipment_returns = fields.Function(
|
||||
fields.One2Many('stock.shipment.out.return', None, 'Shipment Returns'),
|
||||
shipments = fields.Function(fields.Many2Many(
|
||||
'stock.shipment.out', None, None, "Shipments"),
|
||||
'get_shipments', searcher='search_shipments')
|
||||
shipment_returns = fields.Function(fields.Many2Many(
|
||||
'stock.shipment.out.return', None, None, "Shipment Returns"),
|
||||
'get_shipment_returns', searcher='search_shipment_returns')
|
||||
moves = fields.One2Many('stock.move', 'sale', 'Moves', readonly=True)
|
||||
origin = fields.Reference('Origin', selection='get_origin', select=True,
|
||||
|
||||
Reference in New Issue
Block a user