Remove more terp references (from Brice)
This commit is contained in:
1 parent
24a0cba613
commit
d54ab2c911
32 files changed
+94
-92
No files matched your search
+4
-4
@@ -50,7 +50,7 @@ class ConfigManager(object):
|
||||
parser.add_option("-c", "--config", dest="config",
|
||||
help="specify alternate config file")
|
||||
parser.add_option("-s", "--save", action="store_true", dest="save",
|
||||
default=False, help="save configuration to ~/.terp_serverrc")
|
||||
default=False, help="save configuration to ~/.trytondrc")
|
||||
parser.add_option("-v", "--verbose", action="store_true",
|
||||
dest="verbose", default=False, help="enable debugging")
|
||||
parser.add_option("--pidfile", dest="pidfile",
|
||||
@@ -125,12 +125,12 @@ class ConfigManager(object):
|
||||
# or even to start the server...
|
||||
if os.name == 'nt':
|
||||
rcfilepath = os.path.join(os.path.abspath(
|
||||
os.path.dirname(sys.argv[0])), 'tinyerp-server.conf')
|
||||
os.path.dirname(sys.argv[0])), 'tryton-server.conf')
|
||||
else:
|
||||
rcfilepath = os.path.expanduser('~/.terp_serverrc')
|
||||
rcfilepath = os.path.expanduser('~/.trytondrc')
|
||||
|
||||
self.rcfile = fname or opt.config \
|
||||
or os.environ.get('TERP_SERVER') or rcfilepath
|
||||
or os.environ.get('TRYTOND') or rcfilepath
|
||||
self.load()
|
||||
|
||||
# Verify that we want to log or not, if not the output will go to stdout
|
||||
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Actions" id="menu_action" parent_id="ir.menu_ir"/>
|
||||
<record model="ir.ui.view" id="action_view_form">
|
||||
@@ -245,4 +245,4 @@
|
||||
<menuitem parent_id="menu_action"
|
||||
action="act_action_wizard_form" id="menu_action_wizard"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="attachment_view_form">
|
||||
<field name="model">ir.attachment</field>
|
||||
@@ -53,4 +53,4 @@
|
||||
<menuitem name="Attachments" parent_id="ir.menu_ir"
|
||||
action="act_attachment_form" id="menu_attachment_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="cron_view_tree">
|
||||
<field name="model">ir.cron</field>
|
||||
@@ -63,4 +63,4 @@
|
||||
<menuitem parent_id="ir.menu_ir"
|
||||
action="act_cron_form" id="menu_cron_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="exports_view_form">
|
||||
<field name="model">ir.exports</field>
|
||||
@@ -47,4 +47,4 @@
|
||||
<menuitem parent_id="ir.menu_ir"
|
||||
action="act_exports_form" id="menu_exports_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Administration" id="menu_administration"/>
|
||||
<menuitem name="IR" id="menu_ir" parent_id="menu_administration"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="model_view_form">
|
||||
<field name="model">ir.model</field>
|
||||
@@ -153,4 +153,4 @@
|
||||
action="act_model_access_form" id="menu_model_access_form"/>
|
||||
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="category_view_form">
|
||||
<field name="model">ir.module.category</field>
|
||||
@@ -41,4 +41,4 @@
|
||||
<menuitem parent_id="menu_modules"
|
||||
action="act_category_tree" id="menu_category_tree"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+31
-31
@@ -128,10 +128,10 @@ class Module(OSV):
|
||||
|
||||
@staticmethod
|
||||
def get_module_info(name):
|
||||
"Return the content of the __terp__.py"
|
||||
"Return the content of the __tryton__.py"
|
||||
try:
|
||||
file_p = tools.file_open(os.path.join(ADDONS_PATH, name,
|
||||
'__terp__.py'))
|
||||
'__tryton__.py'))
|
||||
data = file_p.read()
|
||||
info = eval(data)
|
||||
file_p.close()
|
||||
@@ -320,36 +320,36 @@ class Module(OSV):
|
||||
if ids:
|
||||
module_id = ids[0]
|
||||
mod = self.browse(cursor, user, module_id)
|
||||
terp = Module.get_module_info(mod_name)
|
||||
if terp.get('installable', True) \
|
||||
tryton = Module.get_module_info(mod_name)
|
||||
if tryton.get('installable', True) \
|
||||
and mod.state == 'uninstallable':
|
||||
self.write(cursor, user, module_id, {
|
||||
'state': 'uninstalled'}, context=context)
|
||||
if vercmp(terp.get('version', ''),
|
||||
if vercmp(tryton.get('version', ''),
|
||||
mod.latest_version or '0') > 0:
|
||||
self.write(cursor, user, module_id, {
|
||||
'latest_version': terp.get('version'),
|
||||
'latest_version': tryton.get('version'),
|
||||
'url': '',
|
||||
}, context=context)
|
||||
res[0] += 1
|
||||
self.write(cursor, user, module_id, {
|
||||
'description': terp.get('description', ''),
|
||||
'shortdesc': terp.get('name', ''),
|
||||
'author': terp.get('author', ''),
|
||||
'website': terp.get('website', ''),
|
||||
'license': terp.get('license', 'GPL-2'),
|
||||
'description': tryton.get('description', ''),
|
||||
'shortdesc': tryton.get('name', ''),
|
||||
'author': tryton.get('author', ''),
|
||||
'website': tryton.get('website', ''),
|
||||
'license': tryton.get('license', 'GPL-2'),
|
||||
})
|
||||
self._update_dependencies(cursor, user, module_id,
|
||||
terp.get('depends', []))
|
||||
tryton.get('depends', []))
|
||||
self._update_category(cursor, user, module_id,
|
||||
terp.get('category', 'None'))
|
||||
tryton.get('category', 'None'))
|
||||
continue
|
||||
mod_path = os.path.join(ADDONS_PATH, name)
|
||||
if os.path.isdir(mod_path) \
|
||||
or os.path.islink(mod_path) \
|
||||
or zipfile.is_zipfile(mod_path):
|
||||
terp = Module.get_module_info(mod_name)
|
||||
if not terp or not terp.get('installable', True):
|
||||
tryton = Module.get_module_info(mod_name)
|
||||
if not tryton or not tryton.get('installable', True):
|
||||
continue
|
||||
if not os.path.isfile(
|
||||
os.path.join(ADDONS_PATH, mod_name+'.zip')):
|
||||
@@ -364,18 +364,18 @@ class Module(OSV):
|
||||
new_id = self.create(cursor, user, {
|
||||
'name': mod_name,
|
||||
'state': 'uninstalled',
|
||||
'description': terp.get('description', ''),
|
||||
'shortdesc': terp.get('name', ''),
|
||||
'author': terp.get('author', 'Unknown'),
|
||||
'website': terp.get('website', ''),
|
||||
'latest_version': terp.get('version', ''),
|
||||
'license': terp.get('license', 'GPL-2'),
|
||||
'description': tryton.get('description', ''),
|
||||
'shortdesc': tryton.get('name', ''),
|
||||
'author': tryton.get('author', 'Unknown'),
|
||||
'website': tryton.get('website', ''),
|
||||
'latest_version': tryton.get('version', ''),
|
||||
'license': tryton.get('license', 'GPL-2'),
|
||||
})
|
||||
res[1] += 1
|
||||
self._update_dependencies(cursor, user, new_id,
|
||||
terp.get('depends', []))
|
||||
tryton.get('depends', []))
|
||||
self._update_category(cursor, user, new_id,
|
||||
terp.get('category', 'None'))
|
||||
tryton.get('category', 'None'))
|
||||
|
||||
import socket
|
||||
socket.setdefaulttimeout(10)
|
||||
@@ -448,17 +448,17 @@ class Module(OSV):
|
||||
except IOError:
|
||||
raise ExceptORM('Error', 'Can not create the module file: %s'
|
||||
% (fname,))
|
||||
terp = Module.get_module_info(mod.name)
|
||||
tryton = Module.get_module_info(mod.name)
|
||||
self.write(cursor, user, mod.id, {
|
||||
'description': terp.get('description', ''),
|
||||
'shortdesc': terp.get('name', ''),
|
||||
'author': terp.get('author', 'Unknown'),
|
||||
'website': terp.get('website', ''),
|
||||
'license': terp.get('license', 'GPL-2'),
|
||||
'description': tryton.get('description', ''),
|
||||
'shortdesc': tryton.get('name', ''),
|
||||
'author': tryton.get('author', 'Unknown'),
|
||||
'website': tryton.get('website', ''),
|
||||
'license': tryton.get('license', 'GPL-2'),
|
||||
})
|
||||
self._update_dependencies(cursor, user, mod.id, terp.get('depends',
|
||||
self._update_dependencies(cursor, user, mod.id, tryton.get('depends',
|
||||
[]))
|
||||
self._update_category(cursor, user, mod.id, terp.get('category',
|
||||
self._update_category(cursor, user, mod.id, tryton.get('category',
|
||||
'Uncategorized'))
|
||||
return res
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Modules" parent_id="menu_ir" id="menu_modules"/>
|
||||
<record model="ir.ui.view" id="module_view_form">
|
||||
@@ -187,4 +187,4 @@
|
||||
type="wizard"
|
||||
id="menu_module_install_upgrade"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="repository_view_form">
|
||||
<field name="model">ir.module.repository</field>
|
||||
@@ -51,4 +51,4 @@
|
||||
<menuitem parent_id="menu_modules"
|
||||
action="act_repository_form" id="menu_repository_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="property_view_form">
|
||||
<field name="model">ir.property</field>
|
||||
@@ -72,4 +72,4 @@
|
||||
<menuitem parent_id="ir.menu_ir"
|
||||
action="act_property_form" id="menu_property_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="rule_group_view_form">
|
||||
<field name="model">ir.rule.group</field>
|
||||
@@ -82,4 +82,4 @@
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Sequences" parent_id="ir.menu_ir" id="menu_sequence"/>
|
||||
<record model="ir.ui.view" id="sequence_view_form">
|
||||
@@ -106,4 +106,4 @@
|
||||
<menuitem parent_id="menu_sequence"
|
||||
action="act_sequence_type_form" id="menu_ir_sequence_type"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="translation_view_form">
|
||||
<field name="model">ir.translation</field>
|
||||
@@ -52,4 +52,4 @@
|
||||
<menuitem name="Translations" parent_id="ir.menu_ir"
|
||||
action="act_translation_form" id="menu_translation_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="menu_view_tree_tree">
|
||||
<field name="model">ir.ui.menu</field>
|
||||
@@ -75,4 +75,4 @@
|
||||
<menuitem parent_id="menu_ui"
|
||||
action="act_menu_form" id="menu_menu_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="UI" parent_id="menu_ir" id="menu_ui"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_view_form">
|
||||
<field name="model">ir.ui.view</field>
|
||||
@@ -95,4 +95,4 @@
|
||||
<menuitem parent_id="menu_ui"
|
||||
action="act_view_sc_form" id="menu_view_sc"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="values_view_form">
|
||||
<field name="model">ir.values</field>
|
||||
@@ -56,4 +56,4 @@
|
||||
<menuitem parent_id="ir.menu_ir"
|
||||
action="act_values_form" id="menu_values_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+5
-5
@@ -106,18 +106,18 @@ def create_graph(module_list, force=None):
|
||||
for module in module_list:
|
||||
if module[-4:] == '.zip':
|
||||
module = module[:-4]
|
||||
terp_file = OPJ(ADDONS_PATH, module, '__terp__.py')
|
||||
tryton_file = OPJ(ADDONS_PATH, module, '__tryton__.py')
|
||||
mod_path = OPJ(ADDONS_PATH, module)
|
||||
if module in ('ir', 'workflow', 'res'):
|
||||
root_path = os.path.dirname(__file__)
|
||||
terp_file = OPJ(root_path, module, '__terp__.py')
|
||||
tryton_file = OPJ(root_path, module, '__tryton__.py')
|
||||
mod_path = OPJ(root_path, module)
|
||||
if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'):
|
||||
if os.path.isfile(tryton_file) or zipfile.is_zipfile(mod_path+'.zip'):
|
||||
try:
|
||||
info = eval(tools.file_open(terp_file).read())
|
||||
info = eval(tools.file_open(tryton_file).read())
|
||||
except:
|
||||
Logger().notify_channel('init', LOG_ERROR,
|
||||
'addon:%s:eval file %s' % (module, terp_file))
|
||||
'addon:%s:eval file %s' % (module, tryton_file))
|
||||
raise
|
||||
if info.get('installable', True):
|
||||
packages.append((module, info.get('depends', []), info))
|
||||
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="res.lang" id="lang_en">
|
||||
<field name="code">en_US</field>
|
||||
@@ -35,4 +35,4 @@
|
||||
<menuitem parent_id="res.menu_res"
|
||||
action="act_lang_form" id="menu_lang_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="request_view_tree">
|
||||
<field name="model">res.request</field>
|
||||
@@ -136,4 +136,4 @@
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Res" id="menu_res" parent_id="ir.menu_administration"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="res.group" id="group_admin">
|
||||
<field name="name">admin</field>
|
||||
@@ -186,4 +186,4 @@
|
||||
<menuitem parent_id="res.menu_res"
|
||||
action="act_role_tree" id="menu_role_tree"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
+5
-5
@@ -116,20 +116,20 @@ def init_db(cursor):
|
||||
addons_path = os.path.join(os.path.dirname(__file__), 'addons')
|
||||
|
||||
for i in (os.listdir(addons_path) + ['ir', 'workflow', 'res']):
|
||||
terp_file = opj(addons_path, i, '__terp__.py')
|
||||
tryton_file = opj(addons_path, i, '__tryton__.py')
|
||||
mod_path = opj(addons_path, i)
|
||||
if i in ('ir', 'workflow', 'res'):
|
||||
root_path = os.path.dirname(__file__)
|
||||
terp_file = opj(root_path, i, '__terp__.py')
|
||||
tryton_file = opj(root_path, i, '__tryton__.py')
|
||||
mod_path = opj(root_path, i)
|
||||
info = {}
|
||||
if os.path.isfile(terp_file) \
|
||||
if os.path.isfile(tryton_file) \
|
||||
and not os.path.isfile(opj(addons_path, i + '.zip')):
|
||||
info = eval(file(terp_file).read())
|
||||
info = eval(file(tryton_file).read())
|
||||
elif zipfile.is_zipfile(mod_path):
|
||||
zfile = zipfile.ZipFile(mod_path)
|
||||
i = os.path.splitext(i)[0]
|
||||
info = eval(zfile.read(opj(i, '__terp__.py')))
|
||||
info = eval(zfile.read(opj(i, '__tryton__.py')))
|
||||
if info:
|
||||
categs = info.get('category', 'Uncategorized').split('/')
|
||||
p_id = None
|
||||
|
||||
@@ -274,7 +274,7 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
|
||||
self.taghandler = None
|
||||
|
||||
# Managed tags are handled by the current class
|
||||
self.managedtags= ["data", "terp"]
|
||||
self.managedtags= ["data", "tryton"]
|
||||
self.idlist = []
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
|
||||
elif name == "data":
|
||||
self.noupdate = attributes.get("noupdate", False)
|
||||
|
||||
elif name == "terp":
|
||||
elif name == "tryton":
|
||||
pass
|
||||
|
||||
else:
|
||||
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<tryton>
|
||||
<data>
|
||||
<menuitem name="Workflow" id="menu_workflow" parent_id="ir.menu_administration"/>
|
||||
<record model="ir.ui.view" id="workflow_view_form">
|
||||
@@ -271,4 +271,4 @@
|
||||
<menuitem parent_id="menu_workflow"
|
||||
action="act_workitem_form" id="menu_workitem_form"/>
|
||||
</data>
|
||||
</terp>
|
||||
</tryton>
|
||||
Reference in new issue
Block a user