Le Fri, 28 Sep 2012 11:48:04 +0200,
Bertrand Chenal <[email protected]> a écrit :

> Le Thu, 27 Sep 2012 19:45:58 -0700 (PDT),
> Miguel Tasende <[email protected]> a écrit :
> 
> > Hi!
> > Maybe this question is too simple....
> > 
> > I am trying to make a new user with:
> > 
> > usr_obj = Pool().get('res.user')
> > usr_obj.create({'name':'my_name','login';'my_login','password':'my_password')
> > 
> > I see there are 2 other required fields (in fact password isn't but
> > I want to use it): "login_try" and "menu" but they have default
> > functions, so in theory they should be assigned automatically...
> 
> Hi,
> 
> The default values are filled automatically ... by the client. So you
> need to fill them. You can do it by yourself or you can call
> default_get() on usr_obj, and add those values to the dict you pass to
> create.

I answered to quickly, this is wrong, the create method does call
default_get.

If default_menu return None as you suggested, this would mean that the
default menu action is missing from the db.


-- 

Bertrand Chenal

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Email: [email protected]
Website: http://www.b2ck.com/

-- 
[email protected] mailing list

Reply via email to