From aac22b0cd2673a9646992e060d734f6035e2cc8b Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Wed, 11 Jun 2008 20:18:37 +0200 Subject: [PATCH] Guidelines --- inventory.py | 14 +++++++------- location.py | 6 +++--- move.py | 2 +- packing.py | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inventory.py b/inventory.py index 8eab3247ca..ed9293824f 100644 --- a/inventory.py +++ b/inventory.py @@ -16,18 +16,18 @@ class Inventory(OSV): location = fields.Many2One( 'stock.location', 'Location', required=True, - domain="[('type', '=', 'storage')]", states=STATES,) + domain="[('type', '=', 'storage')]", states=STATES) date = fields.DateTime('Date', readonly=True) lost_found = fields.Many2One( 'stock.location', 'Lost and Found', required=True, - domain="[('type', '=', 'lost_found')]", states=STATES,) + domain="[('type', '=', 'lost_found')]", states=STATES) lines = fields.One2Many( - 'stock.inventory.line', 'inventory', 'Inventory Lines', states=STATES,) + 'stock.inventory.line', 'inventory', 'Inventory Lines', states=STATES) moves = fields.Many2Many( 'stock.move', 'inventory_move_rel', 'inventory', 'move', 'Generated moves') company = fields.Many2One( - 'company.company', 'Company', required=True, states=STATES,) + 'company.company', 'Company', required=True, states=STATES) state = fields.Selection( @@ -169,9 +169,9 @@ class InventoryLine(OSV): _rec_name = 'product' product = fields.Many2One( - 'product.product', 'Product', required=True, on_change=['product'],) - uom = fields.Many2One('product.uom', 'Uom', required=True, select=1,) - quantity = fields.Float('Quantity', digits=(12, 6),) + 'product.product', 'Product', required=True, on_change=['product']) + uom = fields.Many2One('product.uom', 'Uom', required=True, select=1) + quantity = fields.Float('Quantity', digits=(12, 6)) inventory = fields.Many2One('stock.inventory', 'Inventory') def __init__(self): diff --git a/location.py b/location.py index febf17ccc5..48c7a009ab 100644 --- a/location.py +++ b/location.py @@ -29,7 +29,7 @@ class Location(OSV): ('production', 'Production'), ], 'Location type', states=STATES) parent = fields.Many2One("stock.location", "Parent", select=1) - childs = fields.One2Many("stock.location", "parent", "Childs",) + childs = fields.One2Many("stock.location", "parent", "Childs") input_location = fields.Many2One( "stock.location", "Input", states=STATES_WH, domain="[('type','=','storage'), ('parent', 'child_of', [active_id])]") @@ -39,9 +39,9 @@ class Location(OSV): storage_location = fields.Many2One( "stock.location", "Storage", states=STATES_WH, domain="[('type','=','storage'), ('parent', 'child_of', [active_id])]") - quantity = fields.Function('get_quantity', type='float', string='Quantity',) + quantity = fields.Function('get_quantity', type='float', string='Quantity') forecast_quantity = fields.Function('get_quantity', type='float', - string='Forecast Quantity',) + string='Forecast Quantity') def __init__(self): super(Location, self).__init__() diff --git a/move.py b/move.py index e471aef543..814e01c7ae 100644 --- a/move.py +++ b/move.py @@ -18,7 +18,7 @@ class Move(OSV): product = fields.Many2One("product.product", "Product", required=True, select=1, states=STATES, on_change=['product', 'type', 'currency', 'uom', 'company'], - domain=[('type', '!=', 'service')],) + domain=[('type', '!=', 'service')]) uom = fields.Many2One("product.uom", "Uom", required=True, states=STATES) quantity = fields.Float("Quantity", digits=(12, 6), required=True, states=STATES) diff --git a/packing.py b/packing.py index b801460f68..a1ca7a2f72 100644 --- a/packing.py +++ b/packing.py @@ -19,10 +19,10 @@ class PackingIn(OSV): effective_date =fields.DateTime('Effective Date', readonly=True) planned_date = fields.DateTime( - 'Planned Date', states={'readonly': "state != 'draft'",},) + 'Planned Date', states={'readonly': "state != 'draft'",}) reference = fields.Char( "Reference", size=None, select=1, - states={'readonly': "state != 'draft'",},) + states={'readonly': "state != 'draft'",}) supplier = fields.Many2One('relationship.party', 'Supplier', states={ 'readonly': "state != 'draft'", @@ -247,7 +247,7 @@ class PackingOut(OSV): _description = __doc__ _rec_name = 'code' - effective_date =fields.DateTime('Effective Date', readonly=True,) + effective_date =fields.DateTime('Effective Date', readonly=True) planned_date = fields.DateTime('Planned Date', readonly=True, states={ 'readonly': "state != 'draft'", @@ -567,7 +567,7 @@ class PackingOut(OSV): cursor, user, move.uom.id, processed_data.get( (location, move.product.id), []), - uom_index, context=context,) + uom_index, context=context) if qty != 0.0: location_qties.append((location, qty))