From d7fe7fd8f01e563c9688ad3469dc96876f333b05 Mon Sep 17 00:00:00 2001 From: "Pierrot (prro)" Date: Fri, 3 Jun 2022 09:03:57 +0000 Subject: [PATCH] [IMP] account: improve Journal Items UX Improvements to the Journal Items list view: - readonly set on multiple fields - hide/optional show by default on multiple fields - "Tax Grid" string set on tax_tag_ids for more clarity - Added multiple fields to the "simple" list view for more consistency with the grouped list view - Added an edit button on some "group by" lines to edit the corresponding field - Removed the Revert and Duplicate button from the "grouped by" view (on the group by line) - Added a button to open the corresponding Journal Entry, and removed the Journal Item form access. The Journal Item form should not be accessible anymore. - Show the total sum for Balance - Added the "Tax Grid" group by task-2855459 Part-of: odoo/odoo#92852 --- addons/account/models/account_move.py | 10 ++++ addons/account/views/account_move_views.xml | 54 +++++++++++++++------ 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index f3bdbaa0240..fe03b179b2a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -5719,6 +5719,16 @@ class AccountMoveLine(models.Model): action['domain'] = [('id', 'in', ids)] return action + def open_move(self): + return { + 'type': 'ir.actions.act_window', + 'res_model': 'account.move', + 'view_mode': 'form', + 'res_id': self.move_id.id, + 'views': [(False, 'form')], + } + + def action_automatic_entry(self): action = self.env['ir.actions.act_window']._for_xml_id('account.account_automatic_entry_wizard_action') # Force the values of the move line in the context to avoid issues diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 472bbeda5bb..35170fdb06d 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -150,9 +150,9 @@ account.move.line - - - + + + @@ -161,19 +161,41 @@ - - - - - + + + + + - - + + + + + +