From c0f94df3f04e208d87b5ccc0d1ecd921527191d4 Mon Sep 17 00:00:00 2001 From: yagho-odoo Date: Tue, 4 Nov 2025 11:02:27 +0100 Subject: [PATCH] [IMP] account: changed prefix of memo in group payments When creating a payment group, the payment memo uses BATCH/XXX as a prefix, since we already have a batch payment feature that is not realted to the payment group, it can be confusing, so now its changed to use the PAY/XXX prefix instead. task id: 5231296 --- addons/account/models/company.py | 2 +- addons/account/tests/test_account_payment_register.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/models/company.py b/addons/account/models/company.py index fd3d289aa7b52..b54c97ce34c26 100644 --- a/addons/account/models/company.py +++ b/addons/account/models/company.py @@ -164,7 +164,7 @@ class ResCompany(models.Model): 'padding': 5, 'use_date_range': True, 'company_id': self.id, - 'prefix': 'BATCH/%(year)s/', + 'prefix': 'PAY/%(year)s/', }), ) diff --git a/addons/account/tests/test_account_payment_register.py b/addons/account/tests/test_account_payment_register.py index 71731d5e27fcf..c46e9f47f2a9a 100644 --- a/addons/account/tests/test_account_payment_register.py +++ b/addons/account/tests/test_account_payment_register.py @@ -204,7 +204,7 @@ def test_register_payment_single_batch_grouped_keep_open_lower_amount(self): })._create_payments() self.assertRecordValues(payments, [{ - 'memo': Like(f'BATCH/{self.current_year}/...'), + 'memo': Like(f'PAY/{self.current_year}/...'), 'payment_method_line_id': self.inbound_payment_method_line.id, }]) self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [ @@ -237,7 +237,7 @@ def test_register_payment_single_batch_grouped_keep_open_higher_amount(self): })._create_payments() self.assertRecordValues(payments, [{ - 'memo': Like(f'BATCH/{self.current_year}/...'), + 'memo': Like(f'PAY/{self.current_year}/...'), 'payment_method_line_id': self.inbound_payment_method_line.id, }]) self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [ @@ -272,7 +272,7 @@ def test_register_payment_single_batch_grouped_writeoff_lower_amount_debit(self) })._create_payments() self.assertRecordValues(payments, [{ - 'memo': Like(f'BATCH/{self.current_year}/...'), + 'memo': Like(f'PAY/{self.current_year}/...'), 'payment_method_line_id': self.inbound_payment_method_line.id, }]) self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [ @@ -315,7 +315,7 @@ def test_register_payment_single_batch_grouped_writeoff_higher_amount_debit(self })._create_payments() self.assertRecordValues(payments, [{ - 'memo': Like(f'BATCH/{self.current_year}/...'), + 'memo': Like(f'PAY/{self.current_year}/...'), 'payment_method_line_id': self.inbound_payment_method_line.id, }]) self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [