[TRUNK] available_sort_by bug/feature magento limitation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magento OpenERP Connector |
Fix Committed
|
High
|
Alexandre Fayolle - camptocamp |
Bug Description
Hi
On previous version the attributs available_sort_by was uncorrectly supported. Indeed the field available_sort_by was a many2one in openerp and a multiselect in magento. Now the field is a many2many in Openerp.
I just finish to refactor the code and and it's look like the syncronization openerp=>magento is still not correct.
Indeed if I push the value with the data None for available_sort_by (this is mean 'use default configuration') it's work perfectly.
But if I push with some option (for example : ['price', 'name']) Magento raise an error and tell us that the attributs available_sort_by is require. It's look like that with some version of magento the API have a bug.
I will try to spend more time to fix it but as the refactor doesn't introduce any regression, It not a priority for the moment.
Indeed tou can you syncronize still syncronize (as before) the category using the default configuration for default_sort_by and available_sort_by.
If it's really important for you to have this feature working perfectly, ask us.
Best regards
change done on trunk rev 469 and 470
Related branches
- Guewen Baconnier @ Camptocamp: Approve
-
Diff: 796 lines (+705/-4)10 files modifiedmagentoerpconnect/__openerp__.py (+7/-0)
magentoerpconnect/settings/1.4.0.0/external.mapping.template.csv (+14/-0)
magentoerpconnect/settings/1.4.0.0/external.mappinglines.template.csv (+321/-0)
magentoerpconnect/settings/1.4.0.0/external.referential.type.csv (+2/-0)
magentoerpconnect/settings/1.4.2.0/external.mapping.template.csv (+14/-0)
magentoerpconnect/settings/1.4.2.0/external.mappinglines.template.csv (+318/-0)
magentoerpconnect/settings/1.4.2.0/external.referential.type.csv (+2/-0)
magentoerpconnect/settings/1.5.0.0/external.mappinglines.template.csv (+4/-4)
magentoerpconnect/settings/update/fix_product_categories.sql (+7/-0)
magentoerpconnect/settings/update/magerp.product_category_attribute_options.xml (+16/-0)
- Guewen Baconnier @ Camptocamp: Pending requested
-
Diff: 4695 lines (+3433/-115) (has conflicts)27 files modifiedmagento_sku_is_code/product.py (+29/-10)
magentoerpconnect/__openerp__.py (+16/-1)
magentoerpconnect/board_view.xml (+30/-0)
magentoerpconnect/magerp_core.py (+28/-12)
magentoerpconnect/magerp_menu.xml (+3/-27)
magentoerpconnect/magerp_osv.py (+129/-20)
magentoerpconnect/partner.py (+252/-0)
magentoerpconnect/partner_view.xml (+38/-0)
magentoerpconnect/product.py (+752/-19)
magentoerpconnect/product_images.py (+54/-5)
magentoerpconnect/sale.py (+594/-0)
magentoerpconnect/sale_view.xml (+19/-0)
magentoerpconnect/settings/1.3.2.4/external.mapping.template.csv (+1/-1)
magentoerpconnect/settings/1.3.2.4/external.mappinglines.template.csv (+244/-20)
magentoerpconnect/settings/1.4.0.0/external.mapping.template.csv (+14/-0)
magentoerpconnect/settings/1.4.0.0/external.mappinglines.template.csv (+321/-0)
magentoerpconnect/settings/1.4.0.0/external.referential.type.csv (+2/-0)
magentoerpconnect/settings/1.4.2.0/external.mapping.template.csv (+14/-0)
magentoerpconnect/settings/1.4.2.0/external.mappinglines.template.csv (+318/-0)
magentoerpconnect/settings/1.4.2.0/external.referential.type.csv (+2/-0)
magentoerpconnect/settings/1.5.0.0/external.mapping.template.csv (+17/-0)
magentoerpconnect/settings/1.5.0.0/external.mappinglines.template.csv.OTHER (+330/-0)
magentoerpconnect/settings/update/fix_product_categories.sql (+7/-0)
magentoerpconnect/settings/update/magerp.product_category_attribute_options.xml (+16/-0)
magentoerpconnect/stock.py (+19/-0)
magentoerpconnect_payment/sale.py (+95/-0)
magentoerpconnect_product_variant/product.py (+89/-0)
Changed in magentoerpconnect: | |
status: | New → Confirmed |
importance: | Undecided → Low |
description: | updated |
Changed in magentoerpconnect: | |
assignee: | nobody → Sébastien BEAU - http://www.akretion.com (sebastien.beau) |
Changed in magentoerpconnect: | |
status: | In Progress → Fix Committed |
I'm affected by this bug and here is what I found while digging around.
1. It seems that the underlying magento bug is fixed in magento >= 1.4.2. Unfortunately, I'm stuck with 1.4.0.1.
2. People have found a local fix, eg on http:// magja.googlecod e.com/svn- history/ r417/trunk/ src/main/ java/com/ google/ code/magja/ model/category/ Category. java, there is the following doc string for setAvailableSortBy
Run this SQL query first to fix the available_sort_by bug (tested with Magento 1.4)
<code> update eav_attribute set is_required = 0 where attribute_code = 'available_ sort_by' ;</code> www.magentocomm erce.com/ bug-tracking/ issue?issue= 6842 www.magentocomm erce.com/ boards/ viewthread/ 48088/# t198697
See:
http://
http://
3. if accessing the magento DB is not possible, then a safer way is to pass an empty string, which is processed by Magento as meaning "use all categories". This also works for the default_sort_by attribute (in which case Magento interprets this as 'use the parameters of the configuration'. In any case, passing the string "None" (which is the current behavior of the connector) is a bug. Empty string is what must be passed.