From 28f3d9154c563f00168ade0bb4a11d91c865f870 Mon Sep 17 00:00:00 2001 From: Jugurtha Date: Tue, 4 Nov 2025 10:34:45 +0100 Subject: [PATCH] [IMP] account: use PAY/XXX prefix for grouped payment memos When creating a payment group, the generated memo previously used the 'BATCH/XXX' sequence prefix. This naming was confusing because 'Batch Payment' is an existing and separate feature in Odoo. To avoid this ambiguity and align the naming convention, this commit changes the memo prefix for all grouped payments to use the generic 'PAY/XXX'. task-5231310 --- 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'), [