export product when a price list is linked to store failed

Bug #507857 reported by Nicolas Bessi - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
Undecided
Unassigned

Bug Description

export product when a price list is linked to a webstore failed.
This patch should do the trick :

=== modified file 'product.py'
--- product.py 2010-01-02 23:52:38 +0000
+++ product.py 2010-01-14 12:58:00 +0000
@@ -738,6 +738,8 @@

         if not product_data.get('price', False):
             pl_default_id = shop.pricelist_id and shop.pricelist_id.id or self.pool.get('product.pricelist').search(cr, uid, [('type', '=', 'sale')])
+ if isinstance(pl_default_id, int) :
+ pl_default_id = [pl_default_id]
             product_data.update({'price': self.pool.get('product.pricelist').price_get(cr, uid, pl_default_id, product.id, 1.0)[pl_default_id[0]]})

         if not product_data.get('tax_class_id', False):

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

=== modified file 'product.py'
--- product.py 2010-01-02 23:52:38 +0000
+++ product.py 2010-01-14 12:58:00 +0000
@@ -738,6 +738,8 @@

         if not product_data.get('price', False):
             pl_default_id = shop.pricelist_id and shop.pricelist_id.id or self.pool.get('product.pricelist').search(cr, uid, [('type', '=', 'sale')])
+ if isinstance(pl_default_id, int) :
+ pl_default_id = [pl_default_id]
             product_data.update({'price': self.pool.get('product.pricelist').price_get(cr, uid, pl_default_id, product.id, 1.0)[pl_default_id[0]]})

         if not product_data.get('tax_class_id', False):

Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Fixed in revision 283.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.