diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 914927b894ff8..a4c826dddb370 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -608,14 +608,6 @@ def _sequence_year_range_monthly_regex(self):
compute='_compute_is_being_sent'
)
- move_sent_values = fields.Selection(
- selection=[
- ('sent', 'Sent'),
- ('not_sent', 'Not Sent'),
- ],
- string='Sent',
- compute='compute_move_sent_values',
- )
invoice_user_id = fields.Many2one(
string='Salesperson',
comodel_name='res.users',
@@ -783,11 +775,6 @@ def _compute_is_being_sent(self):
for move in self:
move.is_being_sent = bool(move.sending_data)
- @api.depends('is_move_sent')
- def compute_move_sent_values(self):
- for move in self:
- move.move_sent_values = 'sent' if move.is_move_sent else 'not_sent'
-
def _compute_payment_reference(self):
for move in self.filtered(lambda m: (
m.state == 'posted'
diff --git a/addons/account/models/company.py b/addons/account/models/company.py
index 75d7d7dc8f259..43d0aef75a7b9 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/',
}),
)
@@ -273,7 +273,7 @@ class ResCompany(models.Model):
def get_next_batch_payment_communication(self):
'''
When in need of a batch payment communication reference (several invoices paid at the same time)
- use batch_payment_sequence_id to get it (eventually create it first): e.g BATCH/2024/00001
+ use batch_payment_sequence_id to get it (eventually create it first): e.g PAY/2024/00001
'''
self.ensure_one()
return self.sudo().batch_payment_sequence_id.next_by_id()
diff --git a/addons/account/tests/test_account_payment_register.py b/addons/account/tests/test_account_payment_register.py
index 0cd96db6a707f..4e2e519fc778e 100644
--- a/addons/account/tests/test_account_payment_register.py
+++ b/addons/account/tests/test_account_payment_register.py
@@ -202,7 +202,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'), [
@@ -235,7 +235,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'), [
@@ -270,7 +270,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'), [
@@ -313,7 +313,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'), [
@@ -356,7 +356,7 @@ def test_register_payment_single_batch_grouped_writeoff_lower_amount_credit(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.outbound_payment_method_line.id,
}])
self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [
@@ -399,7 +399,7 @@ def test_register_payment_single_batch_grouped_writeoff_higher_amount_credit(sel
})._create_payments()
self.assertRecordValues(payments, [{
- 'memo': Like(f'BATCH/{self.current_year}/...'),
+ 'memo': Like(f'PAY/{self.current_year}/...'),
'payment_method_line_id': self.outbound_payment_method_line.id,
}])
self.assertRecordValues(payments.move_id.line_ids.sorted('balance'), [
@@ -555,7 +555,7 @@ def test_register_payment_single_batch_grouped_with_credit_note(self):
self.assertRecordValues(payments, [
{
- 'memo': Like(f'BATCH/{self.current_year}/...'),
+ 'memo': Like(f'PAY/{self.current_year}/...'),
'payment_method_line_id': self.outbound_payment_method_line.id,
},
])
@@ -676,7 +676,7 @@ def test_register_payment_multi_batches_grouped(self):
self.assertRecordValues(payments, [
{
- 'memo': Like(f'BATCH/{self.current_year}/...'),
+ 'memo': Like(f'PAY/{self.current_year}/...'),
'payment_method_line_id': self.outbound_payment_method_line.id,
},
{
@@ -1747,7 +1747,7 @@ def test_installment_mode_multiple_batches(self):
'installments_mode': 'next',
'installments_switch_amount': 1333.33,
'currency_id': self.company.currency_id.id, # Different currencies, so we get the company's one
- 'communication': Like(f'BATCH/{self.current_year}/...'),
+ 'communication': Like(f'PAY/{self.current_year}/...'),
}])
wizard = self.env['account.payment.register'].with_context(
@@ -1784,7 +1784,7 @@ def test_installment_mode_multiple_batches(self):
'payment_difference': 0.5,
'installments_mode': 'next',
'installments_switch_amount': 357.83, # 24.5 for in_invoice_epd_applied + 1000 / 3 (rate) for the second
- 'communication': Like(f'BATCH/{self.current_year}/...'),
+ 'communication': Like(f'PAY/{self.current_year}/...'),
}])
# Clicking on the button to full gets the amount from js, so we need to put it by hand here
@@ -1798,7 +1798,7 @@ def test_installment_mode_multiple_batches(self):
'payment_difference': 0.5,
'installments_mode': 'full',
'installments_switch_amount': 57.83, # The previous 'next' amount
- 'communication': Like(f'BATCH/{self.current_year}/...'),
+ 'communication': Like(f'PAY/{self.current_year}/...'),
}])
def test_payment_register_with_next_payment_date(self):
diff --git a/addons/account/views/account_menuitem.xml b/addons/account/views/account_menuitem.xml
index 192a8c00a3533..443c16484995f 100644
--- a/addons/account/views/account_menuitem.xml
+++ b/addons/account/views/account_menuitem.xml
@@ -26,7 +26,7 @@