diff --git a/rma_account/models/invoice.py b/rma_account/models/invoice.py index 18eeeda7..6a88d0cc 100644 --- a/rma_account/models/invoice.py +++ b/rma_account/models/invoice.py @@ -35,7 +35,6 @@ class AccountInvoice(models.Model): line.price_unit, self.currency_id, round=False), 'quantity': qty, 'discount': 0.0, - 'account_analytic_id': line.analytic_account_id.id, 'rma_line_ids': [(4, line.id)], } return data diff --git a/rma_account/views/invoice_view.xml b/rma_account/views/invoice_view.xml index e984b90e..e1f19fdc 100644 --- a/rma_account/views/invoice_view.xml +++ b/rma_account/views/invoice_view.xml @@ -70,8 +70,8 @@ domain="[('type', '=', 'supplier'), ('partner_id', '=', partner_id)]" attrs="{'readonly': [('state','not in',['draft'])], - 'invisible': ['|', ('state', '=', 'done'), - ('type', '=', 'in_invoice')]}" class="oe_edit_only" + 'invisible': ['|', ('state', '=', 'paid'), + ('type', '=', 'out_invoice')]}" class="oe_edit_only" options="{'no_create': True}"/> @@ -88,8 +88,8 @@ domain="[('type', '=', 'customer'), ('partner_id', '=', partner_id)]" attrs="{'readonly': [('state','not in',['draft'])], - 'invisible': ['|', ('state', '=', 'done'), - ('type', '=', 'out_invoice')]}" class="oe_edit_only" + 'invisible': ['|', ('state', '=', 'paid'), + ('type', '=', 'in_invoice')]}" class="oe_edit_only" options="{'no_create': True}"/>