Files
enterprise-addons/hr_contract_salary/views/hr_employee_views.xml
T

88 lines
5.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_contract_salary_view_employee_form" model="ir.ui.view">
<field name="name">hr.employee.form.inherit.contract_salary</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='wage']" position="attributes">
<attribute name="invisible">holidays != 0.0</attribute>
</xpath>
<xpath expr="//div[@name='wage']" position="attributes">
<attribute name="invisible">holidays != 0.0</attribute>
</xpath>
<xpath expr="//div[@name='wage']" position="after">
<label name="label_wage_with_holidays" for="wage_with_holidays" invisible="holidays == 0.0"/>
<div class="o_row" name="div_wage_with_holidays" invisible="holidays == 0.0">
<field name="wage_with_holidays" class="o_hr_narrow_field"/>
<span>/ month</span>
</div>
</xpath>
<button name="action_open_versions" position="before">
<button name="action_show_contract_reviews" class="oe_stat_button" icon="fa-book" type="object" help="Contracts Reviews" invisible="not employee_id or contract_reviews_count == 0">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="contract_reviews_count"/></span>
<span class="o_stat_text">Reviews</span>
</div>
</button>
<button name="action_generate_offer" string="Offers" class="oe_stat_button" icon="fa-handshake-o" type="object" help="Generate Offer"
invisible="current_date_version &gt; date_version or salary_offers_count > 0" groups="hr.group_hr_manager" >
<div class="o_field_widget o_stat_info ms-1">
<span class="o_stat_value">New</span>
<span class="o_stat_text">Offers</span>
</div>
</button>
<button name="action_show_offers" string="Offers" class="oe_stat_button" icon="fa-handshake-o" type="object" help="Sent Offers"
invisible="salary_offers_count == 0" groups="hr.group_hr_manager">
<div class="o_field_widget o_stat_info ms-1">
<span class="o_stat_value"><field name="salary_offers_count"/></span>
<span class="o_stat_text">Offers</span>
</div>
</button>
</button>
<header position="inside">
<field name="current_date_version" invisible="1"/>
</header>
<group name="contract" position="inside">
<field name="originated_offer_id" readonly="1" invisible="not originated_offer_id"/>
</group>
<separator name="schedule" position="before">
<separator name="employer_costs" string="Employer Costs"/>
<label name="final_yearly_costs" for="final_yearly_costs"/>
<div name="final_yearly_costs" class="o_row">
<field name="final_yearly_costs" class="o_hr_narrow_field"/>
<span>/ year</span>
</div>
<label name="monthly_yearly_costs" for="monthly_yearly_costs"/>
<div name="monthly_yearly_costs" class="o_row">
<field name="monthly_yearly_costs" class="o_hr_narrow_field text-muted"/>
<span class="mb-3 text-muted">/ month</span>
</div>
<label name="wage_on_signature" for="wage_on_signature"/>
<div name="wage_on_signature" class="o_row">
<field class="o_hr_narrow_field" name="wage_on_signature"/>
<div name="wage_on_signature_period_label">/ month</div>
</div>
</separator>
</field>
</record>
<record id="hr_contract_salary_view_employee_form_readonly" model="ir.ui.view">
<field name="name">hr.employee.form.inherit.contract_salary.readonly</field>
<field name="model">hr.employee</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="replace"/>
<xpath expr="//form/*[1]" position="before">
<div role="alert" class="alert alert-warning text-center">
This is a partially-signed contract.
</div>
</xpath>
<xpath expr="//chatter" position="replace"/>
<xpath expr="//widget[@name='web_ribbon']" position="replace">
<widget name="web_ribbon" title="Draft" bg_color="text-bg-info" groups="hr.group_hr_user"/>
</xpath>
</field>
</record>
</odoo>