From 725e587c824044490c673b401d5685e4e1c22608 Mon Sep 17 00:00:00 2001 From: Guillem Barba Date: Mon, 2 Apr 2012 18:34:18 +0200 Subject: [PATCH] [FIX] nan_prodlot_quality_control_input: removed unused functions in 'stock.move' --- stock.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/stock.py b/stock.py index 2520a2c..9b191be 100644 --- a/stock.py +++ b/stock.py @@ -32,45 +32,6 @@ from osv import osv class stock_move(osv.osv): _inherit = 'stock.move' - # stock.move - def _calc_qc_test_input_vals(self, cr, uid, move, context): - reference = 'stock.production.lot,%d' % move.prodlot_id.id - return { - 'object_id': reference, - } - - # stock.move - def _calc_qc_test_trigger_ids_input_vals(self, cr, uid, move, trigger_id, - context): - if (not move.picking_id or move.picking_id.type != 'in' or - not move.prodlot_id or move.prodlot_id.state != 'draft' or - trigger_id in - [x.id for x in move.prodlot_id.qc_trigger_ids] or - trigger_id not in - [x.id for x in move.product_id.qc_trigger_ids]): - return False - - qc_test_proxy = self.pool.get('qc.test') - test_trigger_vals = [] - for template_trigger in move.product_id.qc_template_trigger_ids: - if template_trigger.trigger_id.id != trigger_id: - continue - - test_vals = self._calc_qc_test_input_vals(cr, uid, move, context) - test_id = qc_test_proxy.create(cr, uid, test_vals, context) - - qc_test_proxy.set_test_template(cr, uid, [test_id], - template_trigger.template_id.id, context) - - test_trigger_vals.append((0, 0, { - 'sequence': template_trigger.sequence, - 'trigger_id': template_trigger.trigger_id.id, - 'template_type': template_trigger.template_type, - 'test_id': test_id, - })) - return test_trigger_vals - - # stock.move def create(self, cr, uid, vals, context=None): if context is None: