Merge lp:~openerp-dev/openobject-addons/trunk-bug-1169444-cga into lp:openobject-addons

Proposed by Chandni Gandhi(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1169444-cga
Merge into: lp:openobject-addons
Diff against target: 29 lines (+8/-1)
2 files modified
hr/hr.py (+7/-0)
hr/hr_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1169444-cga
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+162052@code.launchpad.net

This proposal supersedes a proposal from 2013-05-01.

Description of the change

Hello,

Add res_partner class in hr and add condition of model .

Thanks.
CGA.

To post a comment you must log in.

Unmerged revisions

8701. By Chandni Gandhi(OpenERP)

[IMP]:Change context of address_home_id

8700. By Chandni Gandhi(OpenERP)

[IMP]:Improve code

8699. By Chandni Gandhi(OpenERP)

[IMP]:Add condtion for active model

8698. By Chandni Gandhi(OpenERP)

[IMP]:Remove name

8697. By Chandni Gandhi(OpenERP)

[IMP]:Improve code

8696. By Chandni Gandhi(OpenERP)

[FIX]:Add res_partner class in hr

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hr/hr.py'
--- hr/hr.py 2013-04-16 15:18:44 +0000
+++ hr/hr.py 2013-05-02 08:45:36 +0000
@@ -326,5 +326,12 @@
326 }326 }
327327
328328
329class res_partner(osv.osv):
330 _inherit = 'res.partner'
331
332 def create(self, cr, uid, vals, context=None):
333 if context.get('current_model') == 'hr.employee':
334 vals.update({'customer': False, 'supplier': True})
335 return super(res_partner, self).create(cr, uid, vals, context=context)
329336
330# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:337# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
331338
=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml 2013-03-20 12:55:17 +0000
+++ hr/hr_view.xml 2013-05-02 08:45:36 +0000
@@ -65,7 +65,7 @@
65 <field name="otherid" groups="base.group_hr_user"/>65 <field name="otherid" groups="base.group_hr_user"/>
66 </group>66 </group>
67 <group string="Contact Information">67 <group string="Contact Information">
68 <field name="address_home_id" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>68 <field name="address_home_id" context="{'show_address': 1, 'current_model': 'hr.employee'}" options='{"always_reload": True, "highlight_first_line": True}'/>
69 </group>69 </group>
70 <group string="Status">70 <group string="Status">
71 <field name="gender"/>71 <field name="gender"/>

Subscribers

People subscribed via source and target branches

to all changes: