Here is my question:
find location where product_id = some_id and id is not 7 ?
the method below won't work
location = self.env['stock.quant'].search([('product_id','=',product_id.id),('location_id','!=',7)])
How should I do it ?
Thanx in advance ;)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Here is my question:
find location where product_id = some_id and id is not 7 ?
the method below won't work
location = self.env['stock.quant'].search([('product_id','=',product_id.id),('location_id','!=',7)])
How should I do it ?
Thanx in advance ;)
In search() method, the domain should be [[...]] and not [(...)]
in field declaration and xml the usage is reversed.
I see the problem in the domain, use it like this [('product_id.id','=',product_id.id).....
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Use the SQL API!! :)
Agree, but I would like to use Odoo API before I'll use SQL if possible of course :)