From 7841120c92c91c53563c7db6d2bb175aa3e48d0d Mon Sep 17 00:00:00 2001 From: Bhavesh Odedra Date: Wed, 25 Jul 2018 17:35:33 +0530 Subject: [PATCH] [FIX] issue of 'Add from RMA Line' in Customer/Vendor invoice --- rma_account/models/invoice.py | 1 - rma_account/views/invoice_view.xml | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) 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}"/>