This question has been flagged
1 Reply
4128 Views

Hi, 

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 ? 

Thanks

 

Avatar
Discard
Best Answer

Hi...

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

Avatar
Discard