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

Hi,

I want to generate my custom invoice sequence as per current financial year.

For exa. -- when i generate invoice on "2013-11-08" date then invoice no. generate like this - SAJ/13-14/P/0001 and now if financial year get change then it'll be changed like this -- SAJ/14-15/P/0001.
Look at the highlighted part in Invoice number.

So how can i generate financial year like this ??? OR how can i achieve this type of invoice number format ??

Thanks in advance...


아바타
취소
작성자 베스트 답변

Hello All,

I got the solution of my above question.

The solution is:

To generate custom invoice number, you have to make changes in "ir_sequence.py" file. This file is located on following path - C:\Program Files\OpenERP 7.0-20130917-231058\Server\server\openerp\addons\base\ir

Note: Above path may vary in different environment.

Now Open that file and find this method - _interpolation_dict(self): do changes in this method as per your requirement. (Though it is not advisable to make changes in this type of file because when you update openerp then this type of changes might be lost.)
This function return dictionary, and then whatever result is there, you can use it in invoice sequence.

e.g. In openerp sequences we can insert current financial year - SAJ/%(cur_fin_year)s/ instead of SAJ/%(year)s/... where cur_fin_year is my custom defined key in above method.

That's it.

Regards,

Krishnraj

아바타
취소
관련 게시물 답글 화면 활동
0
7월 15
4149
1
7월 25
612
2
7월 25
748
1
7월 25
1801
2
6월 25
924