Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Openlabs Magento module error: Invalid uom_id

By
Acespritech
on 11/1/13, 8:01 AM 2,032 views

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.

0

Acespritech

--Acespritech--
839
| 3 2 6
India
--Acespritech--

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.


Skype : acespritech

Email : info@acespritech.com

Acespritech
On 11/1/13, 8:09 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/1/13, 8:01 AM
Seen: 2032 times
Last updated: 3/16/15, 8:10 AM