summaryrefslogtreecommitdiff
path: root/addons/hr_holidays
diff options
context:
space:
mode:
authorVijaykumar Baladaniya <vba@tinyerp.com>2012-07-09 18:31:13 +0530
committerVijaykumar Baladaniya <vba@tinyerp.com>2012-07-09 18:31:13 +0530
commitbe2e95656aaa113addea2b510fcdcf2f890eaaa4 (patch)
treeabcb3dd4ef350a1b8ad0eaffdd2b9a1cb91521af /addons/hr_holidays
parentb982ea278b33132def3927417b7a854b98b5028a (diff)
parent3925f76ce85854e5d4834902a05f57bcfc5ace85 (diff)
[MERGE]merged with trunk-survey-layout-tta
bzr revid: vba@tinyerp.com-20120709130113-3lchipgil9oqpglg
Diffstat (limited to 'addons/hr_holidays')
-rw-r--r--addons/hr_holidays/hr_holidays.py16
-rw-r--r--addons/hr_holidays/hr_holidays_view.xml80
-rw-r--r--addons/hr_holidays/hr_holidays_wizard.xml2
-rw-r--r--addons/hr_holidays/process/hr_holidays_process.xml340
-rw-r--r--addons/hr_holidays/report/hr_holidays_report_view.xml4
-rw-r--r--addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml5
-rw-r--r--addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml12
7 files changed, 252 insertions, 207 deletions
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index f5e8ba69e5d..a1ab0ae04f3 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -359,7 +359,7 @@ class hr_holidays(osv.osv):
# -----------------------------
def get_needaction_user_ids(self, cr, uid, ids, context=None):
- result = dict.fromkeys(ids, [])
+ result = super(hr_holidays, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'confirm' and obj.employee_id.parent_id:
result[obj.id] = [obj.employee_id.parent_id.user_id.id]
@@ -371,14 +371,16 @@ class hr_holidays(osv.osv):
hr_manager_group = self.pool.get('res.groups').read(cr, uid, [obj_id], ['users'], context=context)[0]
result[obj.id] = hr_manager_group['users']
return result
-
+
def message_get_subscribers(self, cr, uid, ids, context=None):
- sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context);
- # add the employee and its manager if specified to the subscribed users
+ """ Override to add employee and its manager. """
+ user_ids = super(hr_holidays, self).message_get_subscribers(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
- if obj.employee_id.parent_id:
- sub_ids.append(obj.employee_id.parent_id.user_id.id)
- return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
+ if obj.user_id and not obj.user_id.id in user_ids:
+ user_ids.append(obj.user_id.id)
+ if obj.employee_id.parent_id and not obj.employee_id.parent_id.user_id.id in user_ids:
+ user_ids.append(obj.employee_id.parent_id.user_id.id)
+ return user_ids
def create_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 7db5a41b7e8..34a61654faa 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -1,6 +1,43 @@
<openerp>
<data>
+ <!-- Hr holidays Read/Unread actions -->
+ <record id="actions_server_holidays_unread" model="ir.actions.server">
+ <field name="name">Mark unread</field>
+ <field name="condition">True</field>
+ <field name="type">ir.actions.server</field>
+ <field name="model_id" ref="model_hr_holidays"/>
+ <field name="state">code</field>
+ <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
+ </record>
+ <record id="action_holidays_unread" model="ir.values">
+ <field name="name">action_holidays_unread</field>
+ <field name="action_id" ref="actions_server_holidays_unread"/>
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_holidays_unread'))" />
+ <field name="key">action</field>
+ <field name="model_id" ref="model_hr_holidays" />
+ <field name="model">hr.holidays</field>
+ <field name="key2">client_action_multi</field>
+ </record>
+
+ <record id="actions_server_holidays_read" model="ir.actions.server">
+ <field name="name">Mark read</field>
+ <field name="condition">True</field>
+ <field name="type">ir.actions.server</field>
+ <field name="model_id" ref="model_hr_holidays"/>
+ <field name="state">code</field>
+ <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
+ </record>
+ <record id="action_holidays_read" model="ir.values">
+ <field name="name">action_holidays_read</field>
+ <field name="action_id" ref="actions_server_holidays_read"/>
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_holidays_read'))" />
+ <field name="key">action</field>
+ <field name="model_id" ref="model_hr_holidays" />
+ <field name="model">hr.holidays</field>
+ <field name="key2">client_action_multi</field>
+ </record>
+
<record id="view_hr_holidays_filter" model="ir.ui.view">
<field name="name">hr.holidays.filter</field>
<field name="model">hr.holidays</field>
@@ -10,6 +47,11 @@
<group>
<field name="date_from"/>
<separator orientation="vertical"/>
+ <filter icon="terp-mail-message-new"
+ string="Inbox" help="Unread messages"
+ name="needaction_pending"
+ domain="[('needaction_pending','=',True)]"/>
+ <separator orientation="vertical"/>
<filter string="My Leaves" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
<filter string="My Department Leaves" icon="terp-personal+" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
@@ -60,14 +102,14 @@
<field name="arch" type="xml">
<form version="7.0">
<header>
- <button string="Submit to Manager" name="confirm" states="draft" type="workflow"/>
- <button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user"/>
- <button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user"/>
- <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user,base.group_hr_manager"/>
- <button string="Reset to New" name="set_to_draft" states="refuse,validate" type="object" groups="base.group_hr_user"/>
+ <button string="Submit to Manager" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
+ <button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user,base.group_hr_manager" class="oe_highlight"/>
+ <button string="Reset to New" name="set_to_draft" states="refuse,validate" type="object" groups="base.group_hr_user" />
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
- <sheet string="Leave Request" layout="auto">
+ <sheet string="Leave Request">
<group col="8" colspan="4">
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
@@ -94,9 +136,9 @@
</page>
</notebook>
</sheet>
- <div class="oe_sheet_width">
- <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
- </div>
+ <footer>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
+ </footer>
</form>
</field>
</record>
@@ -109,11 +151,11 @@
<field name="arch" type="xml">
<form string="Allocation Request" version="7.0">
<header>
- <button string="Submit to Manager" name="confirm" states="draft" type="workflow"/>
- <button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user"/>
- <button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user"/>
- <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user"/>
- <button string="Reset to New" name="set_to_draft" states="cancel,validate,refuse" type="object" groups="base.group_hr_user"/>
+ <button string="Submit to Manager" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
+ <button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button string="Reset to New" name="set_to_draft" states="cancel,validate,refuse" type="object" groups="base.group_hr_user" />
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet>
@@ -137,11 +179,11 @@
<field name="notes"/>
</page>
</notebook>
- </sheet>
- <div class="oe_sheet_width">
- <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
- </div>
- </form>
+ </sheet>
+ <footer>
+ <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
+ </footer>
+ </form>
</field>
</record>
diff --git a/addons/hr_holidays/hr_holidays_wizard.xml b/addons/hr_holidays/hr_holidays_wizard.xml
index 7ed381636cf..efeb8e29115 100644
--- a/addons/hr_holidays/hr_holidays_wizard.xml
+++ b/addons/hr_holidays/hr_holidays_wizard.xml
@@ -6,5 +6,5 @@
name="Leaves"
parent="hr.menu_hr_reporting"
sequence="6"/>
- </data>
+ </data>
</openerp>
diff --git a/addons/hr_holidays/process/hr_holidays_process.xml b/addons/hr_holidays/process/hr_holidays_process.xml
index 82285ff1209..5c10fdff749 100644
--- a/addons/hr_holidays/process/hr_holidays_process.xml
+++ b/addons/hr_holidays/process/hr_holidays_process.xml
@@ -1,173 +1,173 @@
<?xml version="1.0" ?>
<openerp>
- <data>
-
- <!--
- Process
- -->
-
- <record id="process_process_holidaysprocess0" model="process.process">
- <field eval="&quot;&quot;&quot;Holidays&quot;&quot;&quot;" name="name"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="1" name="active"/>
- </record>
-
- <!--
- Process Node
- -->
-
- <record id="process_node_holidaysdefinition0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays_per_user"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;Encoding of annual available holidays.&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Holidays Definition&quot;&quot;&quot;" name="name"/>
- <field name="process_id" ref="process_process_holidaysprocess0"/>
- <field eval="1" name="flow_start"/>
- </record>
-
- <record id="process_node_holidaysrequest0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;Employee fills in a request for holidays&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Holidays Request&quot;&quot;&quot;" name="name"/>
- <field name="process_id" ref="process_process_holidaysprocess0"/>
- <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <record id="process_node_refused0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;His manager refuses the request&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Refused&quot;&quot;&quot;" name="name"/>
- <field name="process_id" ref="process_process_holidaysprocess0"/>
- <field eval="&quot;&quot;&quot;object.state=='refuse'&quot;&quot;&quot;" name="model_states"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <record id="process_node_approved0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;His manager approves the request&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Approved&quot;&quot;&quot;" name="name"/>
- <field name="process_id" ref="process_process_holidaysprocess0"/>
- <field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <record id="process_node_calendar0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;The holiday is set in the calendar&quot;&quot;&quot;" name="note"/>
- <field eval="&quot;&quot;&quot;Calendar&quot;&quot;&quot;" name="name"/>
- <field name="process_id" ref="process_process_holidaysprocess0"/>
- <field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <record id="process_node_holidays0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;Holidays&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Encode number of available holidays&quot;&quot;&quot;" name="note"/>
- <field name="process_id" ref="hr.process_process_employeecontractprocess0"/>
- <field eval="&quot;&quot;&quot;object.state in ('draft', 'validate', 'confirm', 'refuse', 'cancel')&quot;&quot;&quot;" name="model_states"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <record id="process_node_legaldeclaration0" model="process.node">
- <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
- <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
- <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
- <field eval="&quot;&quot;&quot;Secretariat Social&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Legal Declaration Document to declare new employee&quot;&quot;&quot;" name="note"/>
- <field name="process_id" ref="hr.process_process_employeecontractprocess0"/>
- <field eval="0" name="flow_start"/>
- </record>
-
- <!--
- Process Transition
- -->
-
-
- <record id="process_transition_employeedeclaration0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Employee Declaration&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Document for employee&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_legaldeclaration0"/>
- <field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
- </record>
-
- <record id="process_transition_holidaysdefrequest0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Holidays def Request&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;If holidays available, employee can take it and fill it.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_holidaysrequest0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysdefinition0"/>
- </record>
-
- <record id="process_transition_refusedrequest0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Refused Request&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Request is refused.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_refused0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0" />
- </record>
-
- <record id="process_transition_approvedrequest0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Approved Request&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Request is approved.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_approved0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0"/>
- </record>
-
- <record id="process_transition_setholiday0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Set Holiday&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Holiday is set in the calendar.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_calendar0"/>
- <field model="process.node" name="source_node_id" ref="process_node_approved0"/>
- </record>
-
- <record id="process_transition_employeeholidays0" model="process.transition">
- <field eval="[(6,0,[])]" name="transition_ids"/>
- <field eval="&quot;&quot;&quot;Employee Holidays&quot;&quot;&quot;" name="name"/>
- <field eval="&quot;&quot;&quot;Employee get holidays&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_holidays0"/>
- <field model="process.node" name="source_node_id" ref="process_node_legaldeclaration0"/>
- </record>
-
- <!--
- Process Transition Action
- -->
-
- <record id="process_transition_action_confirm0" model="process.transition.action">
- <field eval="&quot;&quot;&quot;holidays_confirm&quot;&quot;&quot;" name="action"/>
- <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
- <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
- <field name="transition_id" ref="process_transition_holidaysdefrequest0"/>
- </record>
-
- <record id="process_transition_action_reufse0" model="process.transition.action">
- <field eval="&quot;&quot;&quot;holidays_refuse&quot;&quot;&quot;" name="action"/>
- <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
- <field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
- <field name="transition_id" ref="process_transition_refusedrequest0"/>
- </record>
-
- <record id="process_transition_action_validate0" model="process.transition.action">
- <field eval="&quot;&quot;&quot;holidays_validate&quot;&quot;&quot;" name="action"/>
- <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
- <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
- <field name="transition_id" ref="process_transition_approvedrequest0"/>
- </record>
-
- </data>
+ <data>
+
+ <!--
+ Process
+ -->
+
+ <record id="process_process_holidaysprocess0" model="process.process">
+ <field eval="&quot;&quot;&quot;Holidays&quot;&quot;&quot;" name="name"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="1" name="active"/>
+ </record>
+
+ <!--
+ Process Node
+ -->
+
+ <record id="process_node_holidaysdefinition0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays_per_user"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;Encoding of annual available holidays.&quot;&quot;&quot;" name="note"/>
+ <field eval="&quot;&quot;&quot;Holidays Definition&quot;&quot;&quot;" name="name"/>
+ <field name="process_id" ref="process_process_holidaysprocess0"/>
+ <field eval="1" name="flow_start"/>
+ </record>
+
+ <record id="process_node_holidaysrequest0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;Employee fills in a request for holidays&quot;&quot;&quot;" name="note"/>
+ <field eval="&quot;&quot;&quot;Holidays Request&quot;&quot;&quot;" name="name"/>
+ <field name="process_id" ref="process_process_holidaysprocess0"/>
+ <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <record id="process_node_refused0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;His manager refuses the request&quot;&quot;&quot;" name="note"/>
+ <field eval="&quot;&quot;&quot;Refused&quot;&quot;&quot;" name="name"/>
+ <field name="process_id" ref="process_process_holidaysprocess0"/>
+ <field eval="&quot;&quot;&quot;object.state=='refuse'&quot;&quot;&quot;" name="model_states"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <record id="process_node_approved0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;His manager approves the request&quot;&quot;&quot;" name="note"/>
+ <field eval="&quot;&quot;&quot;Approved&quot;&quot;&quot;" name="name"/>
+ <field name="process_id" ref="process_process_holidaysprocess0"/>
+ <field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <record id="process_node_calendar0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;The holiday is set in the calendar&quot;&quot;&quot;" name="note"/>
+ <field eval="&quot;&quot;&quot;Calendar&quot;&quot;&quot;" name="name"/>
+ <field name="process_id" ref="process_process_holidaysprocess0"/>
+ <field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <record id="process_node_holidays0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;Holidays&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Encode number of available holidays&quot;&quot;&quot;" name="note"/>
+ <field name="process_id" ref="hr.process_process_employeecontractprocess0"/>
+ <field eval="&quot;&quot;&quot;object.state in ('draft', 'validate', 'confirm', 'refuse', 'cancel')&quot;&quot;&quot;" name="model_states"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <record id="process_node_legaldeclaration0" model="process.node">
+ <field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
+ <field name="model_id" ref="hr_holidays.model_hr_holidays"/>
+ <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+ <field eval="&quot;&quot;&quot;Secretariat Social&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Legal Declaration Document to declare new employee&quot;&quot;&quot;" name="note"/>
+ <field name="process_id" ref="hr.process_process_employeecontractprocess0"/>
+ <field eval="0" name="flow_start"/>
+ </record>
+
+ <!--
+ Process Transition
+ -->
+
+
+ <record id="process_transition_employeedeclaration0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Employee Declaration&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Document for employee&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_legaldeclaration0"/>
+ <field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
+ </record>
+
+ <record id="process_transition_holidaysdefrequest0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Holidays def Request&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;If holidays available, employee can take it and fill it.&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_holidaysrequest0"/>
+ <field model="process.node" name="source_node_id" ref="process_node_holidaysdefinition0"/>
+ </record>
+
+ <record id="process_transition_refusedrequest0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Refused Request&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Request is refused.&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_refused0"/>
+ <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0" />
+ </record>
+
+ <record id="process_transition_approvedrequest0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Approved Request&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Request is approved.&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_approved0"/>
+ <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0"/>
+ </record>
+
+ <record id="process_transition_setholiday0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Set Holiday&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Holiday is set in the calendar.&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_calendar0"/>
+ <field model="process.node" name="source_node_id" ref="process_node_approved0"/>
+ </record>
+
+ <record id="process_transition_employeeholidays0" model="process.transition">
+ <field eval="[(6,0,[])]" name="transition_ids"/>
+ <field eval="&quot;&quot;&quot;Employee Holidays&quot;&quot;&quot;" name="name"/>
+ <field eval="&quot;&quot;&quot;Employee get holidays&quot;&quot;&quot;" name="note"/>
+ <field model="process.node" name="target_node_id" ref="process_node_holidays0"/>
+ <field model="process.node" name="source_node_id" ref="process_node_legaldeclaration0"/>
+ </record>
+
+ <!--
+ Process Transition Action
+ -->
+
+ <record id="process_transition_action_confirm0" model="process.transition.action">
+ <field eval="&quot;&quot;&quot;holidays_confirm&quot;&quot;&quot;" name="action"/>
+ <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+ <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
+ <field name="transition_id" ref="process_transition_holidaysdefrequest0"/>
+ </record>
+
+ <record id="process_transition_action_reufse0" model="process.transition.action">
+ <field eval="&quot;&quot;&quot;holidays_refuse&quot;&quot;&quot;" name="action"/>
+ <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+ <field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
+ <field name="transition_id" ref="process_transition_refusedrequest0"/>
+ </record>
+
+ <record id="process_transition_action_validate0" model="process.transition.action">
+ <field eval="&quot;&quot;&quot;holidays_validate&quot;&quot;&quot;" name="action"/>
+ <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+ <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
+ <field name="transition_id" ref="process_transition_approvedrequest0"/>
+ </record>
+
+ </data>
</openerp> \ No newline at end of file
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index 51ff25fea75..21e19897f22 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
- <data>
+ <data>
- <record id="view_hr_holidays_remaining_leaves_user_tree" model="ir.ui.view">
+ <record id="view_hr_holidays_remaining_leaves_user_tree" model="ir.ui.view">
<field name="name">hr.holidays.remaining.leaves.user.tree</field>
<field name="model">hr.holidays.remaining.leaves.user</field>
<field name="type">tree</field>
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml b/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
index 72844a58ccb..f6f5851c051 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_department_view.xml
@@ -9,8 +9,9 @@
<field name="arch" type="xml">
<form string="Leaves by Department" version="7.0">
<header>
- <button icon="gtk-print" name="print_report" string="Print" type="object"/>
- <button icon="gtk-cancel" special="cancel" string="Cancel"/>
+ <button name="print_report" string="Print" type="object" class="oe_highlight"/>
+ or
+ <button string="Cancel" class="oe_link" special="cancel" />
</header>
<group>
<field name="date_from" />
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml b/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml
index 1f330580c6e..4ef2dcc96c4 100644
--- a/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml
@@ -7,7 +7,12 @@
<field name="model">hr.holidays.summary.employee</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Leaves Summary">
+ <form string="Leaves Summary" version="7.0">
+ <header>
+ <button name="print_report" string="Print" type="object" class="oe_highlight"/>
+ or
+ <button string="Cancel" class="oe_link" special="cancel" />
+ </header>
<group col="4" colspan="6">
<field name="date_from"/>
<newline/>
@@ -15,11 +20,6 @@
<newline/>
<field name="emp" invisible="True"/>
</group>
- <separator colspan="4"/>
- <group col="2" colspan="4">
- <button special="cancel" string="Cancel" icon='gtk-cancel'/>
- <button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
- </group>
</form>
</field>
</record>