This question has been flagged
1 Reply
12194 Views

Please can someone help me...why am I getting this error when I click on this field? And how can I fix it?

here is the field on my xml file: <field name="my_product_id" domain="[('self.pool.get('product.product').browse(cr, uid, product_id).qty_available','>', 0)]" on_change="onchange_my_product_id(my_product_id)"/> And this is the field in my py file: 'my_product_id': fields.many2one('product.product', 'Product', required=True, select=True)

What am I not getting please? Thank you

Avatar
Discard
Best Answer

Hello,

You are using python code in xml file which is not allowed.

Avatar
Discard