Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-812723-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #812723 in OpenERP Addons: "passing ids as integer to account.account 
write method throws KeyError: "Field '0' does not exist in object 
'browse_record'..."
  https://bugs.launchpad.net/openobject-addons/+bug/812723

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-812723-bde/+merge/68494

Hello Sir,

I have changed the ids into list of ids.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-812723-bde/+merge/68494
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-812723-bde.
=== modified file 'account/account.py'
--- account/account.py	2011-07-11 22:23:50 +0000
+++ account/account.py	2011-07-20 06:08:28 +0000
@@ -536,8 +536,13 @@
         return True
 
     def write(self, cr, uid, ids, vals, context=None):
+
         if context is None:
             context = {}
+        if not ids:
+            return True
+        if isinstance(ids, (int, long)):
+            ids = [ids]
 
         # Dont allow changing the company_id when account_move_line already exist
         if 'company_id' in vals:

_______________________________________________
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

Reply via email to