[6.1-legacy] Export Catalog broken if product_type == 'grouped'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magento OpenERP Connector |
Triaged
|
Undecided
|
Guewen Baconnier @ Camptocamp |
Bug Description
This report is for
=======
Openerp6.
=======
This is the method in product_
def action_
logger = logging.
if context.
bom_ids = self.read(cr, uid, id, ['bom_ids'
if len(bom_ids): # it has or is part of a BoM
for row in results:
if child_ids: #it is an assembly and it contains the products child_ids:
else:
else:
return quantities, child_ids
There are inconsistencies in this method:
- if NOT mrp_is_installed, we don't initialize 'quantities' and 'child_ids' variables
- if mrp_is_installed but there are no BOMs, we return False
The first one is an error itself, because the method uses those variables at the end of the execution, within the 'return' statement
The second one results in a "TypeError: 'bool' object is not iterable", because the code that uses it does not expect a False:
quantities, child_ids = self.action_
Attached is a patch that mitigates the stop in the execution. Don't know if it is valid in terms of this module logic though.
Greetings,
Related branches
description: | updated |
summary: |
- Export Catalog broken if product_type == 'grouped' + [6.1-legacy] Export Catalog broken if product_type == 'grouped' |
tags: | added: 6.1-legacy |
Changed in magentoerpconnect: | |
assignee: | nobody → Guewen Baconnier @ Camptocamp (gbaconnier-c2c) |
Changed in magentoerpconnect: | |
status: | New → Triaged |