Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
10406 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
3439
5
jul 20
6691
2
jul 19
6684
1
jun 16
7574
0
jul 15
3918