Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
7226 Ansichten

Hii Community,


I am trying override base email template(noupdate=1) but, unable to override. Also, search for my issue but didn't get proper solution.

So, anybody can help me for this issue.

my code is like:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="0">
        <!-- Email template for reset password -->
        <delete id="auth_signup.reset_password_email" model="mail.template"/>
        <record id="reset_password_email" model="mail.template">
           . . .
        </record>
        <!-- Email template for new users -->
        <delete id="auth_signup.set_password_email" model="mail.template"/>
        <record id="set_password_email" model="mail.template">
            . . .
        </record>
    </data>
</odoo>

This error comes when create new user:

ValueError: External ID not found in the system: auth_signup.reset_password_email

Thanks in advance

Avatar
Verwerfen
Beste Antwort

Hi,

You have this error because you had deleted the native email template auth_signup.reset_password_email

So, if you need to change the noupdate = 1 value for any specific record to override it, you can do like the below code (adapt it as your need):

<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value eval="[('module', '=', 'auth_signup'), ('name', '=', 'reset_password_email')]"/>
</function>
<value eval="{'noupdate': False}"/>
</function>

<record model="mail.template" id="auth_signup.reset_password_email">
<field name="email_to">contact@odoomadagascar.com</field>
</record>

Best regards!

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
März 23
6214
1
Sept. 21
3286
1
Sept. 19
6471
1
Okt. 21
4733
5
Juni 20
31786