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

z_group = fields.Char('Default Group')

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
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 

Reply via email to