콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4029 화면


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

아바타
취소
작성자

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.

베스트 답변

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

아바타
취소

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

작성자

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.

관련 게시물 답글 화면 활동
3
7월 23
5011
0
9월 24
1335
2
3월 24
2962
2
2월 23
3501
2
12월 23
28883