Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
6639 Переглядів


I want update existing system parameter in odoo 12, such as updating the default value 'b2c' of auth_signup.invitation_scope to 'b2b'. 

So I added the following code in ir_config_parameter.xml:

<odoo>

  <data noupdate="0">

    <record id="auth_signup.invitation_scopy" model="ir.config_parameter>

      <field name="key">auth_signup.invitation_scope</field>

      <field name="value">b2b</field>

    </record>

  </data>

</odoo>                                                                                                            

When I update addons, it did not succeed, error message:

Exception: Cannot update missing record 'auth_signup.invitation_scope'

odoo.tools.convert.ParseError: "Cannot update missing record 'auth_signup.invitation_scope'" while parsing /Users/odoo-dev/addons/customization/data/ir_config_parameter.xml:6, near
<record id="auth_signup.invitation_scope" model="ir.config_parameter">
<field name="key">auth_signup.invitation_scope</field>
<field name="value">b2b</field>
</record>


Аватар
Відмінити
Найкраща відповідь

Hello,

please try below code in your XML for update existing system parameter record.

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function
model="ir.config_parameter"
name="set_param"
eval="('auth_signup.invitation_scope', 'b2b')"
/>
</data>
</odoo>


Thanks

Sunny Sheth

Аватар
Відмінити
Автор Найкраща відповідь

@Sunny Dev

Thanks a lot!

It's work for me.

Аватар
Відмінити

Hello @Litgle,

can you please upwote my answer ?

Thanks

Автор

@Sunny Dev

I can't do this action now:

"5 karma is required to perform this action. You can earn karma by having your answers upvoted by the community."