From 41b39f2a5706fa05260940c5196a776443211ee2 Mon Sep 17 00:00:00 2001 From: "Maximilien (malb)" Date: Wed, 29 Mar 2023 11:55:12 +0000 Subject: [PATCH] [IMP] hr_expense: adding tooltip Before this PR, the field tax_ids had no tooltip. Since v16 we now allow the use of all taxes in the expenses module now. But, there is not much mention that price-excluded taxes will be used as price-included taxes. In the release notes it just mentions that all taxes are usable, but there is no mention of anything else. This seems a bit confusing. Adding the tooltip will help users. Also adding fresh exported .pot closes odoo/odoo#117351 Task-id: 3252757 X-original-commit: df28d24699a6bfb4ea142fc07b10c1835d9d4323 Signed-off-by: Nicolas Viseur (vin) Signed-off-by: Maximilien La Barre (malb) --- addons/hr_expense/i18n/hr_expense.pot | 11 +++++++++-- addons/hr_expense/models/hr_expense.py | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/hr_expense/i18n/hr_expense.pot b/addons/hr_expense/i18n/hr_expense.pot index 74b4abbe600..41978418dca 100644 --- a/addons/hr_expense/i18n/hr_expense.pot +++ b/addons/hr_expense/i18n/hr_expense.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~16.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-17 08:00+0000\n" -"PO-Revision-Date: 2023-01-17 08:00+0000\n" +"POT-Creation-Date: 2023-03-30 07:14+0000\n" +"PO-Revision-Date: 2023-03-30 07:14+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -303,6 +303,13 @@ msgstr "" msgid "Bill Reference" msgstr "" +#. module: hr_expense +#: model:ir.model.fields,help:hr_expense.field_hr_expense__tax_ids +msgid "" +"Both price-included and price-excluded taxes will behave as price-included " +"taxes for expenses." +msgstr "" + #. module: hr_expense #: model:ir.model.fields,field_description:hr_expense.field_hr_expense_sheet__can_approve msgid "Can Approve" diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 7a4ac45db61..68f6c149eef 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -69,7 +69,8 @@ class HrExpense(models.Model): quantity = fields.Float(required=True, states={'done': [('readonly', True)]}, digits='Product Unit of Measure', default=1) tax_ids = fields.Many2many('account.tax', 'expense_tax', 'expense_id', 'tax_id', compute='_compute_from_product_id_company_id', store=True, readonly=False, precompute=True, - domain="[('company_id', '=', company_id), ('type_tax_use', '=', 'purchase')]", string='Included taxes') + domain="[('company_id', '=', company_id), ('type_tax_use', '=', 'purchase')]", string='Included taxes', + help="Both price-included and price-excluded taxes will behave as price-included taxes for expenses.") amount_tax = fields.Monetary(string='Tax amount in Currency', help="Tax amount in currency", compute='_compute_amount_tax', store=True, currency_field='currency_id') amount_tax_company = fields.Monetary('Tax amount', help="Tax amount in company currency", compute='_compute_total_amount_company', store=True, currency_field='company_currency_id') amount_residual = fields.Monetary(string='Amount Due', compute='_compute_amount_residual')