summaryrefslogtreecommitdiff
path: root/bin/addons/base
diff options
context:
space:
mode:
authorHarry (Open ERP) <hmo@tinyerp.com>2009-11-24 20:14:05 +0530
committerHarry (Open ERP) <hmo@tinyerp.com>2009-11-24 20:14:05 +0530
commitd8ce3f1e2a5a55f0c28eb1cf8cb4cfcd2d6d5dab (patch)
treef1dbd61528db0d90cebb5f2b5e4e836f00f71aef /bin/addons/base
parentdda5ed6bb1710e4690c1e01fe4265cc7db147068 (diff)
[FIX] replaced <TAB> with four white space.
bzr revid: hmo@tinyerp.com-20091124144405-9mzd91chohvf0uu7
Diffstat (limited to 'bin/addons/base')
-rw-r--r--bin/addons/base/ir/ir_cron.py2
-rw-r--r--bin/addons/base/ir/ir_sequence.py44
-rw-r--r--bin/addons/base/ir/workflow/print_instance.py2
-rw-r--r--bin/addons/base/module/report/ir_module_reference_print.py46
-rw-r--r--bin/addons/base/module/wizard/wizard_export_lang.py2
-rw-r--r--bin/addons/base/res/res_user.py6
6 files changed, 51 insertions, 51 deletions
diff --git a/bin/addons/base/ir/ir_cron.py b/bin/addons/base/ir/ir_cron.py
index 78f3b97ddaf..6530561f675 100644
--- a/bin/addons/base/ir/ir_cron.py
+++ b/bin/addons/base/ir/ir_cron.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
diff --git a/bin/addons/base/ir/ir_sequence.py b/bin/addons/base/ir/ir_sequence.py
index 8f6eb8d8dcd..87f1e3f490e 100644
--- a/bin/addons/base/ir/ir_sequence.py
+++ b/bin/addons/base/ir/ir_sequence.py
@@ -47,15 +47,15 @@ class ir_sequence(osv.osv):
'number_next': fields.integer('Next Number', required=True),
'number_increment': fields.integer('Increment Number', required=True),
'padding' : fields.integer('Number padding', required=True),
- 'condition': fields.char('Condition', size=250, help="If set, sequence will only be used in case this python expression matches, and will precede other sequences."),
- 'weight': fields.integer('Weight',required=True, help="If two sequences match, the highest weight will be used.")
+ 'condition': fields.char('Condition', size=250, help="If set, sequence will only be used in case this python expression matches, and will precede other sequences."),
+ 'weight': fields.integer('Weight',required=True, help="If two sequences match, the highest weight will be used.")
}
_defaults = {
'active': lambda *a: True,
'number_increment': lambda *a: 1,
'number_next': lambda *a: 1,
'padding' : lambda *a : 0,
- 'weight' : lambda *a: 10,
+ 'weight' : lambda *a: 10,
}
def _process(self, s):
@@ -74,28 +74,28 @@ class ir_sequence(osv.osv):
}
def get_id(self, cr, uid, sequence_id, test='id=%s', context=None):
- if not context:
- context = {}
+ if not context:
+ context = {}
try:
cr.execute('SELECT id, number_next, prefix, suffix, padding, condition \
- FROM ir_sequence \
- WHERE '+test+' AND active=%s ORDER BY weight DESC, length(COALESCE(condition,\'\')) DESC \
- FOR UPDATE', (sequence_id, True))
+ FROM ir_sequence \
+ WHERE '+test+' AND active=%s ORDER BY weight DESC, length(COALESCE(condition,\'\')) DESC \
+ FOR UPDATE', (sequence_id, True))
for res in cr.dictfetchall():
- if res['condition']:
- print "ir_seq: %s has condition:" %res['id'], res['condition'],
- try:
- bo = safe_eval(res['condition'],context)
- if not bo:
- print "not matched"
- continue
- except Exception,e:
- # it would be normal to have exceptions, because
- # the domain may contain errors
- print "Exception.\ne:",e
- print "Context:", context
- continue
- print "Matched!"
+ if res['condition']:
+ print "ir_seq: %s has condition:" %res['id'], res['condition'],
+ try:
+ bo = safe_eval(res['condition'],context)
+ if not bo:
+ print "not matched"
+ continue
+ except Exception,e:
+ # it would be normal to have exceptions, because
+ # the domain may contain errors
+ print "Exception.\ne:",e
+ print "Context:", context
+ continue
+ print "Matched!"
cr.execute('UPDATE ir_sequence SET number_next=number_next+number_increment WHERE id=%s AND active=%s', (res['id'], True))
if res['number_next']:
diff --git a/bin/addons/base/ir/workflow/print_instance.py b/bin/addons/base/ir/workflow/print_instance.py
index 659c6b3d2ff..f9885b9e838 100644
--- a/bin/addons/base/ir/workflow/print_instance.py
+++ b/bin/addons/base/ir/workflow/print_instance.py
@@ -147,7 +147,7 @@ showpage'''
inst_id = inst_id[0]
graph = pydot.Dot(fontsize='16', label="""\\\n\\nWorkflow: %s\\n OSV: %s""" % (wkfinfo['name'],wkfinfo['osv']),
size='7.3, 10.1', center='1', ratio='auto', rotate='0', rankdir='TB',
- ordering='out'
+ ordering='out'
)
graph_instance_get(cr, graph, inst_id, data.get('nested', False))
ps_string = graph.create(prog='dot', format='ps')
diff --git a/bin/addons/base/module/report/ir_module_reference_print.py b/bin/addons/base/module/report/ir_module_reference_print.py
index ac90ddd833f..7364499af7e 100644
--- a/bin/addons/base/module/report/ir_module_reference_print.py
+++ b/bin/addons/base/module/report/ir_module_reference_print.py
@@ -29,37 +29,37 @@ class ir_module_reference_print(report_sxw.rml_parse):
'time': time,
'findobj': self._object_find,
'objdoc': self._object_doc,
- 'objdoc2': self._object_doc2,
+ 'objdoc2': self._object_doc2,
'findflds': self._fields_find,
})
def _object_doc(self, obj):
modobj = self.pool.get(obj)
- strdocs= modobj.__doc__
- if not strdocs:
- return None
- else:
- strdocs=strdocs.strip().splitlines(True)
- res = ''
- for stre in strdocs:
- if not stre or stre.isspace():
- break
- res += stre
+ strdocs= modobj.__doc__
+ if not strdocs:
+ return None
+ else:
+ strdocs=strdocs.strip().splitlines(True)
+ res = ''
+ for stre in strdocs:
+ if not stre or stre.isspace():
+ break
+ res += stre
return res
def _object_doc2(self, obj):
modobj = self.pool.get(obj)
- strdocs= modobj.__doc__
- if not strdocs:
- return None
- else:
- strdocs=strdocs.strip().splitlines(True)
- res = []
- fou = False
- for stre in strdocs:
- if fou:
- res.append(stre.strip())
- elif not stre or stre.isspace():
- fou = True
+ strdocs= modobj.__doc__
+ if not strdocs:
+ return None
+ else:
+ strdocs=strdocs.strip().splitlines(True)
+ res = []
+ fou = False
+ for stre in strdocs:
+ if fou:
+ res.append(stre.strip())
+ elif not stre or stre.isspace():
+ fou = True
return res
def _object_find(self, module):
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py
index d0f16680413..1e538b95cfb 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/wizard_export_lang.py
@@ -80,7 +80,7 @@ class wizard_export_lang(osv.osv_memory):
) ),
}
_defaults = { 'state': lambda *a: 'choose',
- 'name': lambda *a: 'lang.tar.gz'
+ 'name': lambda *a: 'lang.tar.gz'
}
wizard_export_lang()
diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py
index b14daa2b553..d6b7cd6eec0 100644
--- a/bin/addons/base/res/res_user.py
+++ b/bin/addons/base/res/res_user.py
@@ -72,10 +72,10 @@ class groups(osv.osv):
return gid
def copy(self, cr, uid, id, default={}, context={}, done_list=[], local=False):
- group = self.browse(cr, uid, id, context=context)
+ group = self.browse(cr, uid, id, context=context)
default = default.copy()
- if not 'name' in default:
- default['name'] = group['name']
+ if not 'name' in default:
+ default['name'] = group['name']
default['name'] = default['name'] + _(' (copy)')
return super(groups, self).copy(cr, uid, id, default, context=context)