The progress bar in the web kanban module uses the option 'title' in order to display the title of the gauge. However, this option is not taken into account when it comes to translation, because the translation of such option is not accessible at the JS level. The fix defines the title of the gauge as the parameter `title` of the widget. Indeed, such a parameter is in the list of parameters translated and made accessible in the JS layer (see variable TRANSLATED_ATTRS in translate.py). With such a modification, the translation is accessible on the node. opw-666577
88 lines
4.2 KiB
XML
88 lines
4.2 KiB
XML
<odoo>
|
|
<!--Hr Department Inherit Kanban view-->
|
|
<record id="hr_department_view_kanban" model="ir.ui.view">
|
|
<field name="name">hr.department.kanban.inherit</field>
|
|
<field name="model">hr.department</field>
|
|
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<xpath expr="//templates" position="before">
|
|
<field name="leave_to_approve_count"/>
|
|
<field name="allocation_to_approve_count"/>
|
|
<field name="total_employee"/>
|
|
<field name="absence_of_today"/>
|
|
</xpath>
|
|
|
|
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="inside">
|
|
<div t-if="record.leave_to_approve_count.raw_value > 0" class="row">
|
|
<div class="col-xs-9">
|
|
<a name="%(hr_holidays_action_request_from_department)d" type="action">
|
|
Leave Requests
|
|
</a>
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<field name="leave_to_approve_count"/>
|
|
</div>
|
|
</div>
|
|
<div t-if="record.allocation_to_approve_count.raw_value > 0" class="row">
|
|
<div class="col-xs-9">
|
|
<a name="%(hr_holidays_action_allocation_from_department)d" type="action">
|
|
Allocation Requests
|
|
</a>
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<field name="allocation_to_approve_count"/>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
|
|
<xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="after">
|
|
<div class="col-xs-12 o_kanban_primary_bottom">
|
|
<field name="absence_of_today" widget="progress" title="Absence" options="{'current_value': 'absence_of_today', 'max_value': 'total_employee', 'editable': false}"/>
|
|
</div>
|
|
</xpath>
|
|
|
|
<xpath expr="//div[contains(@class, 'o_kanban_manage_to_approve')]" position="inside">
|
|
<div class="row">
|
|
<div class="col-xs-12 text-left">
|
|
<a name="%(hr_holidays_action_request_from_department)d" type="action">
|
|
<t t-esc="record.leave_to_approve_count.raw_value or 0"/> Leave Requests
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12 text-left">
|
|
<a name="%(hr_holidays_action_allocation_from_department)d" type="action">
|
|
<t t-esc="record.allocation_to_approve_count.raw_value or 0"/> Allocation Requests
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
|
|
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]" position="inside">
|
|
<div class="row">
|
|
<div class="col-xs-12 text-left">
|
|
<a name="%(action_hr_holidays_leaves_analysis_filtered)d" type="action">
|
|
Leaves
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
|
|
</data>
|
|
</field>
|
|
</record>
|
|
<data noupdate="1">
|
|
<!-- After installation of the module, open the related menu -->
|
|
<record id="action_client_hr_holidays_menu" model="ir.actions.client">
|
|
<field name="name">Open HR Menu</field>
|
|
<field name="tag">reload</field>
|
|
<field name="params" eval="{'menu_id': ref('menu_hr_holidays_root')}"/>
|
|
</record>
|
|
<record id="base.open_menu" model="ir.actions.todo">
|
|
<field name="action_id" ref="action_client_hr_holidays_menu"/>
|
|
<field name="state">open</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |