← Back to team overview

savoirfairelinux-openerp team mailing list archive

lp:~sebastien.beau/e-commerce-addons/e-commerce-addons-bug-1033378 into lp:e-commerce-addons/oerp6.1-stable

 

Sébastien BEAU - http://www.akretion.com has proposed merging lp:~sebastien.beau/e-commerce-addons/e-commerce-addons-bug-1033378 into lp:e-commerce-addons/oerp6.1-stable.

Requested reviews:
  extra-addons-commiter (extra-addons-commiter)

For more details, see:
https://code.launchpad.net/~sebastien.beau/e-commerce-addons/e-commerce-addons-bug-1033378/+merge/141882

Error during previous merge, this fix is need for prestashoperpconnect and also magentoerpconnect (as propose to use the same function in an other merge here => https://code.launchpad.net/~sebastien.beau/magentoerpconnect/magentoerpconnect-bug-1033378/+merge/141881)
-- 
https://code.launchpad.net/~sebastien.beau/e-commerce-addons/e-commerce-addons-bug-1033378/+merge/141882
Your team extra-addons-commiter is requested to review the proposed merge of lp:~sebastien.beau/e-commerce-addons/e-commerce-addons-bug-1033378 into lp:e-commerce-addons/oerp6.1-stable.
=== modified file 'base_sale_multichannels/product.py'
--- base_sale_multichannels/product.py	2013-01-03 10:57:26 +0000
+++ base_sale_multichannels/product.py	2013-01-04 10:22:55 +0000
@@ -66,21 +66,6 @@
                                                             context=context)
         return res
 
-
-    def _get_categories_ids_for_shop(self, cr, uid, product_id, shop_id, context=None):
-        shop_categ_ids = self.pool.get('sale.shop').read(cr, uid, shop_id,
-                                ['exportable_category_ids'],
-                                context=context)['exportable_category_ids']
-        product = self.read(cr, uid, product_id, ['categ_ids', 'categ_id'], context=context)
-        product_categ_ids = product['categ_ids']
-        if product['categ_id'][0] not in product_categ_ids:
-            product_categ_ids.append(product['categ_id'][0])
-        res = []
-        for categ in product_categ_ids:
-            if categ in shop_categ_ids:
-                res.append(categ)
-        return res
-
     def _get_categories_ids_for_shop(self, cr, uid, product_id, shop_id, context=None):
         shop_obj = self.pool.get('sale.shop')
         shop_values = shop_obj.read(cr, uid, shop_id,
@@ -90,7 +75,7 @@
         product = self.read(cr, uid, product_id, ['categ_ids', 'categ_id'], context=context)
         product_categ_ids = set(product['categ_ids'])
         product_categ_ids.add(product['categ_id'][0])
-        return list(prod_categ_ids & shop_categ_ids)
+        return list(product_categ_ids & shop_categ_ids)
 
     def _get_or_create_ext_category_ids_for_shop(self, cr, uid, external_session, product_id, context=None):
         res = []
@@ -99,8 +84,6 @@
             res.append(categ_obj.get_or_create_extid(cr, uid, external_session, oe_categ_id, context=context))
         return res
 
-
-
 class product_template(Model):
     _inherit = 'product.template'