updating sequences by refering them with their XML id

Asked by vrsb

Hello.
I made an addon and included the following xml file (in order to increase sequence padding) in update list of __terp__:
<record model="ir.sequence" id="seq_picking">
            <field name="name">Packing</field>
            <field name="padding">7</field>
            <field name="code">stock.picking</field>
 </record>
It didn't updated.
Instead that, I got two "Packing" sequences in database: one with 1-digit padding and another with 7-digits one. And they work "in turns" when new pickings are created: PACK7, PACK0000042, PACK8, PACK0000043 and so on.
What's wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Borja López Soilán (NeoPolus)
Solved:
Last query:
Last reply:
Revision history for this message
Best Borja López Soilán (NeoPolus) (borjals) said :
#1

You probably need to use id="stock.seq_piking".

As each module has its own namespace, if you want to reference an item on other module you need to use:
       id="module.id"

That is, references on the files to load (XML, CSV or YML) are considered local by default, so when you say
       id="seq_picking"
OpenERP interprets it as
       id="mymodule.seq_picking"

Revision history for this message
vrsb (shipilov555) said :
#2

Thanks Borja López Soilán (Pexego), that solved my question.