[IMP] nan_prodlot_quality_control_input: PEP8 formatting

This commit is contained in:
Guillem Barba 2012-04-24 18:07:58 +02:00
parent 725e587c82
commit d87bbfc243
2 changed files with 42 additions and 42 deletions

View File

@ -28,10 +28,10 @@
##############################################################################
{
"name" : "Production Lot Quality Control - Input",
"version" : "0.2",
"author" : "NaN Projectes de Programari Lliure S.L.",
"category" : "Generic Modules/Quality Control",
"name": "Production Lot Quality Control - Input",
"version": "1.0",
"author": "NaN Projectes de Programari Lliure S.L.",
"category": "Generic Modules/Quality Control",
"website": "http://www.nan-tic.com",
"description": """
Module developed for Trod y Avia, S.L.
@ -41,15 +41,15 @@
The idea is that the first test will be 'Generic' and check for things like
correct packaging. The second will be specific to the product in question.
""",
"depends" : [
"depends": [
'nan_prodlot_quality_control',
'stock',
],
"init_xml" : [],
"update_xml" : [
"init_xml": [],
"update_xml": [
'quality_control_data.xml',
],
"demo_xml" : [
"demo_xml": [
'prodlot_quality_control_input_demo.xml',
],
"test": [

View File

@ -29,6 +29,7 @@
from osv import osv
class stock_move(osv.osv):
_inherit = 'stock.move'
@ -39,11 +40,12 @@ class stock_move(osv.osv):
move_id = super(stock_move, self).create(cr, uid, vals, context)
if 'input' in context.get('no_create_trigger_test',[]):
if 'input' in context.get('no_create_trigger_test', []):
return move_id
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid,
[('name','=','Input')], context=context)
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid, [
('name', '=', 'Input'),
], context=context)
if not input_trigger_id:
return move_id
@ -57,7 +59,6 @@ class stock_move(osv.osv):
return move_id
# stock.move
def write(self, cr, uid, ids, vals, context=None):
if context is None:
@ -65,19 +66,19 @@ class stock_move(osv.osv):
prodlot_proxy = self.pool.get('stock.production.lot')
res = super(stock_move, self).write(cr, uid, ids, vals,
context)
res = super(stock_move, self).write(cr, uid, ids, vals, context)
# we will try to create 'test triggers' only when Lot and/or Picking is
# setted to Stock Move
if not 'prodlot_id' in vals and not 'picking_id' in vals:
return res
if 'input' in context.get('no_create_trigger_test',[]):
if 'input' in context.get('no_create_trigger_test', []):
return res
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid,
[('name','=','Input')], context=context)
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid, [
('name', '=', 'Input'),
], context=context)
if not input_trigger_id:
return res
@ -94,7 +95,6 @@ class stock_move(osv.osv):
# no test trigger for 'input_trigger_id'
prodlot_proxy.create_qc_test_triggers(cr, uid, move.prodlot_id,
input_trigger_id, True, context)
return res
stock_move()