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

390 lines
25 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hr_employee_view_form" model="ir.ui.view">
<field name="name">hr.employee.view.form.inherit.l10n.ch.hr.payroll</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_payroll.payroll_hr_employee_view_form"/>
<field name="arch" type="xml">
<group name="hr_birth_group" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</group>
<group name="citizenship" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</group>
<group name="hr_location_group" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</group>
<group name="hr_family_group" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</group>
<group name="hr_education_group" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</group>
<page name="payroll_information" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</page>
<page name="salary_attachment" position="attributes">
<attribute name="invisible">country_code == 'CH'</attribute>
</page>
<div name="button_box" position="inside">
<button type="object" name="action_view_wages"
class="oe_stat_button" icon="fa-money" invisible="country_code != 'CH'">
<div class="o_stat_info">
<span class="o_stat_text">
One-time Payments
</span>
<span class="o_stat_value">
<field name="one_time_wage_count"/>
</span>
</div>
</button>
</div>
<group name="hr_birth_group" position="after">
<group string="Birth Information" groups="hr.group_hr_user" invisible="country_code != 'CH'">
<field name="l10n_ch_legal_first_name"/>
<field name="l10n_ch_legal_last_name"/>
<field name="l10n_ch_sv_as_number" placeholder="Unknown"/>
<field name="birthday"/>
<field name="sex"/>
</group>
</group>
<group name="citizenship" position="after">
<group string="Citizenship" groups="hr.group_hr_user" invisible="country_code != 'CH'">
<field name="country_id"/>
<field name="l10n_ch_residence_category" invisible="l10n_ch_country_id_code == 'CH'"/>
<field name="l10n_ch_has_withholding_tax" string="Subject To Source Tax"/>
<field name="l10n_ch_country_id_code" invisible="1"/>
<field name="l10n_ch_no_nationality" invisible="country_id"/>
<field name="l10n_ch_cross_border_commuter"/>
<field name="place_of_birth" invisible="not l10n_ch_cross_border_commuter"/>
<field name="l10n_ch_foreign_tax_id" invisible="not l10n_ch_cross_border_commuter"/>
<field name="l10n_ch_cross_border_start" invisible="not l10n_ch_cross_border_commuter"/>
</group>
</group>
<group name="hr_location_group" position="after">
<group string="Address" groups="hr.group_hr_user" invisible="country_code != 'CH'">
<label for="private_street" string="Private Address"/>
<div class="o_address_format">
<field name="private_street" placeholder="Street..." class="o_address_street"/>
<field name="private_street2" placeholder="Street 2..." class="o_address_street"/>
<field name="private_zip" placeholder="Zip" class="o_address_zip"/>
<field name="private_state_id" class="o_address_state"
placeholder="State"
options="{'no_open': True, 'no_quick_create': True}"
context="{'default_country_id': private_country_id}"/>
<field name="private_city" placeholder="City" class="o_address_city"/>
<field name="private_country_id" placeholder="Country"
class="o_address_country"
options='{"no_open": True, "no_create": True}'/>
</div>
<field name="l10n_ch_canton" string="Residence Canton"/>
<field name="l10n_ch_municipality"
string="Residence Municipality"
invisible="l10n_ch_canton == 'EX'"/>
</group>
<group string="Residency Type" invisible="l10n_ch_canton != 'EX' or not l10n_ch_has_withholding_tax">
<field name="l10n_ch_residence_type" widget="radio" options="{'horizontal': True}" invisible="l10n_ch_canton != 'EX'"/>
<label for="l10n_ch_weekly_residence_address_street" string="Weekly Residence Address"
invisible="l10n_ch_residence_type != 'Weekly' or l10n_ch_canton != 'EX'"/>
<div class="o_address_format"
invisible="l10n_ch_residence_type != 'Weekly' or l10n_ch_canton != 'EX'">
<field name="l10n_ch_weekly_residence_address_street"
placeholder="Street..."
class="o_address_street"/>
<field name="l10n_ch_weekly_residence_address_city"
placeholder="City"
class="o_address_city"/>
<field name="l10n_ch_weekly_residence_address_zip"
placeholder="ZIP"
class="o_address_zip"/>
<span class="o_address_country">Switzerland</span>
</div>
<field name="l10n_ch_weekly_residence_canton"
invisible="l10n_ch_residence_type != 'Weekly' or l10n_ch_canton != 'EX'"/>
<field name="l10n_ch_weekly_residence_municipality"
invisible="l10n_ch_residence_type != 'Weekly' or l10n_ch_canton != 'EX'"/>
</group>
</group>
<group name="hr_family_group" position="after">
<group string="Family" groups="hr.group_hr_user" invisible="country_code != 'CH'">
<field name="marital"/>
<field name="l10n_ch_marital_from"/>
<label string="Children Information" for="l10n_ch_children"/>
<div colspan="2">
<field name="l10n_ch_children" nolabel="1">
<list>
<field name="name" string="First Name"/>
<field name="last_name" string="Last Name"/>
<field name="birthdate" string="Birthdate"/>
<field name="l10n_ch_sv_as_number" string="SV-AS Number"/>
</list>
</field>
</div>
<field name="l10n_ch_concubinage"
invisible="marital in ['married','registered_partnership']
or not l10n_ch_has_withholding_tax
or not children"/>
</group>
<group string="Marriage Partner" invisible="not l10n_ch_has_withholding_tax or marital not in ['married','registered_partnership'] or country_code != 'CH'">
<field name="l10n_ch_spouse_sv_as_number" placeholder="Unknown"/>
<label for="l10n_ch_spouse_first_name" string="Spouse"/>
<div class="o_row">
<field name="l10n_ch_spouse_first_name" placeholder="First Name" nolabel="1"/>
<field name="l10n_ch_spouse_last_name" placeholder="Last Name" nolabel="1"/>
</div>
<field name="l10n_ch_spouse_birthday" string="Birthday"/>
<label for="l10n_ch_spouse_street" string="Private Address"/>
<div class="o_address_format">
<field name="l10n_ch_spouse_street" placeholder="Street..." class="o_address_street"/>
<field name="l10n_ch_spouse_city" placeholder="City" class="o_address_city"/>
<field name="l10n_ch_spouse_zip" placeholder="ZIP" class="o_address_zip"/>
<field name="l10n_ch_spouse_country_id" placeholder="Country"
class="o_address_country"
options='{"no_open": True, "no_create": True}'/>
</div>
<field name="l10n_ch_spouse_residence_canton"/>
<field name="l10n_ch_spouse_revenues"/>
<label for="l10n_ch_spouse_work_start_date"
string="Period"
invisible="not l10n_ch_spouse_revenues"/>
<div class="o_row" invisible="not l10n_ch_spouse_revenues">
<field name="l10n_ch_spouse_work_start_date" placeholder="Start Date" nolabel="1"/>
<field name="l10n_ch_spouse_work_end_date" placeholder="End Date" nolabel="1"/>
</div>
<field name="l10n_ch_spouse_work_canton"
string="Work Canton"
invisible="not l10n_ch_spouse_revenues"/>
</group>
</group>
<group name="hr_education_group" position="after">
<group string="Statistics" groups="hr_payroll.group_hr_payroll_user" invisible="country_code != 'CH'">
<label for="l10n_ch_yearly_holidays"/>
<div class="o_row mw-50 o_hr_narrow_field" name="l10n_ch_yearly_holidays">
<field name="l10n_ch_yearly_holidays" string="Holidays" nolabel="1" help="Number of holidays per year at 100% Occupation Rate"/>
<span>Days / Year</span>
</div>
<label for="l10n_ch_yearly_paid_public_holidays"/>
<div class="o_row mw-50 o_hr_narrow_field" name="l10n_ch_yearly_paid_public_holidays">
<field name="l10n_ch_yearly_paid_public_holidays" string="Public Holidays" nolabel="1"/>
<span>Days / Year</span>
</div>
<field name="certificate" string="Study Level"/>
<field name="l10n_ch_job_type"/>
<field name="l10n_ch_flex_profiling"/>
<field name="l10n_ch_permanent_staff_public_admin"/>
<field name="l10n_ch_interim_worker"/>
</group>
</group>
<page name="payroll_information" position="after">
<page string="Payroll" groups="hr_payroll.group_hr_payroll_user" invisible="country_code != 'CH'">
<group>
<group name="contract" groups="hr.group_hr_user" style="padding-top: 20px;">
<div colspan="2" class="row">
<span class="col-8 text-uppercase fw-bolder small"> Contract Overview </span>
<button name="%(hr.hr_version_wizard_action)d" type="action" string="Load a Template"
class="btn btn-link col-4 p-0 w-max text-end"/>
<div class="w-100 border-top border-1 border-secondary mt-0 mb-3"></div>
</div>
<field name="l10n_ch_location_unit_id" string="Workplace" options="{'no_quick_create': True}"/>
<field name="registration_number" string="Employee Reference"/>
<field name="lang" string="Payslip Language" placeholder="User Language"/>
<label for="contract_date_start" string="Contract"/>
<div class="o_row" name="contract_dates">
<field name="contract_date_start" string="Start Date" placeholder="Not Employed" class="o_hr_narrow_field me-3"/>to
<field name="contract_date_end" string="End Date" placeholder="Indefinite"
class="o_hr_narrow_field ms-3" invisible="not contract_date_start"/>
<widget name="button_new_contract"/>
</div>
<field name="contract_type_id" string="Contract Type" placeholder="Contract Type"/>
<field name="structure_type_id" string="Pay Category" placeholder="Employee will be excluded from Pay Runs"
domain="['|', ('country_id', '=', False), ('country_id', '=', company_country_id)]"/>
<field name="l10n_ch_contractual_annual_wage" invisible="wage_type != 'NoTimeConstraint'"/>
<separator string="Schedule"/>
<field name="resource_calendar_id"
groups="hr.group_hr_manager"
help="The default working hours are set in configuration."/>
<field name="resource_calendar_id"
groups="!hr.group_hr_manager,hr_payroll.group_hr_payroll_user"
options="{'no_create': True, 'no_open': True}"
help="The default working hours are set in configuration."/>
<field name="tz" required="id"/>
<field name="irregular_working_time"/>
<field name="l10n_ch_current_occupation_rate" invisible="irregular_working_time"/>
<field name="l10n_ch_weekly_hours" invisible="irregular_working_time"/>
<field name="l10n_ch_weekly_lessons" invisible="irregular_working_time"/>
</group>
<group string="Wages">
<label for="l10n_ch_has_monthly"/>
<div class="o_row mw-50" name="wage">
<field name="l10n_ch_has_monthly"/>
<field name="wage" class="oe_inline o_hr_narrow_field" readonly="not l10n_ch_has_monthly" nolabel="1"/>
<div class="mb-3 text-muted">/ month</div>
</div>
<label for="l10n_ch_has_hourly"/>
<div class="o_row mw-50" name="hourly_wage">
<field name="l10n_ch_has_hourly"/>
<field name="hourly_wage" class="oe_inline o_hr_narrow_field" readonly="not l10n_ch_has_hourly" nolabel="1"/>
<div class="mb-3 text-muted">/ Hour</div>
</div>
<label for="l10n_ch_has_lesson"/>
<div class="o_row mw-50" name="lesson_wage">
<field name="l10n_ch_has_lesson"/>
<field name="l10n_ch_lesson_wage" class="oe_inline o_hr_narrow_field" readonly="not l10n_ch_has_lesson" nolabel="1"/>
<div class="mb-3 text-muted">/ Lesson</div>
</div>
<label for="l10n_ch_contractual_holidays_rate" invisible="not l10n_ch_has_hourly and not l10n_ch_has_lesson"/>
<div class="o_row mw-50 o_hr_narrow_field" name="l10n_ch_contractual_holidays_rate" invisible="not l10n_ch_has_hourly and not l10n_ch_has_lesson">
<field name="l10n_ch_contractual_holidays_rate" nolabel="1"/>
<span>%</span>
</div>
<label for="l10n_ch_contractual_public_holidays_rate" invisible="not l10n_ch_has_hourly and not l10n_ch_has_lesson"/>
<div class="o_row mw-50 o_hr_narrow_field" name="l10n_ch_contractual_public_holidays_rate" invisible="not l10n_ch_has_hourly and not l10n_ch_has_lesson">
<field name="l10n_ch_contractual_public_holidays_rate" nolabel="1"/>
<span>%</span>
</div>
<field name="l10n_ch_contractual_vacation_pay" invisible="not l10n_ch_has_hourly and not l10n_ch_has_lesson"/>
<field name="l10n_ch_thirteen_month" widget="boolean_toggle" string="13th Month"/>
<field name="l10n_ch_14th_month" widget="boolean_toggle" string="14th Month"/>
<label for="l10n_ch_contractual_13th_month_rate" invisible="not l10n_ch_thirteen_month"/>
<div class="o_row mw-50 o_hr_narrow_field" name="l10n_ch_contractual_13th_month_rate" invisible="not l10n_ch_thirteen_month">
<field name="l10n_ch_contractual_13th_month_rate" string="Contractual Rate" nolabel="1"/>
<span>%</span>
</div>
</group>
</group>
<group string="Monthly Wage Types">
<field name="l10n_ch_contract_wage_ids" nolabel="1" colspan="4">
<list editable="bottom">
<field name="input_type_id" options="{'no_create': True, 'no_open': True}"/>
<field name="description"/>
<field name="amount"/>
<field name="uom"/>
</list>
</field>
</group>
</page>
<page string="Insurances" invisible="country_code != 'CH'" groups="hr_payroll.group_hr_payroll_user">
<group>
<group string="Social Insurance">
<field name="l10n_ch_social_insurance_id" options="{'no_create': True, 'no_open': True}"/>
<field name="l10n_ch_avs_status"/>
</group>
<group string="Compensation Fund">
<field name="l10n_ch_compensation_fund_id" string="Compensation Fund" options="{'no_create': True, 'no_open': True}"/>
</group>
<group string="Accident Insurance">
<field name="l10n_ch_laa_group" string="LAA Group" options="{'no_create': True, 'no_open': True}"/>
<field name="laa_solution_number" string="LAA Solution" widget="radio"/>
</group>
<group string="Additional Insurances">
<field name="l10n_ch_additional_accident_insurance_line_ids" widget="many2many_tags" options="{'no_create':True}"/>
<field name="l10n_ch_sickness_insurance_line_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}"/>
</group>
</group>
<group string="LPP">
<group colspan="4">
<group string="LPP Status">
<field name="l10n_ch_lpp_not_insured"/>
<field name="l10n_ch_lpp_insurance_id" invisible="l10n_ch_lpp_not_insured" options="{'no_create': True, 'no_open': True}"/>
<field name="l10n_ch_lpp_entry_valid_as_of" invisible="not l10n_ch_lpp_insurance_id or l10n_ch_lpp_not_insured"/>
<field name="l10n_ch_lpp_entry_reason" invisible="not l10n_ch_lpp_insurance_id or l10n_ch_lpp_not_insured"/>
<field name="l10n_ch_lpp_withdrawal_reason" invisible="not l10n_ch_lpp_not_insured or not l10n_ch_lpp_insurance_id"/>
<field name="l10n_ch_lpp_withdrawal_valid_as_of" invisible="not l10n_ch_lpp_not_insured or not l10n_ch_lpp_insurance_id"/>
<field name="l10n_ch_lpp_solutions" invisible="not l10n_ch_lpp_insurance_id or l10n_ch_lpp_not_insured" widget="many2many_tags" options="{'no_create':True}"/>
</group>
<group string="Contributions" invisible="not l10n_ch_lpp_insurance_id or l10n_ch_lpp_not_insured">
<label for="lpp_employee_amount"/>
<div class="o_row mw-50" name="lpp_employee_amount">
<field name="lpp_employee_amount" required="l10n_ch_lpp_solutions" class="o_hr_narrow_field" nolabel="1"/>
<span>CHF / Month</span>
</div>
<label for="lpp_company_amount"/>
<div class="o_row mw-50" name="lpp_company_amount">
<field name="lpp_company_amount" required="l10n_ch_lpp_solutions" class="o_hr_narrow_field" nolabel="1"/>
<span>CHF / Month</span>
</div>
</group>
<group string="Mutations" invisible="not l10n_ch_lpp_insurance_id or l10n_ch_lpp_not_insured">
<field name="l10n_ch_lpp_mutations" nolabel="1" colspan="4">
<list editable="bottom">
<field name="reason"/>
<field name="valid_as_of"/>
</list>
</field>
</group>
</group>
</group>
</page>
<page string="Source-tax" invisible="not l10n_ch_has_withholding_tax or country_code != 'CH'" groups="hr_payroll.group_hr_payroll_user">
<group>
<group string="Tax Scale">
<field name="l10n_ch_tax_scale_type" widget="radio"/>
<field name="l10n_ch_tax_scale" invisible="l10n_ch_tax_scale_type != 'TaxAtSourceCode'"/>
<field name="children" string="Eligible Children Deduction"/>
<field name="l10n_ch_church_tax" invisible="l10n_ch_tax_scale_type != 'TaxAtSourceCode'"/>
<field name="l10n_ch_pre_defined_tax_scale" invisible="l10n_ch_tax_scale_type != 'CategoryPredefined'"/>
<field name="l10n_ch_open_tax_scale" invisible="l10n_ch_tax_scale_type != 'CategoryOpen'"/>
<field name="l10n_ch_tax_specially_approved"/>
<field name="l10n_ch_tax_code"/>
<field name="l10n_ch_source_tax_canton"/>
<field name="l10n_ch_source_tax_municipality"/>
</group>
<group string="Additional Informations">
<field name="l10n_ch_religious_denomination"/>
<label for="l10n_ch_working_days_in_ch"/>
<div class="o_row mw-50" name="l10n_ch_working_days_in_ch">
<field name="l10n_ch_working_days_in_ch" nolabel="1"/>
<span>/ 20 Days per Month</span>
</div>
<field name="l10n_ch_other_employment"/>
<field name="l10n_ch_total_activity_type" invisible="not l10n_ch_other_employment"/>
<label for="l10n_ch_other_activity_gross"
invisible="l10n_ch_total_activity_type != 'gross' or not l10n_ch_other_employment"/>
<div class="o_row mw-50" name="l10n_ch_other_activity_gross"
invisible="l10n_ch_total_activity_type != 'gross' or not l10n_ch_other_employment">
<field name="l10n_ch_other_activity_gross" nolabel="1"/>
<span>CHF / Month</span>
</div>
<label for="l10n_ch_other_activity_percentage"
invisible="l10n_ch_total_activity_type != 'percentage' or not l10n_ch_other_employment"/>
<div class="o_row mw-50" name="l10n_ch_other_activity_percentage"
invisible="l10n_ch_total_activity_type != 'percentage' or not l10n_ch_other_employment">
<field name="l10n_ch_other_activity_percentage" nolabel="1"/>
<span>%</span>
</div>
</group>
</group>
<group string="Source Tax Entry / Withdrawal / Mutations"
invisible="not l10n_ch_is_mutations and not l10n_ch_has_withholding_tax" groups="hr_payroll.group_hr_payroll_user">
<field name="l10n_ch_is_mutations" nolabel="1" colspan="2">
<list editable="bottom">
<field name="reason" required="1"/>
<field name="qst_canton" required="1"/>
<field name="qst_municipality" required="1"/>
<field name="valid_as_of" required="1"/>
</list>
</field>
</group>
</page>
<page string="Wage Statement" invisible="country_code != 'CH'" groups="hr_payroll.group_hr_payroll_user">
<field name="l10n_ch_salary_certificate_profiles">
<list>
<field name="l10n_ch_certificate_type"/>
<field name="valid_from"/>
</list>
</field>
</page>
</page>
</field>
</record>
</odoo>