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

how can i handle a huge number of results shown in an embedded tree-View


in res.partner we added:

all_sale_order_lines = fields.One2many('sale.order.line', 'order_partner_id', string="Sale Lines", domain=[('state', '!=', 'draft')])


and the part in the View:

<field name="all_sale_order_lines">

<tree create="false" delete="false" default_order="write_date asc">
<field name="write_date" invisible="1" />
<field name="order_id" />
<field name="product_id" />
<field name="name" />
</tree>
</field>  


one of our customers now has more than 35000 Sale Order lines and so the browser crashes.

how should this be handeled?


아바타
취소
베스트 답변

I tried limit="n" in v17 in the survey.survey form view and it worked. 

I created a survey with nearly 100 questions and with a reload after saving a record the limit was set back to 40 entries. That's really annoying. With the xml code "limit="150" I solved this problem. After reloading all records are shown in my form view. In the xml view this looks as shown below.






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

again: does nobody have such problems with huge amount of data in embedded trees?

the borwser nearly crashes while loading the data.

we have extended the customer and try to show all sale order lines of the customer in a sub tree-view. LIMIT does not help because still all the data will still be sent to the browser (but only the first XXX will be shown).


아바타
취소
베스트 답변

​Hi,
If you don't want to display all the records you can try to limit records visibility to 10-20 latest records by using limit along with tree view.

<tree create="false" delete="false" default_order="write_date asc" limit="20">

Thanks

아바타
취소
작성자

ok but i think the hute amount of data will still be sent to the browser. or not?