Use strings on fields compute to allow inheritance

This commit is contained in:
Akim Juillerat
2019-03-18 17:38:46 +01:00
committed by AaronHForgeFlow
parent c637de985e
commit 678ca66c1e
2 changed files with 17 additions and 15 deletions

View File

@@ -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)