Files
manufacture/mrp_request_workcenter_cycle/wizards/request_create_mo.py
2020-12-09 21:36:28 +01:00

17 lines
501 B
Python
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Copyright 2020 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class MrpProductionRequestCreateMo(models.TransientModel):
_inherit = "mrp.production.request.create.mo"
def _prepare_manufacturing_order(self):
vals = super()._prepare_manufacturing_order()
vals["origin"] = "%s %s" % (
vals.get("origin") or "",
self.env.context.get("workcenter", ""),
)
return vals