product_images_olbs image depends on reference field

Bug #961652 reported by Kyle Waid
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Incomplete
Undecided
Unassigned

Bug Description

V6.1

Create a product. Add only magento sku, not reference leave it blank. Save. Try to add a product image. 3 options here. Do not depend on default code by rather magento sku. You could make default code a required field, or you could raise an exception message notifying the user of the error. As is, is a bug

Client Traceback (most recent call last):
  File "/usr/local/openerp/web/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/usr/local/openerp/web/addons/web/controllers/main.py", line 986, in save
    r = m.write([id], data, req.session.eval_context(req.context))
  File "/usr/local/openerp/web/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/usr/local/openerp/web/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/local/openerp/web/addons/web/common/http.py", line 611, in send
    raise fault

Server Traceback (most recent call last):
  File "/usr/local/openerp/web/addons/web/common/http.py", line 592, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/openerp/openerp-server/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/openerp/openerp-server/openerp/service/web_services.py", line 572, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/openerp/openerp-server/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/local/openerp/openerp-server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/openerp/openerp-server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/openerp/openerp-server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/openerp/addons/magentoerpconnect/product.py", line 1024, in write
    stat = super(product_product, self).write(cr, uid, ids, vals, context)
  File "/usr/local/openerp/addons/product_images_olbs/product.py", line 80, in write
    return super(product_product, self).write(cr, uid, ids, vals, context=context)
  File "/usr/local/openerp/openerp-server/openerp/osv/orm.py", line 3944, in write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/usr/local/openerp/openerp-server/openerp/osv/fields.py", line 572, in set
    id_new = obj.create(cr, user, act[2], context=context)
  File "/usr/local/openerp/addons/product_images_olbs/product_images.py", line 48, in create
    return super(product_images, self).create(cr, uid, vals, context=context)
  File "/usr/local/openerp/openerp-server/openerp/osv/orm.py", line 4214, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/usr/local/openerp/openerp-server/openerp/osv/fields.py", line 1146, in set
    self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
  File "/usr/local/openerp/addons/product_images_olbs/product_images.py", line 135, in _set_image
    return self._save_file(os.path.join(local_media_repository, image.product_id.default_code), '%s%s'%(image.name, image.extention), value)
  File "/usr/lib/python2.6/posixpath.py", line 65, in join
    if b.startswith('/'):
AttributeError: 'bool' object has no attribute 'startswith'

Revision history for this message
Josef Tesar (tesar-j) wrote :

Solution: Delete the "Images Repository Path" in Register "Product Images" under your company and your Products open.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Hello,

Which branch are you using?

Do you still see this bug? I've made some changes in product_images_olbs in extra-trunk, and ported some of these to the product-extra-addons branch, and maybe this is fixed.

Changed in magentoerpconnect:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers