[REF] hr_expense: Replace t-esc by t-out in templates

Due to the deprecation of t-esc to the unique use
of t-out in the rendering template, this replaces
every usage of it and ensures everything continues to
work as intended. Removing deprecation warnings
polluting terminal

deprecation commit: odoo/odoo:9ce5bc8881ae06b613ef61eb07453b224f62bae6

task-3358176

Part-of: odoo/odoo#130244
This commit is contained in:
Julien Alardot (jual)
2023-10-20 23:37:36 +00:00
parent d6f4bbf58c
commit c3166aa1f4
5 changed files with 13 additions and 13 deletions
+5 -5
View File
@@ -2,14 +2,14 @@
<odoo>
<data noupdate="1">
<template id="hr_expense_template_refuse_reason">
<p>Your Expense Report <t t-esc="name"/> has been refused</p>
<p>Your Expense Report <t t-out="name"/> has been refused</p>
<ul class="o_timeline_tracking_value_list">
<li>Reason: <t t-esc="reason"/></li>
<li>Reason: <t t-out="reason"/></li>
</ul>
</template>
<template id="hr_expense_template_register">
<p>Dear <t t-esc="expense.employee_id.name"/>,</p>
<p>Dear <t t-out="expense.employee_id.name"/>,</p>
<p>
Your expense has been successfully registered.
<t t-if="expense.employee_id.user_id">
@@ -17,14 +17,14 @@
</t>
</p>
<p t-if="expense.product_id">
Category: <t t-esc="expense.product_id.name"/>
Category: <t t-out="expense.product_id.name"/>
</p>
<div t-else="">
<p>Category: not found</p>
<p>The first word of the email subject did not correspond to any category code. You'll have to set the category manually on the expense.</p>
</div>
<p>
Price: <t t-esc="expense.unit_amount"/><t t-esc="expense.currency_id.symbol"/>
Price: <t t-out="expense.unit_amount"/><t t-out="expense.currency_id.symbol"/>
</p>
<p t-if="expense.employee_id.user_id">
<br/>
@@ -7,8 +7,8 @@
<t t-set="data" t-value="expense[1]"/>
<div t-attf-class="o_expense_card o_arrow_button flex-grow-1 d-flex flex-column p-3 border-bottom text-center"
t-att-data-tooltip="data['tooltip']">
<span t-esc="renderMonetaryField(data['amount'], data['currency'])" class="h2 m-0 text-odoo"/>
<b class="mx-2" t-esc="data['description']"/>
<span t-out="renderMonetaryField(data['amount'], data['currency'])" class="h2 m-0 text-odoo"/>
<b class="mx-2" t-out="data['description']"/>
</div>
<div t-if="name !== 'approved'" t-attf-class="o_expense_card o_arrow_button flex-grow-1 d-flex flex-column p-3 border-bottom text-center">
<i class="fa fa-angle-right fa-3x"/>
@@ -10,11 +10,11 @@
<div class="row" t-if="dashboard.number_expenses_to_pay">
<div class="col overflow-hidden text-start">
<a type="object" t-if="journal_type == 'purchase'" name="open_expenses_action">
<t t-esc="dashboard.number_expenses_to_pay"/> Expenses to Process
<t t-out="dashboard.number_expenses_to_pay"/> Expenses to Process
</a>
</div>
<div class="col-auto text-end">
<span t-if="journal_type == 'purchase'"><t t-esc="dashboard.sum_expenses_to_pay"/></span>
<span t-if="journal_type == 'purchase'"><t t-out="dashboard.sum_expenses_to_pay"/></span>
</div>
</div>
</xpath>
@@ -14,7 +14,7 @@
<div t-if="record.expense_sheets_to_approve_count.raw_value > 0" class="row ml16" groups="hr_expense.group_hr_expense_team_approver">
<div class="col">
<a name="%(action_hr_expense_sheet_department_to_approve)d" type="action">
<t t-esc="record.expense_sheets_to_approve_count.raw_value"/> Expense Reports
<t t-out="record.expense_sheets_to_approve_count.raw_value"/> Expense Reports
</a>
</div>
</div>
+3 -3
View File
@@ -273,14 +273,14 @@
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-12">
<strong class="o_kanban_record_title"><span><t t-esc="record.name.value"/></span></strong>
<strong class="o_kanban_record_title"><span><t t-out="record.name.value"/></span></strong>
<strong class="o_kanban_record_subtitle float-end"><span class="text-end"><field name="total_amount" widget="monetary"/></span></strong>
</div>
</div>
<div class="row mt8">
<div class="col-6 text-muted">
<field name="employee_id" widget="many2one_avatar_user" options="{'display_avatar_name': True}" readonly="state in ['approved', 'done']"/><br/>
<t t-esc="record.date.value"/>
<t t-out="record.date.value"/>
</div>
<div class="col-6">
<span class="float-end text-end">
@@ -887,7 +887,7 @@
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="row">
<div class="col-12">
<strong class="o_kanban_record_title"><span><t t-esc="record.name.value"/></span></strong>
<strong class="o_kanban_record_title"><span><t t-out="record.name.value"/></span></strong>
<strong class="o_kanban_record_subtitle float-end"><span class="text-end"><field name="total_amount" widget="monetary"/></span></strong>
</div>
</div>