[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: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user