コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7627 ビュー

Hi,

I have to create sequence number as FY/2019/001(it will increment as FY/2019/002 etc, till 31 march 2020),and I have to increment the year in next financial year

that is in next April 1 the  number should be FY/2020/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-2 


Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

アバター
破棄
著作者

Can I us this method other than invoice?Because I need to use it in contracts

Hello @veni,

Hello Yes you can use this in contract as well,

As per my knowledge you need to change the required field of name.

First you need to add one field in your .py and .xml file in (hr.contract) object

i.e : sequence_contact = fields.Char(string='Number', copy=False, default=lambda self: self.env['ir.sequence'].next_by_code('hr.contract'))

once you add field files you need to add this code in .xml file.

<record id="sequence_hr_contract" model="ir.sequence">

<field name="name">Contract Sequence</field>

<field name="code">hr.contract</field>

<field name="prefix">FY/%(range_year)s/</field>

<field eval="1" name="number_next"/>

<field eval="1" name="number_increment"/>

<field eval="True" name="use_date_range"/>

<field eval="False" name="company_id"/>

<field name="padding">3</field>

</record>

関連投稿 返信 ビュー 活動
2
5月 24
8056
1
9月 20
6535
2
4月 18
6728
2
7月 24
2452
1
6月 24
4967