[IMP] hr: add context with default_groups_ref values and a custom help message

bzr revid: chm@openerp.com-20130130113624-1c5cyvdsimq5t0zr
This commit is contained in:
Christophe Matthieu
2013-01-30 12:36:24 +01:00
parent 92a56bb6a0
commit 5bea27647f
3 changed files with 20 additions and 5 deletions
+2
View File
@@ -374,6 +374,7 @@
<field name="model">hr.holidays.status</field>
<field name="arch" type="xml">
<form string="Leave Type" version="7.0">
<sheet string="Leave Type">
<group col="4">
<field name="name"/>
<field name="categ_id"/>
@@ -392,6 +393,7 @@
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
+13 -3
View File
@@ -107,7 +107,9 @@
<field name="type_id" placeholder="Degree"/>
</group>
<group>
<field name="user_id"/>
<field name="user_id"
context="{'default_groups_ref': ['base.group_hr_manager', 'base.group_user']}"
help="If you use the quick create, the new user will have access to 'Human Resources' as a manager and will be added as an employee."/>
<label for="title_action"/>
<div>
<field name="date_action"/>
@@ -337,6 +339,7 @@
<field name="model">hr.recruitment.stage</field>
<field name="arch" type="xml">
<form string="Stage" version="7.0">
<sheet>
<group string="Stage Definition">
<group>
<field name="name"/>
@@ -350,6 +353,7 @@
</group>
<separator string="Requirements"/>
<field name="requirements"/>
</sheet>
</form>
</field>
</record>
@@ -395,10 +399,12 @@
<field name="model">hr.recruitment.degree</field>
<field name="arch" type="xml">
<form string="Degree" version="7.0">
<sheet>
<group>
<field name="name"/>
<field name="sequence" groups="base.group_no_one"/>
</group>
</sheet>
</form>
</field>
</record>
@@ -432,8 +438,12 @@
<field name="name">hr.recruitment.source.form</field>
<field name="model">hr.recruitment.source</field>
<field name="arch" type="xml">
<form string="Sources of Applicants">
<field name="name"/>
<form string="Sources of Applicants" version="7.0">
<sheet>
<group>
<field name="name"/>
</group>
</sheet>
</form>
</field>
</record>
+5 -2
View File
@@ -8,7 +8,8 @@
<field name="arch" type="xml">
<tree editable="top" string="Timesheet Activities">
<field name="date" on_change="on_change_date(date)"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'
context="{'default_groups_ref': ['base.group_user']}"/>
<field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
<field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
@@ -29,7 +30,9 @@
<group>
<group>
<field name="name"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"
context="{'default_groups_ref': ['base.group_user']}"
help="If you use the quick create, the new user will be added as an employee."/>
</group>
<group>
<field name="date" on_change="on_change_date(date)"/>