1
# -*- coding: utf-8 -*-
2
###########################################################################
3
# Module Writen to OpenERP, Open Source Management Solution
5
# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
8
############################################################################
9
# Coded by: julio (fernando_ld@vauxoo.com)
10
############################################################################
12
# This program is free software: you can redistribute it and/or modify
13
# it under the terms of the GNU Affero General Public License as
14
# published by the Free Software Foundation, either version 3 of the
15
# License, or (at your option) any later version.
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU Affero General Public License for more details.
22
# You should have received a copy of the GNU Affero General Public License
23
# along with this program. If not, see <http://www.gnu.org/licenses/>.
25
##############################################################################
26
from osv import osv, fields
27
from tools.translate import _
28
from datetime import datetime
31
class mrp_production(osv.osv):
32
_inherit = "mrp.production"
34
def action_cancel(self, cr, uid, ids, context=None):
39
wf_service = netsvc.LocalService("workflow")
41
move_obj = self.pool.get('stock.move')
42
for production in self.browse(cr, uid, ids, context=context):
43
for line in production.picking_ids:
44
wf_service.trg_validate(uid, 'stock.picking', line.id, 'button_cancel', cr)
45
return super(mrp_production, self).action_cancel(cr, uid, ids, context=context)
b'\\ No newline at end of file'