Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4074 Widoki


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)?

Awatar
Odrzuć
Autor

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.

Najlepsza odpowiedź

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

Awatar
Odrzuć

<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>

Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
3
lip 23
5064
0
wrz 24
1363
2
mar 24
2990
2
lut 23
3544
2
gru 23
28925