Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Disable invitation email when creating user

Odebírat

Get notified when there's activity on this post

This question has been flagged
ldapemailnotification
4 Odpovědi
17674 Zobrazení
Avatar
Sellem

Hi all,

I am setting up a self-hosted Odoo 8.0 to test some features and I activated LDAP Authentication.

LDAP is working fine but when I create a user, I have the following message :


"An invitation email containing the following subscription link has been sent:

http://odoo.mycompany.eu/web/reset_password?token=XXXXXXXXXXXXXX=XXXX"


I didn't find how to disable this invitation, someone has any idea of how to do it ?

I would like to know if it's also possible to make bulk import with LDAP, I mean just specify an OU and import all users inside this OU, any idea ?

Thanks for your help :)



4
Avatar
Zrušit
A. Person

Did you find any way to disable the invitation email? I'd like to do that too.

Avatar
Aron Lorincz
Nejlepší odpověď

I browsed the source code and it turned out to be pretty easy. If you add  `no_reset_password` to the context, it won't send an email. You can then set the password manually (and find a way to let the user know it, obviously).

user = self.pg_user = self.env["res.users"].sudo().with_context(no_reset_password=True).create({
# user details here...
})
4
Avatar
Zrušit
feriel bendimerad

Hi Aron, coud you be more specific , which module do i have to change?

Aron Lorincz

Hi Feriel, The question is about how to disable email when you create it programmatically, so it assumes you already have your custom module installed. If you don't have a custom module, then create one, as it's really a bad idea to change other modules' source code, because your changes will be erased if you update that module to a newer version.

feriel bendimerad

Hi Aron , i got it , i actually have a custom module, do i have to inherit from the mail module? It has res_users.py file , if so , should i override the "create" methode only or others , please enlightened me .Thanks

Aron Lorincz

You should create your own res_users.py like this: class res_users(models.Model): _name = "res.users" _inherit = "res.users" Then override method "signup" and call the superclass method with the context parameter I mentioned in my answer. Hope it helps.

feriel bendimerad

thank you for help , but i missing something ,what should i put in user details ?

Aron Lorincz

The name, login, password, etc. of the user you want to create programmatically. This's what the original question was about. If you want to prevent Odoo from sending an invite when creating an user MANUALLY, you should just override the "signup" method in the "res.users" model like I described above.

feriel bendimerad

well , i'm creating a user using webservice API (java language) , and an email invitation is sent to him to change his password , so what do you mean by override "signup " method? changing only the context

Aron Lorincz

Can you pass context parameters via the API? If you can, I think it's enough to pass no_reset_password=True, then it won't send an email. If you can't pass context params via the webservice API, then create a new method in res.users which takes parameters about the user you want to create and creates it in the way I described in my answer.

Aron Lorincz

ps: and call that method via the API, obviously.

ubik

@Aron thanks for your answer, it helped. Just a question, why sudo() call is necessary?

Aron Lorincz

Well, it's not really necessary if the user that runs this code has rights to create users, but that was not the case in my code.

Avatar
tinnanka2
Nejlepší odpověď

Thanks for all the information shared here!

0
Avatar
Zrušit
Avatar
Pedro Vagner
Nejlepší odpověď

On Odoo 12, to disable via XML, just put no_reset_password context attribute:

<record id="demo_user0" model="res.users" context="{'no_reset_password': True}">
<field name="partner_id" ref="partner_demo_portal"/>
<field name="login">portal</field>
<field name="password">portal</field>
<field name="signature"><![CDATA[<span>-- <br/>Mr Demo Portal</span>]]></field>
<field name="groups_id" eval="[(5,)]"/><!-- Avoid auto-including this user in any default group -->
</record>
0
Avatar
Zrušit
Avatar
Emmanuel Belair
Nejlepší odpověď

Hi, i know this post is a little bit old....

I'm beginner and i don't know how add this code inside a module. Could you post a more complete example please?

0
Avatar
Zrušit
Jonathan Leaders

I presume you could search for that line of code (with a grep like tool) in a locally cloned github repository

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Is there an Email Notification on Leads/Issues?
email notification
Avatar
Avatar
4
srp 16
7260
Mail Notification while approving leave in OpenERP in Andoird
email notification
Avatar
0
bře 15
4797
ODOO [15.0] : Email - force options - Request a Delivery Receipt and Request a Read Receipt
email notification odoo15
Avatar
0
čvn 24
2054
Send email notifications through discuss module Vyřešeno
email notification discuss
Avatar
Avatar
1
bře 24
3637
Create an email notification in odoo
mail email notification
Avatar
Avatar
1
úno 24
4070
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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