From 3cfd6a90c898731f3cd0f9c10cab3cd73c21f904 Mon Sep 17 00:00:00 2001 From: Jugurtha Date: Tue, 4 Nov 2025 15:11:22 +0100 Subject: [PATCH] [IMP] account: add sent status column and filters on invoice list To improve traceability for users, it is now necessary to easily see which invoices have been sent, especially with the rise of electronic invoicing. This commit adds the 'sent' status as an optional column in the invoice list view. It also introduces two new search filters: 'Sent Invoices' and 'Not Sent Invoices' to quickly track documents that need to be dispatched. task-5231314 --- addons/account/models/account_move.py | 11 +++++++++++ addons/account/views/account_move_views.xml | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 16992bfcde100..d0c117cfab6ca 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -340,6 +340,12 @@ def _sequence_year_range_monthly_regex(self): copy=False, domain=[('display_type', 'in', ('product', 'line_section', 'line_note'))], ) + invoice_sent_status = fields.Selection( + selection=[('sent', "Sent"), ('not_sent', "Not sent")], + compute='_compute_is_sent', + copy=False, + store=True + ) # === Date fields === # invoice_date = fields.Date( @@ -781,6 +787,11 @@ def _compute_invoice_default_sale_person(self): else: move.invoice_user_id = False + @api.depends('is_move_sent') + def _compute_is_sent(self): + for move in self: + move.invoice_sent_status = 'sent' if move.is_move_sent else 'not_sent' + @api.depends('sending_data') def _compute_is_being_sent(self): for move in self: diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 943748227126e..7077421b11b68 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -549,6 +549,7 @@ invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" optional="show" /> + @@ -1594,6 +1595,15 @@ + + +