Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consulting
    • Accounting Firm
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Solar Energy Systems
    • Shoe Maker
    • Serveis de neteja
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

How to import user in odoo12 ?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
importusersodoo12
2 Respostes
7442 Vistes
Avatar
Ankit H Gandhi(AHG)

Hello All,

I have 100+ users, some users have different-different groups

How can I achive this using python script or  what's the standard way to import it. ?

Thanks in Advance.



0
Avatar
Descartar
Avatar
Mitul Shingala
Best Answer

Hello Ankit,

based on the amount of data it depends.  if you have some validation on import like duplicate data will be skip and etc.. at that time you can use python script. 

1. using python script also you can import.

for eg.    self.env['res.users'].create({'name': 'abc', 'login': 'abc@mail.com', 'groups_id': [(6, 0, [list of groups ids])]})

2. using odoo's import feature you can import the .csv file and assign different groups to user as per below screen you can see.

https://prnt.sc/oaeae0

1
Avatar
Descartar
Ankit H Gandhi(AHG)
Autor

Thanks @ Mitul +1

Avatar
Mihran Thalhath
Best Answer

Hi Ankit,


You can import the user details using a csv file or an excel file. When I tried importing users the last day, it was taking an unusual amount of time. So I wrote a simple python function to create users and assign correct permissions. To set the correct permissions, find the field names of the permissions you need to apply while creating the users. These field name will be like 'sel_groups_1_9_10'. Just as the name suggests, those numbers are the values which the field can take. So create a list of dictionaries, with the users and their details. For example

users = [('name': 'Test', 'login': 'test@test.com', 'email': 'test@test.com', 'password': '', 'sel_groups_1_9_10': 1), ('name': 'Employee', 'login': 'employee')]

Now iterate over this list of dictionaries and create users based on these values.


for each in list:
    self.env['res.users'].create({'name': each['name'], 'login': each['email'], 'password': '',
'sel_groups_11_12': each['sel_groups_11_12'], 'sel_groups_17_18': each['sel_groups_17_18']})

This will create users with the corresponding values given in the list
4
Avatar
Descartar
Ankit H Gandhi(AHG)
Autor

Thanks @ Mihran +1

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Trying to import xls file to create employees. Solved
import odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
4
de juny 25
13186
managing access rights to import in odoo 12 Solved
import users access rights odoo12 Odoo12.0
Avatar
Avatar
Avatar
2
d’ag. 22
8954
Can't import account_payment module
module import odoo12
Avatar
Avatar
1
d’oct. 23
97
Access Right Show Full Accounting Features as default when creating user Solved
users access rights odoo12
Avatar
Avatar
Avatar
Avatar
Avatar
4
d’abr. 23
12272
O12 Product Import - Chatter information on the right is missing Solved
product import odoo12
Avatar
Avatar
Avatar
2
de set. 21
3428
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now