Skip to Content
Menu
This question has been flagged
3 Replies
10405 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. 


Avatar
Discard
Best Answer

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!

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
3439
5
Jul 20
6690
2
Jul 19
6684
1
Jun 16
7574
0
Jul 15
3918