Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
10346 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 15
3402
5
čvc 20
6642
2
čvc 19
6632
1
čvn 16
7533
0
čvc 15
3884