Skip to content

Commit e54d64c

Browse files
committed
[IMP] stock_release_channel_shipment_advice_toursolver: link ts task to rc
1 parent e3c35fe commit e54d64c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from . import stock_release_channel
22
from . import toursolver_task
3+
from . import shipment_advice
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2025 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import models
5+
6+
7+
class ShipmentAdvice(models.Model):
8+
9+
_inherit = "shipment.advice"
10+
11+
def create_toursolver_task(self):
12+
self.ensure_one()
13+
res = super().create_toursolver_task()
14+
task = self.toursolver_task_id
15+
rc = self.release_channel_id
16+
task.release_channel_id = rc
17+
task.name = f"{task.name} {rc.name}"
18+
return res

0 commit comments

Comments
 (0)