[IMP/MERGE] merge with hip branch (on user deletion delete related partner too)

bzr revid: rgaopenerp-20121108105649-4ayfd7nrufwr0zu5
This commit is contained in:
RGA(OpenERP)
2012-11-08 16:26:49 +05:30
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -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)):
+1 -1
View File
@@ -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"/>