Odoo Help

Welcome!

This community 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.

0

How can i override the res_user email field (that _inherits from res_partner)

By
Joeri Belis
on 12/17/14, 5:20 AM 360 views

In res_partner we have added a work_email field. Every module that now uses res_user.email should start using the res_user.work_email

offcourse we can't change all the code.

Can i add a new field to res_user 'email': fields.related('email_work', type='char') and have now all code using the other email?

 

0
Joeri Belis
On 12/17/14, 5:34 AM

Both fields need to be in res_partner.

But all internal mail should go to email_work. people can have a private email also as our application has also an external use where we communicate via email instead of email_work

So copying is not a working solution

 

 

Well, the problem with the solution that you are proposing will actually "removes" the original email field. Which not what you desire, CMIIW. So, since OpenERP is working with the main 'email' field for mailing, it would be best to keep the main email address in the 'email' field and then let the other email address be just informational field.

Ivan
on 12/17/14, 5:44 AM
0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/17/14, 5:27 AM

Would it be easier if you just migrate (copy) the values from work_email to email?  Why is work_email in the first place?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/17/14, 5:20 AM
Seen: 360 times
Last updated: 3/16/15, 8:10 AM