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

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

Hello Pawan Kumar Sharma,


You are deleting email template and that's why you are facing this issue i.e External ID not found. Instead of deleting those email template please try to update like this.


<function name="write" model="ir.model.data">

    <function name="search" model="ir.model.data">

        <value eval="[('module', '=', 'res_users'), ('name', '=', 'reset_password_email')]" />

        </function>

        <value eval ="{'noupdate': False}" />

</function>

<function name="write" model="ir.model.data">

    <function name="search" model="ir.model.data">

        <value eval="[('module', '=', 'res_users'), ('name', '=', 'set_password_email')]" />

        </function>

        <value eval ="{'noupdate': False}" />

</function>


And inherit both template and change template value accordingly your requirement and after that again set no-update true like 


<function name="write" model="ir.model.data">

    <function name="search" model="ir.model.data">

        <value eval="[('module', '=', 'res_users'), ('name', '=', 'reset_password_email')]" />

        </function>

        <value eval ="{'noupdate': True}" />

</function>

<function name="write" model="ir.model.data">

    <function name="search" model="ir.model.data">

        <value eval="[('module', '=', 'res_users'), ('name', '=', 'set_password_email')]" />

        </function>

        <value eval ="{'noupdate': True}" />

</function>

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 21
7090
1
zář 21
3179
1
zář 19
6277
1
říj 21
4557
5
čvn 20
31641