[IMP] Added missing vim mode lines

lp bug: https://launchpad.net/bugs/524279 fixed

bzr revid: ls@numerigraphe.fr-20111122085848-1atcrcw8e64altcp
This commit is contained in:
Numerigraphe - Lionel Sausin 2011-11-22 09:58:48 +01:00
parent b0e90fcf59
commit a2f4f2669b
58 changed files with 222 additions and 69 deletions

View File

@ -15,3 +15,5 @@ conf = openerp.tools.config
conf['addons_path'] = '/home/openerp/repos/addons/trunk-xmlrpc' conf['addons_path'] = '/home/openerp/repos/addons/trunk-xmlrpc'
conf['static_http_document_root'] = '/tmp' conf['static_http_document_root'] = '/tmp'
#conf['log_level'] = 10 # 10 is DEBUG #conf['log_level'] = 10 # 10 is DEBUG
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -343,3 +343,5 @@ if __name__=='__main__':
p = xml_parse() p = xml_parse()
p.parse(fname) p.parse(fname)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -92,3 +92,5 @@ class ir_config_parameter(osv.osv):
else: else:
self.create(cr, uid, {'key': key, 'value': value}, context=context) self.create(cr, uid, {'key': key, 'value': value}, context=context)
return False return False
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -45,3 +45,5 @@ class ir_default(osv.osv):
} }
ir_default() ir_default()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -457,3 +457,5 @@ class ir_values(osv.osv):
def do_get(model,res_id): def do_get(model,res_id):
return self.get_actions(cr, uid, action_slot=key2, model=model, res_id=res_id, context=context) return self.get_actions(cr, uid, action_slot=key2, model=model, res_id=res_id, context=context)
return self._map_legacy_model_list(models, do_get, merge_results=True) return self._map_legacy_model_list(models, do_get, merge_results=True)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,3 +31,5 @@ class osv_memory_autovacuum(openerp.osv.osv.osv_memory):
model._transient_vacuum(cr, uid) model._transient_vacuum(cr, uid)
return True return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -49,4 +49,5 @@ class wizard_screen(osv.osv_memory):
_defaults = { _defaults = {
'config_logo': _get_image 'config_logo': _get_image
} }
wizard_screen() wizard_screen()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,3 +22,5 @@
import module import module
import wizard import wizard
import report import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -707,3 +707,5 @@ class module_dependency(osv.osv):
], string='State', readonly=True, select=True), ], string='State', readonly=True, select=True),
} }
module_dependency() module_dependency()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -68,3 +68,5 @@ class base_language_import(osv.osv_memory):
return {} return {}
base_language_import() base_language_import()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -70,4 +70,5 @@ class base_module_scan(osv.osv_memory):
mod_obj.write(cr, uid, [mod['id']], {'state': 'uninstalled'}) mod_obj.write(cr, uid, [mod['id']], {'state': 'uninstalled'})
return {} return {}
base_module_scan() base_module_scan()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -116,3 +116,5 @@ class base_module_upgrade(osv.osv_memory):
return self.pool.get('res.config').next(cr, uid, [], context=context) return self.pool.get('res.config').next(cr, uid, [], context=context)
base_module_upgrade() base_module_upgrade()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -72,3 +72,5 @@ class base_update_translations(osv.osv_memory):
} }
base_update_translations() base_update_translations()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1 +1,3 @@
import preview_report import preview_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -225,3 +225,5 @@ class res_partner_bank(osv.osv):
res_partner_bank() res_partner_bank()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -76,3 +76,5 @@ class res_log(osv.osv):
return result return result
res_log() res_log()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -84,3 +84,5 @@ class res_widget_wizard(osv.osv_memory):
res_widget_wizard() res_widget_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -10,3 +10,5 @@ for k, v in list(sys.modules.items()):
import openerp.addons.base.res.res_lang as res_lang import openerp.addons.base.res.res_lang as res_lang
res_lang._group_examples() res_lang._group_examples()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -74,4 +74,5 @@ class partner_wizard_ean_check(osv.osv_memory):
}) })
return {} return {}
partner_wizard_ean_check() partner_wizard_ean_check()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -100,3 +100,5 @@ if __name__=='__main__':
result = a.preprocess_rml(node) result = a.preprocess_rml(node)
print etree.tostring(result) print etree.tostring(result)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -3,3 +3,5 @@ from pdf import PdfFileReader, PdfFileWriter
__all__ = ["pdf"] __all__ = ["pdf"]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -353,3 +353,5 @@ class XmpInformation(PdfObject):
custom_properties = property(custom_properties) custom_properties = property(custom_properties)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -93,3 +93,5 @@ def parseString(node, localcontext = {}):
root = r.url_modify(root) root = r.url_modify(root)
return root return root
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,3 +23,5 @@ from makohtml2html import parseNode
#.apidoc title: MAKO to HTML engine #.apidoc title: MAKO to HTML engine
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -131,3 +131,5 @@ class makohtml2html(object):
def parseNode(html, localcontext = {}): def parseNode(html, localcontext = {}):
r = makohtml2html(html, localcontext) r = makohtml2html(html, localcontext)
return r.render() return r.render()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -53,3 +53,5 @@ def parseNode(node, localcontext = {}):
r = odt2odt(node, localcontext) r = odt2odt(node, localcontext)
return r.render() return r.render()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,3 +23,5 @@ from trml2pdf import parseString, parseNode
#.apidoc title: RML to PDF engine #.apidoc title: RML to PDF engine
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -150,3 +150,5 @@ def SetCustomFonts(rmldoc):
return True return True
#eof #eof
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1015,3 +1015,5 @@ if __name__=="__main__":
print 'Usage: trml2pdf input.rml >output.pdf' print 'Usage: trml2pdf input.rml >output.pdf'
print 'Try \'trml2pdf --help\' for more information.' print 'Try \'trml2pdf --help\' for more information.'
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -656,3 +656,5 @@ class report_sxw(report_rml, preprocess.report):
html = create_doc(mako_html,html_parser.localcontext) html = create_doc(mako_html,html_parser.localcontext)
return (html,'html') return (html,'html')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -25,3 +25,5 @@ import test
if __name__ == '__main__': if __name__ == '__main__':
unittest.TextTestRunner(verbosity=2).run(unittest.defaultTestLoader.loadTestsFromModule(test)) unittest.TextTestRunner(verbosity=2).run(unittest.defaultTestLoader.loadTestsFromModule(test))
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -183,3 +183,5 @@ class OpenERPAuthProvider(AuthProvider):
raise AuthRequiredExc(atype='Basic', realm=self.realm) raise AuthRequiredExc(atype='Basic', realm=self.realm)
#eof #eof
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -153,3 +153,5 @@ def init_servers():
netrpcd = TinySocketServerThread( netrpcd = TinySocketServerThread(
tools.config.get('netrpc_interface', ''), tools.config.get('netrpc_interface', ''),
int(tools.config.get('netrpc_port', 8070))) int(tools.config.get('netrpc_port', 8070)))
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -40,3 +40,5 @@ def check(db, uid, passwd):
pool = pooler.get_pool(db) pool = pooler.get_pool(db)
user_obj = pool.get('res.users') user_obj = pool.get('res.users')
return user_obj.check(db, uid, passwd) return user_obj.check(db, uid, passwd)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -232,3 +232,5 @@ class HttpOptions:
""" """
return opts return opts
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,3 +21,5 @@
from test_osv import * from test_osv import *
from test_translate import * from test_translate import *
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -62,3 +62,5 @@ class QueryTestCase(unittest.TestCase):
query.tables.append('"product_product"') query.tables.append('"product_product"')
self.assertRaises(AssertionError, query.join, ("product_template", "product_category", "categ_id", "id"), outer=False) self.assertRaises(AssertionError, query.join, ("product_template", "product_category", "categ_id", "id"), outer=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -46,3 +46,5 @@ class TranslationToolsTestCase(unittest.TestCase):
\\\\nope\n\n" \\\\nope\n\n"
""") """)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -96,3 +96,5 @@ class mysocket:
raise res[0] raise res[0]
else: else:
return res[0] return res[0]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -126,3 +126,5 @@ if __name__=='__main__':
else: else:
print int_to_text(int(argv[1]), lang) print int_to_text(int(argv[1]), lang)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -135,3 +135,5 @@ if __name__ == '__main__':
# For backward compatibility # For backward compatibility
cache = ormcache cache = ormcache
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -601,3 +601,5 @@ class configmanager(object):
config = configmanager() config = configmanager()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -999,3 +999,5 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa
obj.parse(doc.getroot()) obj.parse(doc.getroot())
return True return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -437,3 +437,5 @@ def _test():
if __name__ == '__main__': if __name__ == '__main__':
_test() _test()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -118,3 +118,5 @@ def frame_codeinfo(fframe, back=0):
return (fname, lineno) return (fname, lineno)
except Exception: except Exception:
return ("<unknown>", '') return ("<unknown>", '')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -118,3 +118,5 @@ class LRU(object):
self.d = {} self.d = {}
self.first = None self.first = None
self.last = None self.last = None
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -60,3 +60,5 @@ def walksymlinks(top, topdown=True, onerror=None):
if __name__ == '__main__': if __name__ == '__main__':
from pprint import pprint as pp from pprint import pprint as pp
pp(listdir('../report', True)) pp(listdir('../report', True))
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -99,3 +99,5 @@ if __name__ == '__main__':
chk(('0', '4.2', '4.2.3.4', '5.0.0-alpha', '5.0.0-rc1', '5.0.0-rc1.1', '5.0.0_rc2', '5.0.0_rc3', '5.0.0'), False) chk(('0', '4.2', '4.2.3.4', '5.0.0-alpha', '5.0.0-rc1', '5.0.0-rc1.1', '5.0.0_rc2', '5.0.0_rc3', '5.0.0'), False)
chk(('5.0.0-0_rc3', '5.0.0-1dev', '5.0.0-1'), False) chk(('5.0.0-0_rc3', '5.0.0-1dev', '5.0.0-1'), False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -44,3 +44,5 @@ conf = config.configmanager()
conf.parse_config(['-c', config_file_00, '--osv-memory-age-limit=2.3']) conf.parse_config(['-c', config_file_00, '--osv-memory-age-limit=2.3'])
assert conf['osv_memory_age_limit'] == 2.3 assert conf['osv_memory_age_limit'] == 2.3
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -307,3 +307,5 @@ def try_report_action(cr, uid, action_id, active_model=None, active_ids=None,
return True return True
#eof #eof
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -151,3 +151,5 @@ def which(file, mode=F_OK | X_OK, path=None, pathext=None):
if __name__ == '__main__': if __name__ == '__main__':
import doctest import doctest
doctest.testmod() doctest.testmod()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -182,3 +182,5 @@ def add_constructors():
yaml.add_constructor(u"!ir_set", ir_set_constructor) yaml.add_constructor(u"!ir_set", ir_set_constructor)
add_constructors() add_constructors()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

174
setup.py Normal file → Executable file
View File

@ -1,73 +1,115 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import os import glob, os, re, setuptools, sys
import re from os.path import join, isfile
import sys
from setuptools import setup, find_packages
execfile('addons/web/common/release.py') # List all data files
def data():
files = []
for root, dirnames, filenames in os.walk('openerp'):
for filename in filenames:
if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename):
files.append(os.path.join(root, filename))
d = {}
for v in files:
k=os.path.dirname(v)
if k in d:
d[k].append(v)
else:
d[k]=[v]
r = d.items()
return r
version_dash_incompatible = False def gen_manifest():
if 'bdist_rpm' in sys.argv: file_list="\n".join(data())
version_dash_incompatible = True open('MANIFEST','w').write(file_list)
try:
import py2exe
from py2exe_utils import opts
version_dash_incompatible = True
except ImportError:
opts = {}
if version_dash_incompatible:
version = version.split('-')[0]
FILE_PATTERNS = \ def py2exe_options():
r'.+\.(py|cfg|po|pot|mo|txt|rst|gif|png|jpg|ico|mako|html|js|css|htc|swf)$' if os.name == 'nt':
def find_data_files(source, patterns=FILE_PATTERNS): import py2exe
file_matcher = re.compile(patterns, re.I) return {
out = [] "console" : [ { "script": "openerp-server", "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))], }],
for base, _, files in os.walk(source): 'options' : {
cur_files = [] "py2exe": {
for f in files: "skip_archive": 1,
if file_matcher.match(f): "optimize": 2,
cur_files.append(os.path.join(base, f)) "dist_dir": 'dist',
if cur_files: "packages": [ "DAV", "HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "email", "encodings", "imaplib", "lxml", "lxml._elementpath", "lxml.builder", "lxml.etree", "lxml.objectify", "mako", "openerp", "poplib", "pychart", "pydot", "pyparsing", "reportlab", "select", "simplejson", "smtplib", "uuid", "vatnumber" "vobject", "xml", "xml", "xml.dom", "xml.xpath", "yaml", ],
out.append( "excludes" : ["Tkconstants","Tkinter","tcl"],
(base, cur_files)) }
}
}
else:
return {}
return out execfile(join(os.path.dirname(__file__), 'openerp', 'release.py'))
setup( setuptools.setup(
name=name, name = 'openerp',
version=version, version = version,
description=description, description = description,
long_description=long_description, long_description = long_desc,
author=author, url = url,
author_email=author_email, author = author,
url=url, author_email = author_email,
download_url=download_url, classifiers = filter(None, classifiers.split("\n")),
license=license, license = license,
install_requires=[ scripts = ['openerp-server'],
"Babel >= 0.9.6", data_files = data(),
"simplejson >= 2.0.9", packages = setuptools.find_packages(),
"python-dateutil >= 1.4.1", #include_package_data = True,
"pytz", install_requires = [
"werkzeug == 0.7", # TODO the pychart package we include in openerp corresponds to PyChart 1.37.
], # It seems there is a single difference, which is a spurious print in generate_docs.py.
tests_require=[ # It is probably safe to move to PyChart 1.39 (the latest one).
'unittest2', # (Let setup.py choose the latest one, and we should check we can remove pychart from
'mock', # our tree.) http://download.gna.org/pychart/
], # TODO 'pychart',
test_suite = 'unittest2.collector', 'babel',
zip_safe=False, 'feedparser',
packages=find_packages(), 'gdata',
classifiers=[ 'lxml',
'Development Status :: 6 - Production/Stable', 'mako',
'Operating System :: OS Independent', 'psycopg2',
'Programming Language :: Python', 'pydot',
'Environment :: Web Environment', 'python-dateutil',
'Topic :: Office/Business :: Financial', 'python-ldap',
], 'python-openid',
scripts=['openerp-web'], 'pytz',
data_files=(find_data_files('addons') 'pywebdav',
+ opts.pop('data_files', []) 'pyyaml',
), 'reportlab',
**opts 'simplejson',
'vatnumber',
'vobject',
'werkzeug',
'zsi',
],
extras_require = {
'SSL' : ['pyopenssl'],
},
**py2exe_options()
) )
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,2 +1,4 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import test_xmlrpc import test_xmlrpc
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -61,3 +61,5 @@ def setUpModule():
def tearDownModule(): def tearDownModule():
""" Shutdown the OpenERP server similarly to a single ctrl-c. """ """ Shutdown the OpenERP server similarly to a single ctrl-c. """
openerp.service.stop_services() openerp.service.stop_services()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -196,3 +196,5 @@ class test_ir_sequence_generate(unittest2.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
unittest2.main() unittest2.main()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -173,3 +173,5 @@ class TestO2MSerialization(unittest2.TestCase):
self.partner.resolve_o2m_commands_to_record_dicts( self.partner.resolve_o2m_commands_to_record_dicts(
self.cr, UID, 'address', [REPLACE_WITH([42])], ['name']) self.cr, UID, 'address', [REPLACE_WITH([42])], ['name'])
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -64,3 +64,5 @@ class test_xmlrpc(unittest2.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
unittest2.main() unittest2.main()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: