Comment 6 for bug 1017960

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 1017960] Re: [extra-addons-trunk] product_image_olbs : duplicate product crash

On Wed, Jun 27, 2012 at 7:24 AM, Alexandre Fayolle @ camptocamp <
<email address hidden>> wrote:

> On 27/06/2012 10:40, Raphaël Valyi - http://www.akretion.com wrote:
> > Hello Alexandre,
> >
> > could you please try with the version of he module hosted in this branch:
> >
> https://code.launchpad.net/~extra-addons-commiter/product-extra-addons/trunk
> >
> > Because of the half assumed half doable extra-addons decommissioning we
> are
> > moving out modules in more maintainable branches. he thing is we today
> like
> > repository meta-information in __openerp__.py files so we could properly
> > point users to the right dependencies... But please tell us if this
> version
> > has the same issue or not. hanks in advance.
> >
> >
>
> Hello Raphael,
>
> I have submitted a merge request for the bug. I'll adapt the patch for
> the product-extra-addons branch and submit another merge request.
>
> I have the feeling that tracking the various forked branches is going to
> be a major pain...
>

IMHO the plan should be: get that fu*ing repository dependencies meta-data
inside the __openerp__.py file format.
Then eventually get 1 branch per module as keeping things in synch may
finally be something possible (today it's nearly impossible as you see).
Then eventually move modules to something lightweight and efficient like
github and get a project per module, just like it's done for usual rubygems
and many other packages in any language. Will we ever see that in action
one day? Let's hope...

>
> --
> Alexandre Fayolle
> Chef de Projet
> Tel : + 33 (0)4 79 26 57 92r
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac Cedex
> http://www.camptocamp.com
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Addons.
> https://bugs.launchpad.net/bugs/1017960
>
> Title:
> [extra-addons-trunk] product_image_olbs : duplicate product crash
>
> Status in OpenERP Addons (modules):
> Won't Fix
>
> Bug description:
> I get the following error when trying to duplicate a product with
> linked images:
>
> 2012-06-26 13:10:10,424 4812 ERROR ? openerp.osv.osv: Uncaught exception
> Traceback (most recent call last):
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/osv.py",
> line 121, in wrapper
> return f(self, dbname, *args, **kwargs)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/osv.py",
> line 176, in execute
> res = self.execute_cr(cr, uid, obj, method, *args, **kw)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/osv.py",
> line 164, in execute_cr
> return getattr(object, method)(cr, uid, *args, **kw)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 3406, in read
> result = self._read_flat(cr, user, select, fields, context, load)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 3529, in _read_flat
> res2 = self._columns[f].get(cr, self, ids, f, user, context=context,
> values=res)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/fields.py",
> line 1132, in get
> result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/addons/product_images_olbs/product.py",
> line 52, in _get_main_image
> res[id] = image.file
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 476, in __getattr__
> return self[name]
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 391, in __getitem__
> field_values = self._table.read(self._cr, self._uid, ids,
> field_names, context=self._context, load="_classic_write")
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 3406, in read
> result = self._read_flat(cr, user, select, fields, context, load)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/orm.py",
> line 3529, in _read_flat
> res2 = self._columns[f].get(cr, self, ids, f, user, context=context,
> values=res)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/osv/fields.py",
> line 1132, in get
> result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/addons/product_images_olbs/product_images.py",
> line 119, in _get_image
> res[each] = self.get_image(cr, uid, each, context=context)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/addons/product_images_olbs/product_images.py",
> line 100, in get_image
> full_path = self._image_path(cr, uid, image, context=context)
> File
> "/srv/openerp/instances/openerp_prod_alpesdeveloppement/src/server/openerp/addons/product_images_olbs/product_images.py",
> line 90, in _image_path
> '%s%s' % (image.name or '', image.extention or ''))
> File "/usr/lib/python2.6/posixpath.py", line 65, in join
> if b.startswith('/'):
> AttributeError: 'bool' object has no attribute 'startswith'
>
>
> This is caused by the new product having False as default_code.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/1017960/+subscriptions
>