From a25648d6ee81e6dad6820a49b8990e0a3e1269fe Mon Sep 17 00:00:00 2001 From: shzi-odoo Date: Mon, 7 Jul 2025 16:21:07 +0200 Subject: [PATCH] [IMP] account: add invoice sent status column and filter Improved the invoice list view by adding a new column indicating whether each invoice has been sent. This gives users better visibility into communication status at a glance. Also introduced a filter to allow users to easily search for sent or unsent invoices, improving usability during follow-up or audit tasks. task-4908852 --- addons/account/models/account_move.py | 14 +++++++++++++- addons/account/views/account_move_views.xml | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index a4c826dddb370..bd8b8ed85b0a4 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -605,7 +605,14 @@ def _sequence_year_range_monthly_regex(self): ) is_being_sent = fields.Boolean( help="Is the move being sent asynchronously", - compute='_compute_is_being_sent' + compute='_compute_is_being_sent', + ) + send_status_display = fields.Selection( + selection=[ + ('sent', 'Sent'), + ('not_sent', 'Not Sent'), + ], + compute='_compute_send_status_display' ) invoice_user_id = fields.Many2one( @@ -774,6 +781,11 @@ def _compute_invoice_default_sale_person(self): 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_send_status_display(self): + for move in self: + move.send_status_display = 'sent' if move.is_move_sent else 'not_sent' def _compute_payment_reference(self): for move in self.filtered(lambda m: ( diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 5ed5e8aa6eaeb..5bdaa9924cfc8 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -548,6 +548,14 @@ invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" optional="show" /> + @@ -1581,8 +1589,13 @@ +