> _defaults = {
> 'needs_ini_approval': lambda *args: 1,
> 'needs_cus_approval': lambda *args: 1, # This should work. try again
> by restating the server.
> 'custodian_id': lambda obj, cr, uid, context: uid
> }
>
Thanks a lot. It works. Why it was not working was because my code was
corrupted (the entire class was repeated somewhere below, without the
_defaults!). Silly.
>
> If you want the current user to be assigned, then the custodian_id should be
> many2one of res_users.
>
> 'custodian_id': fields.many2one('res.users', 'Custodian', required=True),
> uid refers to the the id of logged in User.
Oh yes. Thanks a lot. I will try to get the corresponding employee from the uid
and put it here.
thanks,
------------------------
Sanjay
RAD Solutions Private Limited
sanjay at radsolutions co in
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=27306#27306
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users