Many2One filter with reference to another many2one field

Hey Experts

I am trying to get inventory moves related to supplier shipments

here is what I am currently doing

class QualityControlPreproduction(Workflow, ModelSQL, ModelView):
    "Quality Control Preproduction"
    __name__ = "quality.control.preproduction"
    shipment = fields.Many2One('', "Supplier Shipment",
            ('state', '=', 'done'),
    moves = fields.Many2One('stock.move', "Moves",
                domain=[('shipment', '=', Eval('shipment')),]

but the I can’t see any records at all

Any example is much appreciated

shipment on stock.move is a reference field so you must search using model name and id like:
('shipment', '=', ('', Eval('shipment', -1)).

1 Like