[14.0][FIX] rma_account: change account in credit notes

This commit is contained in:
Mateu Griful
2021-08-17 13:10:01 +02:00
committed by DavidJForgeFlow
parent 0e50ddd4b0
commit bccdd82be6

View File

@@ -108,9 +108,9 @@ class RmaRefund(models.TransientModel):
def prepare_refund_line(self, item):
accounts = item.product.product_tmpl_id._get_product_accounts()
if item.line_id.type == "customer":
account = accounts["stock_output"]
account = accounts["income"]
else:
account = accounts["stock_input"]
account = accounts["expense"]
if not account:
raise ValidationError(_("Accounts are not configured for this product."))