Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4109 Lượt xem


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

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 23
5091
0
thg 9 24
1389
2
thg 3 24
3021
2
thg 2 23
3586
2
thg 12 23
28982