I do not understand the syntax 'prod.uom_id' in the "def onchange_product_id" method of the module "purchase_requisition".
Is not this rather 'product.uom_id?
.....
value = {'product_uom_id': prod.uom_id.id, 'product_qty': 1.0}
----
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I do not understand the syntax 'prod.uom_id' in the "def onchange_product_id" method of the module "purchase_requisition".
Is not this rather 'product.uom_id?
.....
value = {'product_uom_id': prod.uom_id.id, 'product_qty': 1.0}
----
Hi Maurice,
prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
value = {'product_uom_id': prod.uom_id.id, 'product_qty': 1.0}
You can see in the above code. There is a object called "prod".
uom_id is the attribute of prod. so that's why it should be prod.uom_id
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up