Skip to content

Commit 99ebc61

Browse files
committed
[IMP] account: cange group payments memo to 'PAY'
For the customer invoices, when we want to do a group payment, changing the memo of this group payment to 'PAY' instead of 'BATCH' to avoid the confusion with batch payments. task-5231284
1 parent 9ae5720 commit 99ebc61

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

addons/account/models/company.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class ResCompany(models.Model):
164164
'padding': 5,
165165
'use_date_range': True,
166166
'company_id': self.id,
167-
'prefix': 'BATCH/%(year)s/',
167+
'prefix': 'PAY/%(year)s/',
168168
}),
169169
)
170170

addons/account/tests/test_account_payment_register.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_register_payment_single_batch_grouped_keep_open_lower_amount(self):
204204
})._create_payments()
205205

206206
self.assertRecordValues(payments, [{
207-
'memo': Like(f'BATCH/{self.current_year}/...'),
207+
'memo': Like(f'PAY/{self.current_year}/...'),
208208
'payment_method_line_id': self.inbound_payment_method_line.id,
209209
}])
210210
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):
237237
})._create_payments()
238238

239239
self.assertRecordValues(payments, [{
240-
'memo': Like(f'BATCH/{self.current_year}/...'),
240+
'memo': Like(f'PAY/{self.current_year}/...'),
241241
'payment_method_line_id': self.inbound_payment_method_line.id,
242242
}])
243243
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)
272272
})._create_payments()
273273

274274
self.assertRecordValues(payments, [{
275-
'memo': Like(f'BATCH/{self.current_year}/...'),
275+
'memo': Like(f'PAY/{self.current_year}/...'),
276276
'payment_method_line_id': self.inbound_payment_method_line.id,
277277
}])
278278
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
315315
})._create_payments()
316316

317317
self.assertRecordValues(payments, [{
318-
'memo': Like(f'BATCH/{self.current_year}/...'),
318+
'memo': Like(f'PAY/{self.current_year}/...'),
319319
'payment_method_line_id': self.inbound_payment_method_line.id,
320320
}])
321321
self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [

0 commit comments

Comments
 (0)