Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
8043 มุมมอง

Hi,

<record id="seq_contract_sequence_code" model="ir.sequence">
<field name="name">Contracts</field>
<field name="code">employee.contracts.code</field>
<field name="padding">3</field>
<field name="number_next">1</field>
<field name="prefix">%(year)s/%(month)s/</field>
<field name="number_increment">1</field>
<field name="implementation">no_gap</field>
</record>

This is my code for sequence number ,I have taken year and month ,that is increasing in each month and year ,

What I want is I have to newly increment the sequence when month or year changes.

That means if a new month is starting then a new contract created in the month should be 2019/06/001 in next month it should restart as 2019/07/001

How could I do this??

Please help


Thanks in advance

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello @VENI V R,

Yes, this is possible.

Please follow the below stpes,

First Activate the developers mode, Goto Setting-->Technical-->Sequences&identifiers-->Sequence. 

Create the new sequence as per your object,

For better understanding verify the below screenshot,

Screenshot-1


Screenshot-2


Can you please mark this as a resolved if you are satisfied with my answer.

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

So the solution is to use range_year​ and range_month​ instead of year​ and month​, right?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 22
7609
1
ก.ย. 20
6501
2
เม.ย. 18
6713
2
ก.ค. 24
2447
1
มิ.ย. 24
4961