[FIX] sale_stock: propagate SO line sequence to stock moves
The default order of the picking moves generated from a sale order should be the same order as the sale order lines. Steps to reproduce: - Create a sale order with several sale lines. - Change the order of the sale lines. - Confirm the sale order. => The moves of the picking don't maintain same order as set before. closes odoo/odoo#97690 X-original-commit: 524e5e6bd8feb47256cc0941052d959dd0e0ad0c Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -247,6 +247,7 @@ class SaleOrderLine(models.Model):
|
||||
'product_description_variants': self.with_context(lang=self.order_id.partner_id.lang)._get_sale_order_line_multiline_description_variants(),
|
||||
'company_id': self.order_id.company_id,
|
||||
'product_packaging_id': self.product_packaging_id,
|
||||
'sequence': self.sequence,
|
||||
})
|
||||
return values
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class StockRule(models.Model):
|
||||
|
||||
def _get_custom_move_fields(self):
|
||||
fields = super(StockRule, self)._get_custom_move_fields()
|
||||
fields += ['sale_line_id', 'partner_id']
|
||||
fields += ['sale_line_id', 'partner_id', 'sequence']
|
||||
return fields
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user