With the autocompletion on many2one, we often type the name of the record and if we don't find it, we click on create. At this point, we have to type again the name. So if the client sent in the context the typed named, we could use it in default method to set default values and prevent to re-type it.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
I'm not a fan of the key name 'rec_name', I think it could be too error prone. I think about something more like 'default_rec_name'.
I don't understand what is the need to create a "default_method" on the server. I think the "default_get" method could simply be extended to fill by default the value of the "_rec_name" if it is a field otherwise nothing.
New changeset b5c38a786fb7 by C?dric Krier in branch 'default':
Use 'default_rec_name' context key in Model.default_get
http://hg.tryton.org/trytond/rev/b5c38a786fb7
Roundup Robotadded 1 deleted label and removed 1 deleted label
New changeset 2a1025c19784 by C?dric Krier in branch 'default':
Set 'default_rec_name' context key when query default_get
http://hg.tryton.org/tryton/rev/2a1025c19784
New changeset 5b447f80162c by C?dric Krier in branch 'default':
Set 'default_rec_name' context key when query default_get
http://hg.tryton.org/sao/rev/5b447f80162c