Re: [tryton] Setting default values for wizard start form
Thanks a lot. -- 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/CAM3N3CxstPA461ZNayDwJc10scNhCB6AEKpggZgwjoyBYW8OBg%40mail.gmail.com.
Re: [tryton] Setting default values for wizard start form
El 01/12/17 a les 11:42, Khurram Shahzad ha escrit: It is not working and throwing keyError. Any ideas on how to set default values for wizard from xml file? You can't. You should define a python code that set the default values of your StateViews by using a default_ method. This method can return values from the context if you want. Additionally, you can set the default values of a transition, by setting the default_ method on the wizard. This method can read values from previous wizard steps. See [1] for an example. Hope it helps. [1] http://hg.tryton.org/modules/account/file/e1457237de9e/account.py#l2128 -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk -- 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/a23bca1f-a10c-2386-182f-018878c9c0e1%40koolpi.com.
[tryton] Setting default values for wizard start form
Hi, I saw an example where some values are passed using field names 'context' and 'domain' as: Medicament by Category gnuhealth.medicament Clearly, value for 'categories' is passed. I want to achieve the same for my wizard but it failed: Request Procedure anth.patient.proc.test.request ** form_action gnuhealth.patient,-1 Here I am trying to pass a Boolean value for a field 'day_care_test' to be true. This field will be shown on the startup form of wizard and I want it sometimes checked and sometimes unchecked by default. It is not working and throwing keyError. Any ideas on how to set default values for wizard from xml file? Regards, Khurram. -- 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/CAM3N3CzKufmq0L%2B9gWBUat5daPzGpvej%3DUocQb4m3vqrwDBmig%40mail.gmail.com.