openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #12031
[Bug 1005654] Re: [Extra-addons][product_images_olbs] AttributeError: 'cursor' object has no attribute 'get_image' on server 6.0
Amit, thanks for your response.
The error is only with the 6.0 version. But adding the "method=True"
work with both versions, with no need to maintain two branches. The 6.0
version of the module is out of date, and adding the fix work fine with
all new changes.
Anyway, I understand your arguments and the politics of the community,
but in some case like this, is not the best solution.
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1005654
Title:
[Extra-addons][product_images_olbs] AttributeError: 'cursor' object
has no attribute 'get_image' on server 6.0
Status in OpenERP Addons (modules):
Invalid
Bug description:
The module product_images_olbs raise this in server 6.0:
[2012-05-28 15:20:17,797][openerp6] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
File "/opt/openerp-6.0.4/server/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp-6.0.4/server/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp-6.0.4/server/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp-6.0.4/server/bin/osv/orm.py", line 2947, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/opt/openerp-6.0.4/server/bin/osv/orm.py", line 3067, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/opt/openerp-6.0.4/server/bin/osv/fields.py", line 815, in get
res = self._fnct(cr, obj._table, ids, name, self._arg, context)
File "/opt/openerp-6.0.4/extra-addons/product_images_olbs/product_images.py", line 119, in _get_image
res[each] = self.get_image(cr, uid, each, context=context)
File "/opt/openerp-6.0.4/server/bin/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/opt/openerp-6.0.4/server/bin/sql_db.py", line 237, in __getattr__
return getattr(self._obj, name)
AttributeError: 'cursor' object has no attribute 'get_image'
To solve this, in product_images class, the 'file' function field must
be have the attribute method to True:
'file':fields.function(_get_image, fnct_inv=_set_image, type="binary",
method=True, filters='*.png,*.jpg,*.gif'),
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1005654/+subscriptions
References