Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5575 Zobrazení

During magento website configuration in magento connector module provided by OpenLabs, when we set the value of "Default Product UOM" field other than Unit(s), it is raising error like :

except_osv: ('ValidateError', u'Error occurred while validating the field(s) uom_id: Error: The default Unit of Measure and the purchase Unit of Measure must be in the same category.')

We also tried to solve the problem & we would like to share with everyone.

Below is our solution. Other solutions are highly appreciated.

Avatar
Zrušit
Autor Nejlepší odpověď

We have added solution in magento integration module like this:

Module : magento integration module
File : product.py
Object : product
method : create_using_magento_data

product_values.update({
    'categ_id': category_id,
    'uom_id':
        website_obj.get_default_uom(
            cursor, user, context
        ).id,
+    'uom_po_id':
+        website_obj.get_default_uom(
+            cursor, user, context
+        ).id,
    'magento_product_type': product_data['type'],
    'procure_method': 'make_to_order',
    'magento_ids': [(0, 0, {
        'magento_id': int(product_data['product_id']),
        'website': context['magento_website'],
    })]
})


Thanks,
www.acespritech.com

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
říj 24
1960
1
říj 24
1785
0
zář 23
1465
1
srp 23
3352
1
zář 21
2477