From 60de458a8a11754d8aeacc7cb3ce279d988a4337 Mon Sep 17 00:00:00 2001 From: Wajih-Wanis Date: Tue, 4 Nov 2025 14:17:20 +0100 Subject: [PATCH] [IMP] account: added sent status filter and list view At the current version the user is not able to see invoice status in list view, and is also not able to filter invoices based on their status, thus the change in the invoice list view filters to enable the user to perform those operations. task: 5231339 --- addons/account/models/account_move.py | 12 ++++++++++++ addons/account/views/account_move_views.xml | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 16992bfcde100..c493e390dcc42 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -614,6 +614,13 @@ 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_selection = fields.Selection( + selection=[ + ('sent', 'Sent'), + ('not_sent', 'Not Sent'), + ], + compute='compute_move_sent_selection', + ) is_being_sent = fields.Boolean( help="Is the move being sent asynchronously", compute='_compute_is_being_sent' @@ -848,6 +855,11 @@ def _get_valid_journal_types(self): elif self.origin_payment_id or self.statement_line_id or self.env.context.get('is_payment') or self.env.context.get('is_statement_line'): return ['bank', 'cash', 'credit'] return ['general'] + + @api.depends('is_move_sent') + def compute_move_sent_selection(self): + for move in self: + move.move_sent_selection = 'sent' if move.is_move_sent else 'not_sent' def _search_default_journal(self): if self.statement_line_ids.statement_id.journal_id: diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 943748227126e..2561d4621a767 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -549,6 +549,12 @@ invisible="payment_state == 'invoicing_legacy' or move_type == 'entry'" optional="show" /> + @@ -1595,10 +1601,15 @@ groups="account.group_account_secured,base.group_no_one"/> +