Skip to content
Snippets Groups Projects
Commit 19aa7c40 authored by Damien Bouvy's avatar Damien Bouvy
Browse files

[FIX] stock: enable auto_join for stock_move_line <-> stock_picking


Avoid pathological SQL queries with extremely long list of ids in a
WHERE clause. The strong relation between these models make an auto_join
a no brainer.

closes odoo/odoo#32645

Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
parent c42551b5
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ class StockMoveLine(models.Model):
_order = "result_package_id desc, id"
picking_id = fields.Many2one(
'stock.picking', 'Stock Picking',
'stock.picking', 'Stock Picking', auto_join=True,
help='The stock operation where the packing has been made')
move_id = fields.Many2one(
'stock.move', 'Stock Move',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment