2
votes

I want get a list of ids in odoo 9...

No working because expected a singleton

order_recs = order_obj.search([('date_order','<=',previous_start_date),('date_order','>=',previous_new_rec_date)]).id

order_line_recs = order_line_obj.search([('order_id','in',order_recs)])

I expected order_line_recs with a list o order_line

1
Can you provide more information or reference code?Vishal Khichadiya

1 Answers

3
votes

Instead of the id attribute, you should use ids. Example:

order_recs = order_obj.search([('date_order','<=',previous_start_date),('date_order','>=',previous_new_rec_date)]).ids

Which will return the list of ids from the RecordSet.