[IMP/MERGE] merge with hip branch (on user deletion delete related partner too)
bzr revid: rgaopenerp-20121108105649-4ayfd7nrufwr0zu5
This commit is contained in:
@@ -349,6 +349,13 @@ class res_partner(osv.osv, format_address):
|
||||
|
||||
# _constraints = [(_check_ean_key, 'Error: Invalid ean code', ['ean13'])]
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
if not ids:
|
||||
return True
|
||||
res_id = self.pool.get('res.users').search(cr, uid, [('partner_id', '=', ids)], context=context)
|
||||
res_user.unlink(cr, uid, res_id)
|
||||
return super(res_partner,self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
# Update parent and siblings or children records
|
||||
if isinstance(ids, (int, long)):
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
|
||||
<field name="company_id" context="{'user_preference': 0}"/>
|
||||
<field name="company_id" context="{'user_preference': 0}" attrs="{'readonly': [('in_group_4','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active"/>
|
||||
|
||||
Reference in New Issue
Block a user