El 11/10/16 a les 03:28, Ryan ha escrit:
On Sunday, October 9, 2016 at 3:00:04 PM UTC+8, Ryan wrote:
Thanks Sir Sergi.
I'll try it later and update this trend asap.
sorry... but I got blank result on this: please see code below. any help
please...
z_group = fields.Char('Default Group')
@staticmethod
def default_zgroup():
pool = Pool()
User = pool.get('res.user')
user = User(Transaction().context['user'])
return user.groups
Here are returning user.group instances instead of string, which is the
expected behaviour of the Char fields. If you wan to return a string,
you can return the rec_names of the groups joined by comas using:
return ','.join([u.rec_name for r in user.groups])
--
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/810d7811-b723-bbb5-fca8-c43c4c6384ba%40koolpi.com.