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.

3

Where are mails adresses in the database ?

By
johncogitae
on 2/25/13, 8:39 AM 1,167 views

Hello ! I want to create a python script to create a lot of new users. I want to insert in the database : name, login, password and email. I'm ok with the name, password and login : it's in res.user table, but I don't find in my database where email are save...Can anybody help me?

Thanks, John

2

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 2/25/13, 8:49 AM

Every user in res.user has a related partner (partner_id). OpenERP uses the email field of table res_partner for the user's email.

If you use Python with XMLRPC you can directly set the email of the users with the field user_email in res.user. This is a related field to the email of the partner.

1
johncogitae
On 2/25/13, 9:31 AM

Sorry but in res.user there is not field usr_email.. (I'm talking about V7.0)

In PGAdmin you can see those fields for Res.user :

id serial NOT NULL, active boolean DEFAULT true, login character varying(64) NOT NULL, password character varying(64) DEFAULT NULL::character varying, company_id integer NOT NULL, partner_id integer NOT NULL, create_uid integer, create_date timestamp without time zone, write_date timestamp without time zone, write_uid integer, menu_id integer, -- Menu Action login_date date, -- Latest connection signature text, -- Signature action_id integer, -- Home Action alias_id integer NOT NULL, -- Alias share boolean, -- Share User

Field "user_email" is a related field, which only exists in Python! The real email is stored in table res_partner!

Andreas Brueckl
on 2/25/13, 10:21 AM

Ok with email, not user_email. Don't forget to put a name too. Thanks for your help :)

johnCogitae
on 2/26/13, 9:52 AM

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

0 follower(s)

Stats

Asked: 2/25/13, 8:39 AM
Seen: 1167 times
Last updated: 3/16/15, 8:10 AM