[9.0][REW] rma_account: adapt.

This commit is contained in:
lreficent
2017-10-18 16:47:35 +02:00
committed by JasminSForgeFlow
parent 003203be4a
commit 610c5b6524
6 changed files with 114 additions and 40 deletions

View File

@@ -20,9 +20,10 @@ class RmaOrder(models.Model):
invoices = rec.mapped('rma_line_ids.invoice_id')
rec.invoice_count = len(invoices)
add_invoice_id = fields.Many2one('account.invoice', string='Add Invoice',
ondelete='set null', readonly=True,
states={'draft': [('readonly', False)]})
add_invoice_id = fields.Many2one(
comodel_name='account.invoice', string='Add Invoice',
ondelete='set null', readonly=True,
)
invoice_refund_count = fields.Integer(
compute=_compute_invoice_refund_count, string='# of Refunds')
invoice_count = fields.Integer(