Divyesh Makwana(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-891580-mdi into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #891580 in OpenERP Addons: "Cannot remove account linked to a deleted
partner"
https://bugs.launchpad.net/openobject-addons/+bug/891580
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-891580-mdi/+merge/82639
Hello Sir,
I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/891580
"Cannot remove account linked to a deleted partner".
Thanks and Regards,
Divyesh Makwana(MDI)
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-891580-mdi/+merge/82639
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-891580-mdi.
=== modified file 'account/partner.py'
--- account/partner.py 2011-08-24 21:19:43 +0000
+++ account/partner.py 2011-11-18 06:18:25 +0000
@@ -96,6 +96,13 @@
_inherit = 'res.partner'
_description = 'Partner'
+ def unlink(self, cr, uid, ids, context=None):
+ ir_property_obj = self.pool.get('ir.property')
+ value = 'res.partner,' + str(ids[0])
+ unlink_ids = ir_property_obj.search(cr, uid, [('res_id','=',value)], context=context)
+ ir_property_obj.unlink(cr, uid, unlink_ids, context=context)
+ return super(res_partner, self).unlink(cr, uid, ids, context=context)
+
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context=None):
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
@@ -188,6 +195,7 @@
'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were reconciled last time')
}
+
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp