Skip to content

Commit

Permalink
removing random overwrite (choosing just last category as main) if the
Browse files Browse the repository at this point in the history
current category in odoo is one of the categories fetched from magento.
  • Loading branch information
gfcapalbo committed Sep 29, 2016
1 parent 35c2309 commit b739484
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion magentoerpconnect/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ def categories(self, record):
main_categ_id = default_categ.id

result = {'categ_ids': [(6, 0, category_ids)]}
if main_categ_id: # OpenERP assign 'All Products' if not specified
# OpenERP assign 'All Products' if not specified
# skip main cat assignment if the current main category is already in
# categ_ids
if (main_categ_id and
self.backend_record.categ_id.id not in category_ids):
result['categ_id'] = main_categ_id
return result

Expand Down

0 comments on commit b739484

Please sign in to comment.