diff --git a/rma/models/rma_order.py b/rma/models/rma_order.py index 420006ab..201eca08 100644 --- a/rma/models/rma_order.py +++ b/rma/models/rma_order.py @@ -63,14 +63,16 @@ class RmaOrder(models.Model): comodel_name='res.partner', string='Partner', required=True) rma_line_ids = fields.One2many('rma.order.line', 'rma_id', string='RMA lines') - in_shipment_count = fields.Integer(compute=_compute_in_shipment_count, + in_shipment_count = fields.Integer(compute='_compute_in_shipment_count', string='# of Invoices') - out_shipment_count = fields.Integer(compute=_compute_out_shipment_count, + out_shipment_count = fields.Integer(compute='_compute_out_shipment_count', string='# of Outgoing Shipments') - line_count = fields.Integer(compute=_compute_line_count, + line_count = fields.Integer(compute='_compute_line_count', string='# of Outgoing Shipments') - supplier_line_count = fields.Integer(compute=_compute_supplier_line_count, - string='# of Outgoing Shipments') + supplier_line_count = fields.Integer( + compute='_compute_supplier_line_count', + string='# of Outgoing Shipments' + ) company_id = fields.Many2one('res.company', string='Company', required=True, default=lambda self: self.env.user.company_id) diff --git a/rma/models/rma_order_line.py b/rma/models/rma_order_line.py index 2c22dd98..b3697aaf 100644 --- a/rma/models/rma_order_line.py +++ b/rma/models/rma_order_line.py @@ -240,9 +240,9 @@ class RmaOrderLine(models.Model): string='Price Unit', readonly=True, states={'draft': [('readonly', False)]}, ) - in_shipment_count = fields.Integer(compute=_compute_in_shipment_count, + in_shipment_count = fields.Integer(compute='_compute_in_shipment_count', string='# of Shipments') - out_shipment_count = fields.Integer(compute=_compute_out_shipment_count, + out_shipment_count = fields.Integer(compute='_compute_out_shipment_count', string='# of Deliveries') move_ids = fields.One2many('stock.move', 'rma_line_id', string='Stock Moves', readonly=True, @@ -336,40 +336,40 @@ class RmaOrderLine(models.Model): qty_to_receive = fields.Float( string='Qty To Receive', digits=dp.get_precision('Product Unit of Measure'), - compute=_compute_qty_to_receive, store=True) + compute='_compute_qty_to_receive', store=True) qty_incoming = fields.Float( string='Incoming Qty', copy=False, readonly=True, digits=dp.get_precision('Product Unit of Measure'), - compute=_compute_qty_incoming, store=True) + compute='_compute_qty_incoming', store=True) qty_received = fields.Float( string='Qty Received', copy=False, digits=dp.get_precision('Product Unit of Measure'), - compute=_compute_qty_received, + compute='_compute_qty_received', store=True) qty_to_deliver = fields.Float( string='Qty To Deliver', copy=False, digits=dp.get_precision('Product Unit of Measure'), - readonly=True, compute=_compute_qty_to_deliver, + readonly=True, compute='_compute_qty_to_deliver', store=True) qty_outgoing = fields.Float( string='Outgoing Qty', copy=False, readonly=True, digits=dp.get_precision('Product Unit of Measure'), - compute=_compute_qty_outgoing, + compute='_compute_qty_outgoing', store=True) qty_delivered = fields.Float( string='Qty Delivered', copy=False, digits=dp.get_precision('Product Unit of Measure'), - readonly=True, compute=_compute_qty_delivered, + readonly=True, compute='_compute_qty_delivered', store=True) qty_to_supplier_rma = fields.Float( string='Qty to send to Supplier RMA', digits=dp.get_precision('Product Unit of Measure'), - readonly=True, compute=_compute_qty_supplier_rma, + readonly=True, compute='_compute_qty_supplier_rma', store=True) qty_in_supplier_rma = fields.Float( string='Qty in Supplier RMA', digits=dp.get_precision('Product Unit of Measure'), - readonly=True, compute=_compute_qty_supplier_rma, + readonly=True, compute='_compute_qty_supplier_rma', store=True) under_warranty = fields.Boolean( string="Under Warranty?",