summaryrefslogtreecommitdiff
path: root/addons/hr_work_entry/views
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2020-01-24 10:32:46 +0000
committerYannick Tivisse <yti@odoo.com>2020-01-28 14:16:21 +0000
commit41a465bc869a96b7a4e2b49a691360827019b0ea (patch)
tree4128dd65027b0b3ee36fc42a61c5820e5df7694f /addons/hr_work_entry/views
parent9d98c43581e2579f43b35541b43264866dede5a5 (diff)
[FIX] hr_work_entry: Closed contract
When a contract is closed, set the date of the day. In the contract cron, ensure that all closed contracts have an end date if it is followed by a new contract. Add multi-edit on work_entry list closes odoo/odoo#44118 Taskid: 2180263 X-original-commit: 0b5d8ce756eac904a040ca700f44ea860daefcb4 Related: odoo/enterprise#7991 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_work_entry/views')
-rw-r--r--addons/hr_work_entry/views/hr_work_entry_views.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/hr_work_entry/views/hr_work_entry_views.xml b/addons/hr_work_entry/views/hr_work_entry_views.xml
index 3fefedddf6a..b04e84e644f 100644
--- a/addons/hr_work_entry/views/hr_work_entry_views.xml
+++ b/addons/hr_work_entry/views/hr_work_entry_views.xml
@@ -40,7 +40,7 @@
<field name="arch" type="xml">
<form string="Work Entry" >
<header>
- <field name="state" widget="statusbar" options="{'clickable': '1'}"/>
+ <field name="state" widget="statusbar" options="{'clickable': '1'}" statusbar_visible="draft,validated,conflict"/>
</header>
<sheet>
<div class="oe_title">
@@ -73,8 +73,8 @@
<field name="model">hr.work.entry</field>
<field name="arch" type="xml">
<tree multi_edit="1">
- <field name="name" readonly="1"/>
- <field name="work_entry_type_id" attrs="{'readonly': [('state', '=', 'validated')]}" options="{'no_create': True, 'no_open': True}"/>
+ <field name="name"/>
+ <field name="work_entry_type_id" options="{'no_create': True, 'no_open': True}"/>
<field name="duration" readonly="1"/>
<field name="state"/>
<field name="date_start" string="Beginning" readonly="1"/>
@@ -93,9 +93,13 @@
<filter name="work_entries_error" string="Conflicting" domain="[('state', '=', 'conflict')]"/>
<separator/>
<filter name="date_filter" string="Date" date="date_start"/>
+ <filter name="current_month" string="Current Month" domain="[
+ ('date_stop', '&gt;=', (context_today()).strftime('%Y-%m-01')),
+ ('date_start', '&lt;', (context_today() + relativedelta(months=1)).strftime('%Y-%m-01'))]"/>
<separator/>
<filter name="group_employee" string="Employee" context="{'group_by': 'employee_id'}"/>
<filter name="group_work_entry_type" string="Type" context="{'group_by': 'work_entry_type_id'}"/>
+ <filter name="group_start_date" string="Start Date" context="{'group_by': 'date_start'}"/>
<separator/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
</search>