跳至内容
菜单
此问题已终结
1 回复
7629 查看

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
8058
1
9月 20
6539
2
4月 18
6731
2
7月 24
2453
1
6月 24
4969