From 23d3bde12784a5b1e6676ee8c4fdca915e948faf Mon Sep 17 00:00:00 2001 From: Aaron Henriquez Date: Thu, 9 May 2019 14:21:57 +0200 Subject: [PATCH] [ADD]rma_purchase_operating_unit [FIX]rma_purchase_analytic --- rma_purchase_analytic/wizards/rma_add_purchase.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rma_purchase_analytic/wizards/rma_add_purchase.py b/rma_purchase_analytic/wizards/rma_add_purchase.py index ca930abea..5a084711e 100644 --- a/rma_purchase_analytic/wizards/rma_add_purchase.py +++ b/rma_purchase_analytic/wizards/rma_add_purchase.py @@ -19,9 +19,8 @@ class RmaLineMakePurchaseOrder(models.TransientModel): _inherit = "rma.order.line.make.purchase.order" _description = "Make Purchases Order from RMA Line" - @api.model def _prepare_purchase_order_line(self, po, item): - res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order_line(po, line) - res['analytic_account_id'] = item.analytic_account_id.id - return vals + res = super(RmaLineMakePurchaseOrder, self)._prepare_purchase_order_line(po, item) + res['analytic_account_id'] = item.line_id.analytic_account_id.id + return res