Skip to Content
Menu
This question has been flagged
2 Replies
1897 Views

we want to show all SaleOrderLines of a customer directly in the detail-View of the customer.

we added in the res_partner model:

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

and with xpath we also added:

<field name="all_sale_order_lines">
     <tree create="false" delete="false" limit="10">
        <field name="order_id" />
        <field name="order_date_ref" widget="date" />
        <field name="invoice_date" />
            ...
            ...
</tree>
</field>


Some of the Customers already have more then 50.000 Sale order lines and it seems thet all the Data of all 50.000 Sale order lines will be sent to the Browser. It is extremely slow and the browser maybe also crashes.

what is the best aproach to show huge amount of rows in an embedded tree? Or is there an other way to show this data directly within the Customer-View?


Avatar
Discard

Hello,

I think you create a tree view of the sale order line. maybe your problem solve.

Author Best Answer

@Manish Kumar Bohra: i do not understand what you mean. i need the sale order lines directly within the res partner view. can you explain your answer more in detail?

Avatar
Discard