Discussion:
[tryton] How to get the form created by Wizard? Proteus Tryton 3.8
TPH
2018-03-21 14:17:01 UTC
Permalink
Hello

I try to use the Wizards stock.products_by_locations and access the results.

I do not searching for the wizard.form but for the form created by the wizard.

For example: With Tryton client I can use Products by Locations to generate a form with all products with quantity and costs.

I am not sure but I think this code creates also such a form, but how can I access after creation?

Location = Model.get('stock.location')
locations = Location.find()
for l in locations:
wizard = Wizard('stock.products_by_locations', [l])
wizard.execute('open')
# show results

Thanks
--
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/b6a1b921-f1df-441b-8f84-32e8d18f38a7%40googlegroups.com.
Cédric Krier
2018-03-21 17:06:54 UTC
Permalink
Hi,
Post by TPH
I try to use the Wizards stock.products_by_locations and access the results.
I do not searching for the wizard.form but for the form created by the wizard.
For example: With Tryton client I can use Products by Locations to generate a form with all products with quantity and costs.
I am not sure but I think this code creates also such a form, but how can I access after creation?
Location = Model.get('stock.location')
locations = Location.find()
wizard = Wizard('stock.products_by_locations', [l])
wizard.execute('open')
# show results
The wizard was only there (removed in 4.2) to setup the context like
locations with the ids of the locations.
So you can just browse the product records with the right context to get
the values.
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180321170654.GK3935%40kei.
Loading...