[FIX] website_sale: time to unlink order.line
Before this commit, in large database the time to unlink is very long. Before 500 ms after a few ms closes odoo/odoo#96236 X-original-commit: c17e0a6702e58ba784c70bdb04f6a455e6d5b727 Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
committed by
William Braeckman
parent
38f65669de
commit
e8c3d9f0c0
@@ -7,7 +7,7 @@ from odoo import api, models, fields, _
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = "sale.order.line"
|
||||
|
||||
linked_line_id = fields.Many2one('sale.order.line', string='Linked Order Line', domain="[('order_id', '=', order_id)]", ondelete='cascade', copy=False)
|
||||
linked_line_id = fields.Many2one('sale.order.line', string='Linked Order Line', domain="[('order_id', '=', order_id)]", ondelete='cascade', copy=False, index=True)
|
||||
option_line_ids = fields.One2many('sale.order.line', 'linked_line_id', string='Options Linked')
|
||||
|
||||
name_short = fields.Char(compute="_compute_name_short")
|
||||
|
||||
Reference in New Issue
Block a user