Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
17
sale_automatic_workflow_stock/models/stock_move.py
Executable file
17
sale_automatic_workflow_stock/models/stock_move.py
Executable file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
|
||||
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
|
||||
# Copyright 2016 Sodexis
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = "stock.move"
|
||||
|
||||
def _get_new_picking_values(self):
|
||||
values = super()._get_new_picking_values()
|
||||
sale = self.group_id.sale_id
|
||||
if sale:
|
||||
values["workflow_process_id"] = sale.workflow_process_id.id
|
||||
return values
|
||||
Reference in New Issue
Block a user