[IMP] hr(_contract/_timesheet), l10n_be_hr_payroll: Improve the UX of the employee view

This PR adds several UX improvements :
- Timesheet smartbutton : Get weekly view instead of daily
- Attestation (N) : Fix displayed year
- Remove demo profile picture for Marc Demo to allow the new one
- Employee tree view : Allow more flexibility in terms of what you can show and hide on the tree view
task - 3299145

closes odoo/odoo#120659

Related: odoo/enterprise#40766
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Jurgen (jugj)
2023-06-06 14:48:16 +02:00
parent 2eca114f52
commit 3326df49c6
4 changed files with 8 additions and 8 deletions
-2
View File
@@ -323,7 +323,6 @@ If you have development competencies, we can propose you specific traineeships</
<record id="work_contact_qdp" model="res.partner">
<field name="name">Marc Demo</field>
<field name="email">gilles@odoo.com</field>
<field name="image_1920" type="base64" file="hr/static/img/employee_qdp-image.png"/>
</record>
<record id="employee_qdp" model="hr.employee">
@@ -338,7 +337,6 @@ If you have development competencies, we can propose you specific traineeships</
<field name="work_location_id" ref="work_location_1"/>
<field name="work_phone">+3281813700</field>
<field name="work_contact_id" ref="hr.work_contact_qdp"/>
<field name="image_1920" type="base64" file="hr/static/img/employee_qdp-image.png"/>
<field name="create_date">2010-01-01 00:00:00</field>
</record>
+5 -5
View File
@@ -248,15 +248,15 @@
<button name="%(plan_wizard_action)d" type="action" string="Launch Plan" context="{'action_plan': True}"/>
</header>
<field name="name" readonly="1"/>
<field name="work_phone" class="o_force_ltr" readonly="1"/>
<field name="work_phone" class="o_force_ltr" readonly="1" optional="show"/>
<field name="work_email"/>
<field name="activity_ids" widget="list_activity"/>
<field name="activity_ids" widget="list_activity" optional="show"/>
<field name="activity_user_id" optional="hide" string="Activity by" widget="many2one_avatar_user"/>
<field name="activity_date_deadline" widget="remaining_days" options="{'allow_order': '1'}"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="activity_date_deadline" widget="remaining_days" options="{'allow_order': '1'}" optional="show"/>
<field name="company_id" groups="base.group_multi_company" readonly="1" optional="show"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id" widget="many2one_avatar_user"/>
<field name="parent_id" widget="many2one_avatar_user" optional="show"/>
<field name="address_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="work_location_id" optional="hide"/>
@@ -14,7 +14,8 @@
<xpath expr="//page[@name='hr_settings']//field[@name='employee_type']" position="after">
<field name="first_contract_date"
attrs="{'invisible' : ['|', ('employee_type', 'not in', ['employee', 'student']), ('first_contract_date', '=', False)]}"
readonly="1"/>
readonly="1"
optional="show"/>
</xpath>
<xpath expr="//field[@name='bank_account_id']" position="replace">
<field name="bank_account_id" context="{'display_partner':True}" attrs="{'invisible' : [('address_home_id', '=', False)]}"/>
@@ -65,5 +65,6 @@ class HrEmployee(models.Model):
action = self.env["ir.actions.act_window"]._for_xml_id("hr_timesheet.timesheet_action_from_employee")
context = literal_eval(action['context'].replace('active_id', str(self.id)))
context['create'] = context.get('create', True) and self.active
context['grid_range'] = "week"
action['context'] = context
return action