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.

1

Is there any way to import Users and/or their passwords in Odoo?

By
Zura Tsiklauri
on 9/4/15, 8:29 AM 1,123 views

I have about 2000 Users who will pay Invoices through portal. I want to import those users in Odoo and import their passwords as well. Is there any module or way to do this?

I am well aware of the Odoo CSV import functionality but it doesn't allow me to create users through CSV import. 


1
Ludovic CHEVALIER
On 9/4/15, 10:33 AM

Hi!

You can import them with a custom module and an xml data file like this (in 7 version, but this should be equivalent in 8 version):

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="partner_1" model="res.partner">
<field name="name">Partner 1</field>
<field name="company_id" ref="base.main_company"/>
<field name="parent_id" ref="base.main_company"/>
<field name="customer" eval="False"/>
<field name="country_id" ref="base.fr"/>
</record>
<record id="user_1" model="res.users">
<field name="partner_id" ref="partner_1"/>
<field name="login">partner1</field>
<field name="password">o0YneDzGo</field>
<field name="name">Partner 1</field>
<field name="signature">Partner 1</field>
<field name="company_id" ref="base.main_company"/>
<field name="groups_id" eval="[(4,ref('account.group_account_user'))]"/>
<field name="groups_id" eval="[(4,ref('account.group_account_invoice'))]"/>
</record>
<record id="partner_2" model="res.partner">
<field name="name">Partner 2</field>
<field name="company_id" ref="base.main_company"/>
<field name="parent_id" ref="base.main_company"/>
<field name="customer" eval="False"/>
<field name="country_id" ref="base.fr"/>
</record>
<record id="user_2" model="res.users">
<field name="partner_id" ref="partner_2"/>
<field name="login">partner2</field>
<field name="password">IzWJt4nu</field>
<field name="name">Partner 2</field>
<field name="signature">Partner 2</field>
<field name="company_id" ref="base.main_company"/>
<field name="groups_id" eval="[(4,ref('account.group_account_user'))]"/>
</record>
</data>
</openerp>

See also: https://www.odoo.com/documentation/8.0/howtos/backend.html


Bye!

0

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
896
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.

https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile

tibrahim@2p.com.sa

Tarek Mohamed Ibrahim
On 9/4/15, 10:30 AM

I checked the 'more' options button and there is no 'import' option there. I think you can create a separate view with a method that method has to read a CSV file into array of dictionaries, one per user, and call the res_users.create method per user, this will update your database. Some trials are needed to adjust the dictionary to not miss any field.

-1
Zicklee
On 9/4/15, 1:32 PM

export their user names and passwor to a csv file, then use import utility of odoo to import them to odoo database.

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: 9/4/15, 8:29 AM
Seen: 1123 times
Last updated: 9/4/15, 1:32 PM