Raphael Collet (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-hr-improvements into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr-improvements/+merge/103705
Various UI improvements in modules hr and hr_expense.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr-improvements/+merge/103705
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-hr-improvements.
=== modified file 'hr_expense/hr_expense_view.xml'
--- hr_expense/hr_expense_view.xml 2012-04-25 14:11:35 +0000
+++ hr_expense/hr_expense_view.xml 2012-04-26 14:23:41 +0000
@@ -81,7 +81,7 @@
<field colspan="4" name="line_ids" nolabel="1" context="{'currency_id': currency_id}">
<form string="Expense Lines">
<group col="6" colspan="4">
- <field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)"/>
+ <field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" context="{'default_hr_expense_ok':1}"/>
<field name="name" colspan="4"/>
<newline/>
<field name="unit_amount"/>
=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py 2012-04-06 12:37:32 +0000
+++ hr_holidays/hr_holidays.py 2012-04-26 14:23:41 +0000
@@ -351,7 +351,7 @@
if record.employee_id and not record.holiday_status_id.limit:
leaves_rest = holi_status_obj.get_days( cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
if leaves_rest < record.number_of_days_temp:
- raise osv.except_osv(_('Warning!'),_('You cannot validate leaves for employee %s: too few remaining days (%s).') % (record.employee_id.name, leaves_rest))
+ raise osv.except_osv(_('Warning!'),_('There are no %s allocated for employee %s, Please create allocation request for this leave type.') % (record.holiday_status_id.name,record.employee_id.name))
return True
# -----------------------------
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2012-04-25 14:11:35 +0000
+++ hr_holidays/hr_holidays_view.xml 2012-04-26 14:23:41 +0000
@@ -66,25 +66,25 @@
<form 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_manager"/>
+ <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
</group>
<group attrs="{'invisible':[('holiday_type','=','category')]}">
- <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
+ <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}" groups="base.group_hr_user"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
- <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}"/>
+ <field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
<field name="number_of_days_temp"/>
<field name="double_validation" invisible="1"/>
<newline/>
- <field name="manager_id"/>
- <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
+ <field name="manager_id" groups="base.group_no_one"/>
+ <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
<separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/>
<group colspan="4" col="8">
@@ -150,10 +150,14 @@
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
+<<<<<<< TREE
<tree fonts="bold:needaction_pending==True" colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Allocation Requests">
<field name="needaction_pending" invisible="1"/>
+=======
+ <tree colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Allocation Requests">
+ <field name="employee_id"/>
+>>>>>>> MERGE-SOURCE
<field name="holiday_type"/>
- <field name="employee_id"/>
<field name="category_id"/>
<field name="department_id" invisible="1"/>
<field name="holiday_status_id"/>
@@ -233,23 +237,28 @@
<field name="model">hr.holidays</field>
<field name="type">tree</field>
<field name="arch" type="xml">
+<<<<<<< TREE
<tree fonts="bold:needaction_pending==True" colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Leave Requests">
<field name="needaction_pending" invisible="1"/>
<field name="holiday_type"/>
+=======
+ <tree colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Leave Requests">
+>>>>>>> MERGE-SOURCE
<field name="employee_id"/>
- <field name="category_id"/>
+ <field name="holiday_type" string="Mode" groups="base.group_hr_user"/>
+ <field name="name"/>
+ <field name="date_from"/>
+ <field name="date_to"/>
+ <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
+ <field name="state"/>
+ <field name="category_id" invisible="1"/>
<field name="department_id" invisible="not context.get('set_visible',False)"/>
- <field name="holiday_status_id"/>
- <field name="name"/>
- <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
- <field name="date_from"/>
- <field name="date_to"/>
+ <field name="holiday_status_id" invisible="1"/>
<field name="manager_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<!--field name="type"/-->
- <field name="state"/>
- <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager"/>
- <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager"/>
+ <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager" invisible="1"/>
+ <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user,base.group_hr_manager" invisible="1"/>
</tree>
</field>
</record>
=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml 2012-04-25 14:11:35 +0000
+++ hr_recruitment/hr_recruitment_view.xml 2012-04-26 14:23:41 +0000
@@ -64,7 +64,7 @@
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
- <button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
+ <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/>
</tree>
</field>
</record>
@@ -319,8 +319,10 @@
<a t-if="record.survey.raw_value" name="action_print_survey" type="object" string="Print Interview" icon="gtk-print" />
</div>
<div class="oe_kanban_right">
+ <a name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<a name="case_open" string="In Progress" states="draft,pending" type="object" icon="kanban-apply"/>
- <a name="case_pending" string="Pending" states="draft,open" type="object" icon="kanban-pause"/>
+ <a name="case_pending" string="Pending" states="open" type="object" icon="kanban-pause"/>
+ <a name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
</div>
<br class="oe_kanban_clear"/>
</div>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp