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
1=== modified file 'hr/hr.py'
2--- hr/hr.py 2013-04-16 15:18:44 +0000
3+++ hr/hr.py 2013-05-02 08:45:36 +0000
4@@ -326,5 +326,12 @@
5 }
6
7
8+class res_partner(osv.osv):
9+ _inherit = 'res.partner'
10+
11+ def create(self, cr, uid, vals, context=None):
12+ if context.get('current_model') == 'hr.employee':
13+ vals.update({'customer': False, 'supplier': True})
14+ return super(res_partner, self).create(cr, uid, vals, context=context)
15
16 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
17
18=== modified file 'hr/hr_view.xml'
19--- hr/hr_view.xml 2013-03-20 12:55:17 +0000
20+++ hr/hr_view.xml 2013-05-02 08:45:36 +0000
21@@ -65,7 +65,7 @@
22 <field name="otherid" groups="base.group_hr_user"/>
23 </group>
24 <group string="Contact Information">
25- <field name="address_home_id" context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/>
26+ <field name="address_home_id" context="{'show_address': 1, 'current_model': 'hr.employee'}" options='{"always_reload": True, "highlight_first_line": True}'/>
27 </group>
28 <group string="Status">
29 <field name="gender"/>

Subscribers

People subscribed via source and target branches

to all changes: