Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
10530 Widoki

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. 


Awatar
Odrzuć
Najlepsza odpowiedź

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!

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
3502
5
lip 20
6812
2
lip 19
6807
1
cze 16
7681
0
lip 15
3976