Odoo Help


Why in functions called by fields.function(called_function,...) the field uid is always 1?

Anabela Damas
on 7/3/14, 6:06 AM 1,988 views


I'm trying to save who has changed the state of the invoice but in _get_invoice_user_edit the uid field is always equal to 1 (Administrator).

class account_invoice(osv.osv):

    def _get_invoice_user_edit(self, cr, uid, ids, field_name, arg, context=None):
        result = {}
        return result

_inherit = "account.invoice"
    _columns = {

 'invoice_user_edit': fields.function(_get_invoice_user_edit ,method=True, type="char", store={'account.invoice': (lambda self, cr, uid, ids, ctx={}: ids , ['state'], 9),}, string="User Edit"),


Do you know how can I save this information ? 




Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 7/15/14, 5:49 AM


yes for functional.fields compute method will be evaluated by super admin only...

If you are using Version 7 or 8, use "track_visibility" attribute for a column, that way you will have a track of such things

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/3/14, 6:06 AM
Seen: 1988 times
Last updated: 3/16/15, 8:10 AM