base_contact:modify ordering of jobs on partner and contacts
bzr revid: mra@tinyerp.com-20080917071242-u1tr0i9dt4gc424b
This commit is contained in:
parent
a0c5648e2d
commit
c4f85984a4
|
@ -102,6 +102,15 @@ class res_partner_job(osv.osv):
|
||||||
res[id.id] = id.address_id.partner_id.id
|
res[id.id] = id.address_id.partner_id.id
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
||||||
|
context=None, count=False):
|
||||||
|
for arg in args:
|
||||||
|
if arg[0]=='address_id':
|
||||||
|
self._order = 'sequence_partner'
|
||||||
|
if arg[0]=='contact_id':
|
||||||
|
self._order = 'sequence_contact'
|
||||||
|
return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count)
|
||||||
|
|
||||||
_name = 'res.partner.job'
|
_name = 'res.partner.job'
|
||||||
_description ='Contact Function'
|
_description ='Contact Function'
|
||||||
_order = 'sequence_contact'
|
_order = 'sequence_contact'
|
||||||
|
|
Loading…
Reference in New Issue