El 15/07/16 a les 13:53, Jon Levy ha escrit:
I have a window with a domain that will usually be satisfied by only a
single record. Think of it as a "your next task to do" window. In most
cases, there will be one "next" task. However, sometimes there will be
zero, and sometimes more than one (the user has fallen behind). I would
like the view to default to form view if there is only 1 record, but
default to list view if there are zero or >1 records. Is this possible?
You have to open it from a wizard, and then reverse the action views if
the length of computed pending tasks is one.
You have and example in the account_invoice module, on the wizard used
to credit invoices [1]
Hope it helps!
[1]
http://hg.tryton.org/modules/account_invoice/file/3487c50ee235/invoice.py#l2666
--
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/5788D45E.8090002%40koolpi.com.