Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can i get sales orders which does not contain Order lines in openerp?

By
samba
on 10/20/14, 3:24 AM 625 views

saleorderids_notcontains_orderline = saleorder_obj.search(cr,uid,[('order_line','is',None)])

I have written above query to get sales orders which does not contain Order lines in openerp.

It is giving thi error. " ValueError: Invalid leaf ('order_line', 'is', None) ". Pleae can any one solve this error? (OR ) suggest me a way how can i get sales order id's which doesnot contain sale order lines.

The definition of the column in sales order table. 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),

Thank you Ajay,

I am facing some more problem. Sales delivery automation. Can you please look into this problem http://119.235.51.66:8069/?db=KelltonTechSolutions_test&ts=1413806813699#action=97

On Mon, Oct 20, 2014 at 2:40 PM, Ajay <ajay.chauhan727@mail.odoo.com> wrote:

A new answer for How can i get sales orders which does not contain Order lines in openerp? has been posted. Click here to access the post.

--
Ajay
Sent by Odoo Inc. using Odoo about Forum Post How can i get sales orders which does not contain Order lines in openerp?

samba
on 10/21/14, 2:09 AM
1
Ajay
On 10/20/14, 5:10 AM

Hello Samba,

Try as saleorderids_notcontains_orderline = saleorder_obj.search(cr,uid,[('order_line','=',False)])

This will work.

Please add correct spacing, we can't read your answer.

NUMERIGRAPHE
on 10/20/14, 5:12 AM

Domain needed is : [ ( 'order_line', '=', False) ] . Hope it is visible now.

Ajay
on 10/20/14, 5:33 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 10/20/14, 3:24 AM
Seen: 625 times
Last updated: 3/16/15, 8:10 AM