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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
1239
Views
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
Adding point_of_sale as a dependency is what I was missing. Thanks!
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Dec 24
|
3116 | ||
|
1
Dec 24
|
343 | ||
|
4
Nov 24
|
1362 | ||
|
1
Sep 24
|
1132 | ||
|
1
Sep 24
|
1198 |