Odoo Help


Shall I record the user's name when he/she modify some fields?

on 7/21/16, 3:53 AM 702 views

for example:


NO = fields.Char('Number')



I want the effect:

when somebody modified the field "NO"; his/her name should be record by "Modifier";

I use "onchange" and "depends", but failed; could you give me some advice?

Please share whatever code you have tried already.

Sudhir Arya (ERP Harbor Consulting Services)
on 7/22/16, 3:00 PM

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 7/22/16, 3:03 PM


You just have to check if NO field is modified or not and then store the current logged in user's ID in modifier.


def write(self, vals):
if 'NO' in vals:
vals.update({'Modifier': self._uid})
return super(your_class_name, self).write(vals)

it is so cool; these code meets my requirement perfectly.

Thank you very much for your time and effort.

on 7/24/16, 9:10 AM

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/21/16, 3:53 AM
Seen: 702 times
Last updated: 7/24/16, 9:10 AM