mirror of
https://github.com/NaN-tic/oo_nan_prodlot_quality_control_input.git
synced 2023-12-14 07:22:52 +01:00
[IMP] nan_prodlot_quality_control_input: PEP8 formatting
This commit is contained in:
parent
725e587c82
commit
d87bbfc243
2 changed files with 42 additions and 42 deletions
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Production Lot Quality Control - Input",
|
"name": "Production Lot Quality Control - Input",
|
||||||
"version" : "0.2",
|
"version": "1.0",
|
||||||
"author": "NaN Projectes de Programari Lliure S.L.",
|
"author": "NaN Projectes de Programari Lliure S.L.",
|
||||||
"category": "Generic Modules/Quality Control",
|
"category": "Generic Modules/Quality Control",
|
||||||
"website": "http://www.nan-tic.com",
|
"website": "http://www.nan-tic.com",
|
||||||
|
|
16
stock.py
16
stock.py
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
from osv import osv
|
from osv import osv
|
||||||
|
|
||||||
|
|
||||||
class stock_move(osv.osv):
|
class stock_move(osv.osv):
|
||||||
_inherit = 'stock.move'
|
_inherit = 'stock.move'
|
||||||
|
|
||||||
|
@ -42,8 +43,9 @@ class stock_move(osv.osv):
|
||||||
if 'input' in context.get('no_create_trigger_test', []):
|
if 'input' in context.get('no_create_trigger_test', []):
|
||||||
return move_id
|
return move_id
|
||||||
|
|
||||||
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid,
|
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid, [
|
||||||
[('name','=','Input')], context=context)
|
('name', '=', 'Input'),
|
||||||
|
], context=context)
|
||||||
if not input_trigger_id:
|
if not input_trigger_id:
|
||||||
return move_id
|
return move_id
|
||||||
|
|
||||||
|
@ -57,7 +59,6 @@ class stock_move(osv.osv):
|
||||||
|
|
||||||
return move_id
|
return move_id
|
||||||
|
|
||||||
|
|
||||||
# stock.move
|
# stock.move
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
|
@ -65,8 +66,7 @@ class stock_move(osv.osv):
|
||||||
|
|
||||||
prodlot_proxy = self.pool.get('stock.production.lot')
|
prodlot_proxy = self.pool.get('stock.production.lot')
|
||||||
|
|
||||||
res = super(stock_move, self).write(cr, uid, ids, vals,
|
res = super(stock_move, self).write(cr, uid, ids, vals, context)
|
||||||
context)
|
|
||||||
|
|
||||||
# we will try to create 'test triggers' only when Lot and/or Picking is
|
# we will try to create 'test triggers' only when Lot and/or Picking is
|
||||||
# setted to Stock Move
|
# setted to Stock Move
|
||||||
|
@ -76,8 +76,9 @@ class stock_move(osv.osv):
|
||||||
if 'input' in context.get('no_create_trigger_test', []):
|
if 'input' in context.get('no_create_trigger_test', []):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid,
|
input_trigger_id = self.pool.get('qc.trigger').search(cr, uid, [
|
||||||
[('name','=','Input')], context=context)
|
('name', '=', 'Input'),
|
||||||
|
], context=context)
|
||||||
if not input_trigger_id:
|
if not input_trigger_id:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@ -94,7 +95,6 @@ class stock_move(osv.osv):
|
||||||
# no test trigger for 'input_trigger_id'
|
# no test trigger for 'input_trigger_id'
|
||||||
prodlot_proxy.create_qc_test_triggers(cr, uid, move.prodlot_id,
|
prodlot_proxy.create_qc_test_triggers(cr, uid, move.prodlot_id,
|
||||||
input_trigger_id, True, context)
|
input_trigger_id, True, context)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
stock_move()
|
stock_move()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue