Hi All,

I face some technical issue and unable to get any reference. 
Please give me some advice.

I am intend to get a list of "stock.move" with "stock.shipment.in" state is 
"Receive" and "stock.move" state is "Draft".
When I create the query, I lost at where how to compare the origin. below 
is my query:

    @staticmethod
    def table_query():
        pool = Pool()
        ShipmentIns = pool.get('stock.shipment.in')
        
        Moves = pool.get('stock.move')
        move = Moves.__table__()
        
        query = move.select(
                            move.id.as_('id'),
                            Literal(0).as_('create_uid'),
                            Now().as_('create_date'),
                            Literal(None).as_('write_uid'),
                            Literal(None).as_('write_date'),
                            move.product,
                            move.quantity,
                            move.from_location,
                            move.to_location,
                            move.planned_date,
                            move.effective_date,
                            move.lot_no,
                            move.serial_no,
                            move.weight,
                            move.expiry_date,
                            where = (move.origin = {stock.shipment.in} and 
state = 'draft') ----> What is the correct query?

Please help
                            

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/0f4abfc2-d96f-4a6d-a17f-6c4dd101eb51%40googlegroups.com.

Reply via email to