mirror of
https://github.com/bringout/oca-workflow-process.git
synced 2026-04-18 05:52:08 +02:00
33 lines
889 B
Python
33 lines
889 B
Python
# Copyright 2024 ACSONE SA/NV
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import _
|
|
from odoo.exceptions import UserError
|
|
|
|
|
|
class SplitPickNotAllowedInStateError(UserError):
|
|
"""
|
|
Exception class to represent stock picking split error for picking wrong state
|
|
"""
|
|
|
|
def __init__(self, env, picking):
|
|
self.env = env
|
|
super().__init__(
|
|
_(
|
|
"Cannot split picking %(name)s in state %(state)s",
|
|
name=picking.name,
|
|
state=picking.state,
|
|
)
|
|
)
|
|
|
|
|
|
class NotPossibleToSplitPickError(UserError):
|
|
"""
|
|
Exception class to represent stock picking split error for picking
|
|
"""
|
|
|
|
def __init__(self, env, picking):
|
|
self.env = env
|
|
super().__init__(
|
|
_("Cannot split off all moves from picking %(name)s", name=picking.name)
|
|
)
|