From 3caafe90c9928c88651ae89d690303e4c1655670 Mon Sep 17 00:00:00 2001 From: Victor Decleire Date: Tue, 4 Nov 2025 10:20:52 +0100 Subject: [PATCH] [IMP] account: change group payments memo to pay/xxxx When making group payments a payment memo is generated with BATCH prefix but it can be confsing as there is a batch payment feature so I changed the prefix to PAY and the tests also accordingly task-5231324 --- 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'), [