Skip to Content
Menu
This question has been flagged
1 Reply
1239 Views

The pos module extends `product.template` and adds `available_in_pos` field. In a select field to choose a product, I would like to filter only products available in pos.

I tried the domain `[('product_tmpl_id.available_in_pos', '=', True)]` but I get this error

`Unknown field "product.template.available_in_pos" in domain of ([('product_tmpl_id.available_in_pos', '=', True)]))`

Anyone knows how I achieve this?

Avatar
Discard
Best Answer

Hi, 

Try to add domain like this

product_id = fields.Many2one('product.product',string='Product',domain=[('product_tmpl_id.available_in_pos','=',True)])
Add point_of_sale in the depends of the manifest file

Regards

Avatar
Discard
Author

Adding point_of_sale as a dependency is what I was missing. Thanks!

Related Posts Replies Views Activity
2
Dec 24
3116
1
Dec 24
343
4
Nov 24
1362
1
Sep 24
1132
1
Sep 24
1198