mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX]set the analytic account to PO from RMA
This commit is contained in:
committed by
Aaron ForgeFlow
parent
59a7d770ba
commit
0758edcbb6
@@ -13,3 +13,15 @@ class RmaAddPurchase(models.TransientModel):
|
||||
data = super(RmaAddPurchase, self)._prepare_rma_line_from_po_line(line)
|
||||
data.update(analytic_account_id=line.analytic_account_id.id)
|
||||
return data
|
||||
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user