Thanks a lot for the quick answer!
In fact it seems like I was using the method correctly, but your mention of
the keyword "database" made me think that the problem may be that my
database got corrupted on upgrade.
And that was the case... :)
It is now fixed (drop and made a new one... luckily it's development
database or I'll be in trouble...)
Thanks!
El jueves, 27 de septiembre de 2012 23:45:58 UTC-3, Miguel Tasende escribió:
>
> 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...
> In any case, I get an error message that says that the value "None" is not
> permitted for "menu", due to a sql rule (I get the message in Spanish but
> that's more or less what it says).
> I tried to define "menu" inside the "create" dictionary, but the same
> message keeps showing.
>
> The function "default_menu" has an "if" which in case of failing returns
> "None". I believe that is what's happening, but don't know why.
>
> If anyone has any suggestion I will greatly appreciate it.
>
--
[email protected] mailing list