Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4462 Näkymät

Hello everyone,

I hope you're doing well.

I am having a problem when upgrading Odoo 12 modules.

Problem is, if I upgrade only my custom module, the "data noupdate='1'" is ensured, but if I start the server with "--upgrade all -d database_name", the "noupdate='1'" is ignored.

My custom module have the following code:

<odoo>
    <data noupdate="1">
        <record id="base.lang_en_US" model="res.lang">
               <field name="active">True</field>
               <field name="decimal_point">,</field>
               <field name="thousands_sep">.</field>
              <field name="grouping">[3,3,-1]</field>
        </record>
    </data>
</odoo>

When I install my custom module, the language is activated and I can see the fields correctly set.

If I start the server with "--upgrade custom_module" or upgrade the module from Apps, this "noupdate='1'" is respected and the data remains unchanged.

Problem is when I start the server with "--upgrade all xxxxxxx". In this situation, the fields settings are lost and set the Odoo defaults.

What could be the problem?

Thank you in advance

Best regards

PM


Avatar
Hylkää
Tekijä Paras vastaus

Sorry guys.
I was missing the logic here. In fact I should use "noupdate='0'" instead of 1.

After change it, everything is working as expected and records remains unchanged when upgrading using described methods.

Thank you very much

PM

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
jouluk. 18
5150
1
maalisk. 23
5938
1
jouluk. 21
6997
3
jouluk. 19
18343
5
jouluk. 19
8719