From 81c311b5d68d1eb8545d4c4d4bff8f5cae92de3d Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Mon, 9 Mar 2026 14:58:59 +0700 Subject: [PATCH] feat: Generate account move line title using account name for non-income accounts in non-sales transactions. --- models/pos_session.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/models/pos_session.py b/models/pos_session.py index 3e343e9..553fc48 100644 --- a/models/pos_session.py +++ b/models/pos_session.py @@ -295,8 +295,16 @@ class PosSession(models.Model): tax_ids = set(tax[0] for tax in tax_keys) if tax_keys else set() applied_taxes = self.env['account.tax'].browse(tax_ids) - title = _('Sales') if sign == 1 else _('Refund') + if sign == 1: + title = _('Sales') + else: + account = self.env['account.account'].browse(account_id) + if account.account_type in ('income', 'income_other'): + title = _('Refund') + else: + title = account.name + # Create name with payment method information if payment_method_name: name = _('%s - %s', title, payment_method_name)