summaryrefslogtreecommitdiff
path: root/addons/resource
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2016-09-14 15:44:01 +0200
committerThibault Delavallée <tde@odoo.com>2016-09-14 15:44:49 +0200
commit3ef61aeedc65bdfde99f680955e7dbc2234b286d (patch)
tree45a163fdf2e24d595ff3fabf6826b78d82673c63 /addons/resource
parent82635140b3c7c72be3f995d37e484234ab3cb722 (diff)
[FIX][IMP] resource: make calendar and leave form views a bit usable
Diffstat (limited to 'addons/resource')
-rw-r--r--addons/resource/views/resource_views.xml37
1 files changed, 18 insertions, 19 deletions
diff --git a/addons/resource/views/resource_views.xml b/addons/resource/views/resource_views.xml
index 6dbb2c29a91..dbd7c717f5a 100644
--- a/addons/resource/views/resource_views.xml
+++ b/addons/resource/views/resource_views.xml
@@ -58,13 +58,19 @@
<field name="model">resource.calendar</field>
<field name="arch" type="xml">
<form string="Working Time">
- <group>
- <field name="name"/>
- <field name="manager"/>
- <field name="company_id" groups="base.group_multi_company"/>
- </group>
- <field name="attendance_ids"/>
- <field name="leave_ids"/>
+ <sheet string="Working Time">
+ <group>
+ <group>
+ <field name="name"/>
+ </group>
+ <group>
+ <field name="manager"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </group>
+ <field name="attendance_ids"/>
+ <field name="leave_ids" context="{'default_calendar_id': id}"/>
+ </group>
+ </sheet>
</form>
</field>
</record>
@@ -211,22 +217,15 @@
<form string="Leave Detail">
<group>
<group>
- <field name="resource_id"/>
<field name="name" string="Reason"/>
- </group>
- <group>
<field name="calendar_id"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company" attrs="{'invisible':[('calendar_id','=',False)]}"/>
+ <field name="resource_id"/>
+ </group>
+ <group>
+ <field name="date_from"/>
+ <field name="date_to"/>
</group>
- </group>
- <group>
- <group>
- <label for="date_from" string="Duration"/>
- <div>
- <field name="date_from" class="oe_inline"/> -
- <field name="date_to" class="oe_inline"/>
- </div>
- </group>
</group>
</form>
</field>