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

Hello.

I need to export data from invoices by sequence. The list view  of invoices doesn't have a sequence ordering column, so I searched for another view with sequece column and I found the journals view. There I exported the data, then I reordered it by sequence but after I exported again both .xls documents show the data in the same order. 

I really need to find out how to export the data by sequence order. I would appreciate your help.

아바타
취소
베스트 답변

I had the same problem. I had to export a large number of invoices, sorted by number.

I was not able doing that from UI.

I had to patch the file addons/web/main.py, class ExportFormat, method base(), from


    records = Model.browse(ids) or Model.search(domain, offset=0, limit=False, order=False)

to


    if ids:
            ids=sorted(ids)
    records = Model.browse(ids) or Model.search(domain, offset=0, limit=False, order="id asc")


Instead of "id asc" you may try "number asc" or "name asc".

Of course this patch impacts on all exports not only invoices

아바타
취소
베스트 답변

I had a similar problem where I was exporting journal entries together with journal items. I first sorted the data on the screen by date. However, when I exported the sort was not applied. Since there were several rows with fields without any data (parent/child record), it was impossible to sort it on excel. 

To overcome the problem, I used group by date and number. When I did this, the resulting excel showed me data sorted on both fields.

I hope it helps.


아바타
취소
베스트 답변

The most accurate field to sort data is Database ID field. You can select to export all data to be able add it to the exported fields. So, you will be able to sort data using this column.


아바타
취소
관련 게시물 답글 화면 활동
3
4월 15
9069
0
12월 24
878
0
9월 24
1396
2
3월 24
3035
2
2월 23
3598