[IMP] mail, hr: add new groups to res users form view (technical group because no specific use, but being able to modify them directly using the interface is quite useful).
bzr revid: tde@openerp.com-20130510144829-btj6q6x16bpphrcm
This commit is contained in:
parent
ebfaf46c16
commit
82690ba2b2
|
@ -60,6 +60,7 @@ You can manage:
|
||||||
'hr_data.xml',
|
'hr_data.xml',
|
||||||
'res_config_view.xml',
|
'res_config_view.xml',
|
||||||
'mail_hr_view.xml',
|
'mail_hr_view.xml',
|
||||||
|
'res_users_view.xml',
|
||||||
],
|
],
|
||||||
'demo': ['hr_demo.xml'],
|
'demo': ['hr_demo.xml'],
|
||||||
'test': [
|
'test': [
|
||||||
|
|
|
@ -218,7 +218,8 @@ class hr_employee(osv.osv):
|
||||||
_order='name_related'
|
_order='name_related'
|
||||||
|
|
||||||
def create(self, cr, uid, data, context=None):
|
def create(self, cr, uid, data, context=None):
|
||||||
employee_id = super(hr_employee, self).create(cr, uid, data, context=context)
|
create_ctx = dict(context, mail_create_nolog=True)
|
||||||
|
employee_id = super(hr_employee, self).create(cr, uid, data, context=create_ctx)
|
||||||
employee = self.browse(cr, uid, employee_id, context=context)
|
employee = self.browse(cr, uid, employee_id, context=context)
|
||||||
if employee.user_id:
|
if employee.user_id:
|
||||||
# send a copy to every user of the company
|
# send a copy to every user of the company
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- Update user form !-->
|
||||||
|
<record id="view_users_form_mail" model="ir.ui.view">
|
||||||
|
<field name="name">res.users.form.hr</field>
|
||||||
|
<field name="model">res.users</field>
|
||||||
|
<field name="inherit_id" ref="mail.view_users_form_mail"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<data>
|
||||||
|
<field name="display_groups_suggestions" position="after">
|
||||||
|
<field name="display_employees_suggestions"/>
|
||||||
|
</field>
|
||||||
|
</data>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -30,6 +30,12 @@
|
||||||
<field name="alias_domain" invisible="1"/>
|
<field name="alias_domain" invisible="1"/>
|
||||||
<field name="alias_id" readonly="1" required="0" attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
<field name="alias_id" readonly="1" required="0" attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
||||||
</field>
|
</field>
|
||||||
|
<group string="Email preferences" position="after">
|
||||||
|
<group name="misc" string="Miscellaneous"
|
||||||
|
groups="base.group_no_one">
|
||||||
|
<field name="display_groups_suggestions"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
</data>
|
</data>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
Loading…
Reference in New Issue