From 09d58368cdc1b78d2c71c828670bfce4a0d0cdca Mon Sep 17 00:00:00 2001 From: yagho-odoo Date: Wed, 5 Nov 2025 10:09:35 +0100 Subject: [PATCH] [IMP] account: add a label on the invoice list view to show sending status It would be easier for the user to see which invoices are sent or not in his list view task id: 5231300 --- addons/account/models/account_move.py | 9 +++++++++ addons/account/views/account_move_views.xml | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 16992bfcde100..d997a238b4c2a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -614,6 +614,7 @@ 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.", ) + is_move_sent_label = fields.Char(string="Invoice Sent", compute="_compute_is_move_sent_label") is_being_sent = fields.Boolean( help="Is the move being sent asynchronously", compute='_compute_is_being_sent' @@ -765,6 +766,14 @@ def init(self): # COMPUTE METHODS # ------------------------------------------------------------------------- + @api.depends('is_move_sent') + def _compute_is_move_sent_label(self): + for move in self: + if move.is_move_sent: + move.is_move_sent_label = "Sent" + else: + move.is_move_sent_label = "Not Sent" + @api.depends('move_type', 'partner_id') def _compute_invoice_default_sale_person(self): # We want to modify the sale person only when we don't have one and if the move type corresponds to this condition diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 943748227126e..13b4a38c616fd 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -549,6 +549,13 @@ invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" optional="show" /> +