mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] delivery_hibou: correct picking priority when computed on more than one picking
This commit is contained in:
@@ -14,10 +14,10 @@ class StockPicking(models.Model):
|
|||||||
|
|
||||||
@api.depends('move_lines.priority', 'carrier_id')
|
@api.depends('move_lines.priority', 'carrier_id')
|
||||||
def _compute_priority(self):
|
def _compute_priority(self):
|
||||||
if self.carrier_id.procurement_priority:
|
with_carrier_priority = self.filtered(lambda p: p.carrier_id.procurement_priority)
|
||||||
self.priority = self.carrier_id.procurement_priority
|
for picking in with_carrier_priority:
|
||||||
else:
|
picking.priority = picking.carrier_id.procurement_priority
|
||||||
super(StockPicking, self)._compute_priority()
|
super(StockPicking, (self-with_carrier_priority))._compute_priority()
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, values):
|
def create(self, values):
|
||||||
|
|||||||
Reference in New Issue
Block a user