mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] procurement_mrp_no_confirm: Restore workflow at module uninstallation. Fixes #1002
This commit is contained in:
committed by
Andhitia Rama
parent
db6f59a526
commit
27b58d2f44
@@ -3,3 +3,10 @@ Don't confirm MOs when procured
|
||||
|
||||
This module prevents the automatic confirmation of manufacturing order when
|
||||
procurement orders are executed.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* If the production order workflow has been altered in the transition
|
||||
*prod_trans_draft_picking* to have another condition, when uninstalling this
|
||||
module, you will need to restore the custom condition.
|
||||
|
||||
@@ -17,3 +17,12 @@
|
||||
##############################################################################
|
||||
|
||||
from . import models
|
||||
from openerp import SUPERUSER_ID, api
|
||||
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
"""Restore workflow condition."""
|
||||
with api.Environment.manage():
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
transition = env.ref('mrp.prod_trans_draft_picking')
|
||||
transition.condition = True
|
||||
|
||||
@@ -28,4 +28,5 @@
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'uninstall_hook': 'uninstall_hook',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user