Khushboo Bhatt(openerp) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-imp-point-of-sale-apa-product-kbh into 
lp:~openerp-dev/openobject-addons/trunk-imp-point-of-sale-apa.

Requested reviews:
  Amit Patel (OpenERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-imp-point-of-sale-apa-product-kbh/+merge/128888

Hello,

   Mail:

    I have fixed the error of creating new record.

Thanks,
Khushboo.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-imp-point-of-sale-apa-product-kbh/+merge/128888
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-imp-point-of-sale-apa.
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py	2012-10-09 15:54:56 +0000
+++ mail/mail_thread.py	2012-10-10 09:25:34 +0000
@@ -146,25 +146,26 @@
         old = set(fol.partner_id.id for fol in fol_obj.browse(cr, SUPERUSER_ID, fol_ids))
         new = set(old)
 
-        for command in value:
-            if isinstance(command, (int, long)):
-                new.add(command)
-            elif command[0] == 0:
-                new.add(partner_obj.create(cr, uid, command[2], context=context))
-            elif command[0] == 1:
-                partner_obj.write(cr, uid, [command[1]], command[2], context=context)
-                new.add(command[1])
-            elif command[0] == 2:
-                partner_obj.unlink(cr, uid, [command[1]], context=context)
-                new.discard(command[1])
-            elif command[0] == 3:
-                new.discard(command[1])
-            elif command[0] == 4:
-                new.add(command[1])
-            elif command[0] == 5:
-                new.clear()
-            elif command[0] == 6:
-                new = set(command[2])
+        if value:
+            for command in value:
+                if isinstance(command, (int, long)):
+                    new.add(command)
+                elif command[0] == 0:
+                    new.add(partner_obj.create(cr, uid, command[2], context=context))
+                elif command[0] == 1:
+                    partner_obj.write(cr, uid, [command[1]], command[2], context=context)
+                    new.add(command[1])
+                elif command[0] == 2:
+                    partner_obj.unlink(cr, uid, [command[1]], context=context)
+                    new.discard(command[1])
+                elif command[0] == 3:
+                    new.discard(command[1])
+                elif command[0] == 4:
+                    new.add(command[1])
+                elif command[0] == 5:
+                    new.clear()
+                elif command[0] == 6:
+                    new = set(command[2])
 
         # remove partners that are no longer followers
         fol_ids = fol_obj.search(cr, SUPERUSER_ID,

_______________________________________________
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