Product Category Sort By Issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magento OpenERP Connector |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The handling of the product.category 'available_sort_by' and 'default_sort_by' is extremely fragile at present.
Magento modules can add custom fields to these attributes, and the 'available_sort_by' attribute is multi-valued. These issues result in various errors when trying to import product categories:
('ValidateError', 'The value "vote_rating" for the field "default_sort_by" is not in the selection')
If a category has more than one value for 'available_sort_by' the code tries to write a list into the selection field, causing a similar error to the one above. I have worked around this temporarily by changing the import mapping code to:
result=
I have had to manually amend the selection field definition in product.py to fix the first error.
My suggestion would be to have 'available_sort_by' as a many2many field and 'default_sort_by' as a one2many field. Is it possible to pull a list of available sort by options from Magento via the API?
This is definitely a bug, It does not like any entry in that column in the database. Confirming.