From 25923e66191ed8f85944183de897c3814ca35ceb Mon Sep 17 00:00:00 2001
From: Antoine Boonen <aboo@odoo.com>
Date: Mon, 4 Sep 2023 15:39:16 +0200
Subject: [PATCH] [IMP] hr_expense: Don't hide taxes on hr.expense when product
 has cost

Problem
---------
In 15, taxes are hidden from hr.expense when the expense category has a
cost. They can however be configured and added. The current behaviour is
counter intuitive.

Objective
---------
Don't hide taxes when product has cost in v15.

Solution
---------
Remove the `hidden` attribute in the expense xml form as well as the
`groups` attribute.

task-3491868

closes odoo/odoo#134147

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
---
 addons/hr_expense/views/hr_expense_views.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml
index a7722e8031ad..875ca06755d6 100644
--- a/addons/hr_expense/views/hr_expense_views.xml
+++ b/addons/hr_expense/views/hr_expense_views.xml
@@ -167,8 +167,8 @@
                                 <field name="total_amount_company" style="vertical-align: top;" widget='monetary' options="{'currency_field': 'company_currency_id'}"/>
                                 <field name="label_convert_rate"/>
                             </div>
-                            <field name="tax_ids" widget="many2many_tags" groups="account.group_account_readonly"
-                                attrs="{'readonly': [('is_editable', '=', False)], 'invisible': [('product_has_cost', '=', True)]}"
+                            <field name="tax_ids" widget="many2many_tags"
+                                attrs="{'readonly': [('is_editable', '=', False)]}"
                                 context="{'default_company_id': company_id, 'default_type_tax_use': 'purchase', 'default_price_include': 1}" placeholder="Included in price taxes" />
                         </group><group>
                             <field name="reference" groups="account.group_account_readonly" attrs="{'readonly': [('is_ref_editable', '=', False)], 'invisible': [('product_has_cost', '=', True)]}"/>
-- 
GitLab