This question has been flagged
2 Replies
5327 Views


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>


Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

@Sunny Dev

Thanks a lot!

It's work for me.

Avatar
Discard

Hello @Litgle,

can you please upwote my answer ?

Thanks

Author

@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."