我正在使用Odoo V12并尝试在某个日期查询产品,但是此查询未返回正确的值。有谁知道可能是什么问题?
products = self.env['product.product'].\
search([('type','=','product'),('qty_available','!=',0)]).\
with_context(dict(to_date=self.date,company_owned=True,create=False,edit=False))