Merge pull request #170 from ForgeFlow/14.0-fix-rma_account

[14.0][FIX] rma_account: change account in credit notes
This commit is contained in:
MateuGForgeFlow
2021-10-04 11:48:47 +02:00
committed by GitHub

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."))