diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index a4c826dddb370..54e34f9470966 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -603,6 +603,11 @@ def _sequence_year_range_monthly_regex(self): tracking=True, help="It indicates that the invoice/payment has been sent or the PDF has been generated.", ) + move_sent_status = fields.Selection( + [('sent', 'Sent'), ('not_sent', 'Not Sent')], + string='Move Sent Status', + compute='_compute_move_sent_status' + ) is_being_sent = fields.Boolean( help="Is the move being sent asynchronously", compute='_compute_is_being_sent' @@ -775,6 +780,11 @@ 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_status(self): + for record in self: + record.move_sent_status = 'sent' if record.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/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 5ed5e8aa6eaeb..7e417f035a2d5 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -551,6 +551,13 @@ + @@ -1581,6 +1588,11 @@ +