Hi,
I would like to use the purchase_requests inside my flask app, but don’t know, how to handle wizards.
To generate requests I’m using following:
purchase_request = tryton_pool.get('purchase.request') params = { 'products': (product,), 'warehouses': None, } requests = purchase_request.generate_requests(**params) request, = purchase_request.search([('product.id', '=', product.id)])
And now comes the point, I need to update the request with party,quantity, etc. Do not know, how to proceed to purchase_line or how to perform
request.party = my_party
This is the code I’m trying to simulate wizard behaviour, but stopped at the argument in wizard.execute().
wizard = tryton.pool.get('purchase.request.create_purchase', type='wizard') session_id, start_state, end_state = wizard.create() wizard.execute(session_id, ???, start_state)
Or if there is any other approach, how to simply use purchase.requests, please show me directions.
Thanks for help,
M+