openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04742
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-740202-ron into lp:openobject-addons
Rohan Nayani(openerp) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-740202-ron into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #740202 in OpenERP Addons: "passing int to write method of stock.move gives "Field '0' does not exist in object 'browse_record(stock.move,...""
https://bugs.launchpad.net/openobject-addons/+bug/740202
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-740202-ron/+merge/55315
https://bugs.launchpad.net/openobject-addons/+bug/740202
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-740202-ron/+merge/55315
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-740202-ron.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-03-28 17:05:53 +0000
+++ stock/stock.py 2011-03-29 11:12:52 +0000
@@ -1612,6 +1612,8 @@
def write(self, cr, uid, ids, vals, context=None):
if uid != 1:
+ if isinstance(ids, (int, long)):
+ ids = [ids]
frozen_fields = set(['product_qty', 'product_uom', 'product_uos_qty', 'product_uos', 'location_id', 'location_dest_id', 'product_id'])
for move in self.browse(cr, uid, ids, context=context):
if move.state == 'done':
Follow ups