Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3916 Visualizzazioni


I need to set the default invoice sequence number to a custom format any time there is a fresh install. This needs to be done automatically in code.


This is easy to do for something like a sale order. Here's how I can do it with a sale order:


<data noupdate="1">
<record id="sequence_sale_order_number_wwi" model="ir.sequence">
<field name="name">Sale Order Numbersfield>
<field name="code">sale.orderfield>
<field name="prefix">WO-field>
<field name="padding">4field>
<field name="number_increment">1field>
<field name="company_id">1field>
record>
data>



How do I accomplish the same thing for invoice sequence numbers (Odoo 14 or 15)?

Avatar
Abbandona
Autore

Unfortunately, that module doesn't answer the question. This invoice sequence needs to be set automatically with no manual intervention on a fresh install. So it needs to be done in code.

Risposta migliore

Dear Drew E,

please try this for give sequence for the invoice.


odoo
data noupdate="1"
record id="seq_account_move" model="ir.sequence"
field name="name">invoice field name="code">account.move field name="prefix">INV field name="padding">5 field name="company_id" eval="False"/
/record
/data
/odoo


I hope this information will helpful to you.


Feel free for further assistance on contact@geminatecs.com

Thank you
Geminate Consultancy Services

Avatar
Abbandona

<odoo>
<data noupdate="1">
<record id="seq_account_move" model="ir.sequence">
<field name="name">invoice</field>
<field name="code">account.move</field>
<field name="prefix">INV</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>

Autore

Thank you, but that doesn't appear to have worked. I've verified that the same method works for sale.order and res.partner, but does not work for account.move. That method may have worked in odoo 13 but does not work in odoo 14 and above.

thats strange, we have tested the code at our end, may be you can pass on your module on contact@geminatecs.com for further resolution. thanks.

Post correlati Risposte Visualizzazioni Attività
3
lug 23
4902
0
set 24
1247
2
mar 24
2811
2
feb 23
3414
2
dic 23
28774