@@ -14,31 +14,30 @@ login := admin
|
||||
password := admin
|
||||
|
||||
start:
|
||||
python $(interrogation_file) start-server --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port)
|
||||
python $(interrogation_file) start-server --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --net_port=$(net_port)
|
||||
|
||||
create-db:
|
||||
python $(interrogation_file) create-db --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --login=$(login) --password=$(password)
|
||||
python $(interrogation_file) create-db --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --net_port=$(net_port) --login=$(login) --password=$(password)
|
||||
|
||||
drop-db:
|
||||
python $(interrogation_file) drop-db --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port)
|
||||
python $(interrogation_file) drop-db --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --net_port=$(net_port)
|
||||
|
||||
install-module:
|
||||
python $(interrogation_file) install-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --extra-addons=$(extra-addons) --port=$(port) --login=$(login) --password=$(password)
|
||||
python $(interrogation_file) install-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --extra-addons=$(extra-addons) --net_port=$(net_port) --port=$(port) --login=$(login) --password=$(password)
|
||||
|
||||
upgrade-module:
|
||||
python $(interrogation_file) upgrade-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --login=$(login) --password=$(password)
|
||||
python $(interrogation_file) upgrade-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --net_port=$(net_port) --login=$(login) --password=$(password)
|
||||
|
||||
|
||||
install-translation:
|
||||
python $(interrogation_file) install-translation --database=$(database) --translate-in=$(i18n-import) --port=$(port) --login=$(login) --password=$(password) --root-path=$(root-path) --addons-path=$(addons-path)
|
||||
python $(interrogation_file) install-translation --database=$(database) --translate-in=$(i18n-import) --net_port=$(net_port) --port=$(port) --login=$(login) --password=$(password) --root-path=$(root-path) --addons-path=$(addons-path)
|
||||
|
||||
|
||||
version:
|
||||
python bin/openerp-server.py --version
|
||||
|
||||
check-quality:
|
||||
python $(interrogation_file) check-quality --database=$(database) --modules=$(module) --port=$(port) --login=$(login) --password=$(password) --addons-path=$(addons-path) --root-path=$(root-path)
|
||||
python $(interrogation_file) check-quality --database=$(database) --modules=$(module) --net_port=$(net_port) --port=$(port) --login=$(login) --password=$(password) --addons-path=$(addons-path) --root-path=$(root-path)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+636
-258
File diff suppressed because it is too large
Load Diff
@@ -11298,3 +11298,63 @@ msgstr ""
|
||||
msgid "Russian / русский язык"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.user:0
|
||||
msgid "You cannot have two users with the same login !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:ir.model.data:0
|
||||
msgid "You cannot have multiple records with the same id for the same module"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:maintenance.contract:0
|
||||
msgid "Your maintenance contract is already subscribed in the system !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:ir.module.module:0
|
||||
msgid "The name of the module must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.partner.function:0
|
||||
msgid "The Code of the Partner Function must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.partner:0
|
||||
msgid "The name of the Partner must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.country:0
|
||||
msgid "The name of the country must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.country:0
|
||||
msgid "The code of the country must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.lang:0
|
||||
msgid "The name of the language must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: sql_constraint:res.lang:0
|
||||
msgid "The code of the language must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: code:addons/osv/osv.py:0
|
||||
#, python-format
|
||||
msgid "Constraint Error"
|
||||
msgstr ""
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.translation,type:0
|
||||
msgid "SQL Constraint"
|
||||
msgstr ""
|
||||
+664
-264
File diff suppressed because it is too large
Load Diff
+574
-249
File diff suppressed because it is too large
Load Diff
+860
-350
File diff suppressed because it is too large
Load Diff
+745
-364
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+796
-300
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+976
-424
File diff suppressed because it is too large
Load Diff
+1873
-1389
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+759
-289
File diff suppressed because it is too large
Load Diff
+1451
-779
File diff suppressed because it is too large
Load Diff
+1063
-536
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+639
-261
File diff suppressed because it is too large
Load Diff
+561
-244
File diff suppressed because it is too large
Load Diff
+567
-249
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+854
-389
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+785
-298
File diff suppressed because it is too large
Load Diff
+1688
-1284
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+732
-335
File diff suppressed because it is too large
Load Diff
+733
-289
File diff suppressed because it is too large
Load Diff
+702
-272
File diff suppressed because it is too large
Load Diff
+624
-244
File diff suppressed because it is too large
Load Diff
+685
-274
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1190
-770
File diff suppressed because it is too large
Load Diff
+628
-244
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+563
-245
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+833
-446
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+567
-249
File diff suppressed because it is too large
Load Diff
+1704
-1293
File diff suppressed because it is too large
Load Diff
+561
-244
File diff suppressed because it is too large
Load Diff
@@ -1031,6 +1031,7 @@
|
||||
<tree string="Scheduled Actions">
|
||||
<field name="nextcall"/>
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
<field name="interval_number"/>
|
||||
<field name="interval_type"/>
|
||||
<field name="numbercall"/>
|
||||
@@ -1190,12 +1191,12 @@
|
||||
|
||||
<record id="property_rule_group" model="ir.rule.group">
|
||||
<field name="name">Property multi-company</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'ir.property')]"/>
|
||||
<field model="ir.model" name="model_id" ref="model_ir_property"/>
|
||||
<field eval="True" name="global"/>
|
||||
</record>
|
||||
<record id="property_rule_group2" model="ir.rule.group">
|
||||
<field name="name">Property multi-company 2</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'ir.property')]"/>
|
||||
<field model="ir.model" name="model_id" ref="model_ir_property"/>
|
||||
<field eval="True" name="global"/>
|
||||
</record>
|
||||
<record id="property_rule" model="ir.rule">
|
||||
|
||||
@@ -429,8 +429,8 @@ class actions_server(osv.osv):
|
||||
def _select_signals(self, cr, uid, context={}):
|
||||
cr.execute("select distinct t.signal as key, t.signal || ' - [ ' || w.osv || ' ] ' as val from wkf w, wkf_activity a, wkf_transition t "\
|
||||
" where w.id = a.wkf_id " \
|
||||
" and t.act_from = a.wkf_id " \
|
||||
" or t.act_to = a.wkf_id and t.signal not in (null, NULL)")
|
||||
" and t.act_from = a.id " \
|
||||
" or t.act_to = a.id and t.signal not in (null, NULL)")
|
||||
result = cr.fetchall() or []
|
||||
res = []
|
||||
for rs in result:
|
||||
|
||||
@@ -28,7 +28,7 @@ import pooler
|
||||
from osv import fields, osv
|
||||
|
||||
def str2tuple(s):
|
||||
return eval('tuple(%s)' % s)
|
||||
return eval('tuple(%s)' % (s or ''))
|
||||
|
||||
_intervalTypes = {
|
||||
'work_days': lambda interval: DateTime.RelativeDateTime(days=interval),
|
||||
|
||||
@@ -425,7 +425,7 @@ class ir_model_data(osv.osv):
|
||||
'module': lambda *a: ''
|
||||
}
|
||||
_sql_constraints = [
|
||||
('module_name_uniq', 'unique(name, module)', 'You can not have multiple records with the same id for the same module'),
|
||||
('module_name_uniq', 'unique(name, module)', 'You cannot have multiple records with the same id for the same module'),
|
||||
]
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
|
||||
@@ -35,6 +35,7 @@ TRANSLATION_TYPE = [
|
||||
('help', 'Help'),
|
||||
('code', 'Code'),
|
||||
('constraint', 'Constraint'),
|
||||
('sql_constraint', 'SQL Constraint')
|
||||
]
|
||||
|
||||
class ir_translation(osv.osv):
|
||||
@@ -131,14 +132,14 @@ class ir_translation(osv.osv):
|
||||
'and type=%s ' \
|
||||
'and name=%s ' \
|
||||
'and src=%s',
|
||||
(lang, tt, str(name), source))
|
||||
(lang, tt, tools.ustr(name), source))
|
||||
else:
|
||||
cr.execute('select value ' \
|
||||
'from ir_translation ' \
|
||||
'where lang=%s ' \
|
||||
'and type=%s ' \
|
||||
'and name=%s',
|
||||
(lang, tt, str(name)))
|
||||
(lang, tt, tools.ustr(name)))
|
||||
res = cr.fetchone()
|
||||
trad = res and res[0] or ''
|
||||
return trad
|
||||
|
||||
@@ -132,7 +132,7 @@ class res_partner(osv.osv):
|
||||
'name': fields.char('Name', size=128, required=True, select=True),
|
||||
'date': fields.date('Date', select=1),
|
||||
'title': fields.selection(_partner_title_get, 'Title', size=32),
|
||||
'parent_id': fields.many2one('res.partner','Main Company', select=2),
|
||||
'parent_id': fields.many2one('res.partner','Parent Partner', select=2),
|
||||
'child_ids': fields.one2many('res.partner', 'parent_id', 'Partner Ref.'),
|
||||
'ref': fields.char('Code', size=64),
|
||||
'lang': fields.selection(_lang_get, 'Language', size=5, help="If the selected language is loaded in the system, all documents related to this partner will be printed in this language. If not, it will be english."),
|
||||
|
||||
@@ -245,7 +245,6 @@
|
||||
<field name="ref" select="1"/>
|
||||
<field domain="[('domain', '=', 'partner')]" name="title"/>
|
||||
<field name="lang" select="2"/>
|
||||
<field name="company_id" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<field name="customer" select="1"/>
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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 time
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
<field name="name">Employee</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" id="group_multi_company">
|
||||
<field name="name">Useability / Multi Company</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" context="{'noadmin':True}" id="group_extended">
|
||||
<field name="name">Useability / Extended View</field>
|
||||
</record>
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -49,8 +48,8 @@ def to_decode(s):
|
||||
except UnicodeError:
|
||||
return s
|
||||
|
||||
def start_server(root_path, port, addons_path):
|
||||
os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(root_path, str(port), addons_path))
|
||||
def start_server(root_path, port, netport, addons_path):
|
||||
os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --net_port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path))
|
||||
def clean():
|
||||
if os.path.isfile('openerp.pid'):
|
||||
ps = open('openerp.pid')
|
||||
@@ -209,20 +208,23 @@ def drop_db(uri, dbname):
|
||||
def make_links(uri, uid, dbname, source, destination, module, user, pwd):
|
||||
if module in ('base','quality_integration_server'):
|
||||
return True
|
||||
if not os.path.islink(destination + '/' + module):
|
||||
if not os.path.isdir(destination + '/' + module):
|
||||
for path in source:
|
||||
if os.path.isdir(path + '/' + module):
|
||||
os.symlink(path + '/' + module, destination + '/' + module)
|
||||
obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object')
|
||||
execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list')
|
||||
module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)])
|
||||
if len(module_ids):
|
||||
data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id'])
|
||||
dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name'])
|
||||
for dep_data in dep_datas:
|
||||
make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd)
|
||||
return True
|
||||
for path in source:
|
||||
if os.path.isdir(path + '/' + module):
|
||||
if not os.path.islink(destination + '/' + module):
|
||||
os.symlink(path + '/' + module, destination + '/' + module)
|
||||
obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object')
|
||||
execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list')
|
||||
module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)])
|
||||
if len(module_ids):
|
||||
data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id'])
|
||||
dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name'])
|
||||
for dep_data in dep_datas:
|
||||
make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd)
|
||||
break
|
||||
else:
|
||||
if os.path.islink(destination + '/' + module):
|
||||
os.unlink(destination + '/' + module)
|
||||
break
|
||||
return False
|
||||
|
||||
def install_module(uri, dbname, modules, addons='', extra_addons='', user='admin', pwd='admin'):
|
||||
@@ -292,6 +294,7 @@ parser.add_option("--addons-path", dest="addons_path", help="specify the addons
|
||||
parser.add_option("--quality-logs", dest="quality_logs", help="specify the path of quality logs files which has to stores")
|
||||
parser.add_option("--root-path", dest="root_path", help="specify the root path")
|
||||
parser.add_option("-p", "--port", dest="port", help="specify the TCP port", type="int")
|
||||
parser.add_option("--net_port", dest="netport",help="specify the TCP port for netrpc")
|
||||
parser.add_option("-d", "--database", dest="db_name", help="specify the database name")
|
||||
parser.add_option("--login", dest="login", help="specify the User Login")
|
||||
parser.add_option("--password", dest="pwd", help="specify the User Password")
|
||||
@@ -324,6 +327,7 @@ options = {
|
||||
'root-path' : opt.root_path or '',
|
||||
'translate-in': [],
|
||||
'port' : opt.port or 8069,
|
||||
'netport':opt.netport or 8070,
|
||||
'database': opt.db_name or 'terp',
|
||||
'modules' : opt.modules or [],
|
||||
'login' : opt.login or 'admin',
|
||||
@@ -346,7 +350,7 @@ if opt.translate_in:
|
||||
uri = 'http://localhost:' + str(options['port'])
|
||||
|
||||
server_thread = threading.Thread(target=start_server,
|
||||
args=(options['root-path'], options['port'], options['addons-path']))
|
||||
args=(options['root-path'], options['port'],options['netport'], options['addons-path']))
|
||||
try:
|
||||
server_thread.start()
|
||||
if command == 'create-db':
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
+41
-22
@@ -140,6 +140,12 @@ class expression(object):
|
||||
if field._type == 'many2one':
|
||||
right = field_obj.search(cr, uid, [(fargs[1], operator, right)], context=context)
|
||||
self.__exp[i] = (fargs[0], 'in', right)
|
||||
# Making search easier when there is a left operand as field.o2m or field.m2m
|
||||
if field._type in ['many2many','one2many']:
|
||||
right = field_obj.search(cr, uid, [(fargs[1], operator, right)], context=context)
|
||||
right1 = table.search(cr, uid, [(fargs[0],'in', right)], context=context)
|
||||
self.__exp[i] = ('id', 'in', right1)
|
||||
|
||||
continue
|
||||
|
||||
if field._properties:
|
||||
@@ -162,32 +168,45 @@ class expression(object):
|
||||
|
||||
|
||||
elif field._type == 'one2many':
|
||||
call_null = True
|
||||
|
||||
if right:
|
||||
# Applying recursivity on field(one2many)
|
||||
if operator == 'child_of':
|
||||
if isinstance(right, basestring):
|
||||
ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)]
|
||||
operator = 'in'
|
||||
ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', limit=None)]
|
||||
else:
|
||||
if not isinstance(right,list):
|
||||
ids2 = [right]
|
||||
else:
|
||||
ids2 = right
|
||||
if not ids2:
|
||||
call_null = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
ids2 = list(right)
|
||||
if field._obj != working_table._name:
|
||||
dom = _rec_get(ids2, field_obj, left=left, prefix=field._obj)
|
||||
else:
|
||||
call_null = False
|
||||
o2m_op = 'in'
|
||||
if operator in ['not like','not ilike','not in','<>','!=']:
|
||||
o2m_op = 'not in'
|
||||
self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2, operator, field._type))
|
||||
dom = _rec_get(ids2, working_table, parent=left)
|
||||
self.__exp = self.__exp[:i] + dom + self.__exp[i+1:]
|
||||
|
||||
if call_null:
|
||||
o2m_op = 'not in'
|
||||
if operator in ['not like','not ilike','not in','<>','!=']:
|
||||
o2m_op = 'in'
|
||||
self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0])
|
||||
else:
|
||||
call_null = True
|
||||
|
||||
if right:
|
||||
if isinstance(right, basestring):
|
||||
ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)]
|
||||
operator = 'in'
|
||||
else:
|
||||
if not isinstance(right,list):
|
||||
ids2 = [right]
|
||||
else:
|
||||
ids2 = right
|
||||
if not ids2:
|
||||
call_null = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
else:
|
||||
call_null = False
|
||||
o2m_op = 'in'
|
||||
if operator in ['not like','not ilike','not in','<>','!=']:
|
||||
o2m_op = 'not in'
|
||||
self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2, operator, field._type))
|
||||
|
||||
if call_null:
|
||||
o2m_op = 'not in'
|
||||
if operator in ['not like','not ilike','not in','<>','!=']:
|
||||
o2m_op = 'in'
|
||||
self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0])
|
||||
|
||||
elif field._type == 'many2many':
|
||||
#FIXME
|
||||
|
||||
+10
-9
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -528,6 +527,8 @@ class many2many(_column):
|
||||
return
|
||||
obj = obj.pool.get(self._obj)
|
||||
for act in values:
|
||||
if not (isinstance(act, list) or isinstance(act, tuple)) or not act:
|
||||
continue
|
||||
if act[0] == 0:
|
||||
idnew = obj.create(cr, user, act[2])
|
||||
cr.execute('insert into '+self._rel+' ('+self._id1+','+self._id2+') values (%s,%s)', (id, idnew))
|
||||
|
||||
+56
-27
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -53,6 +52,7 @@ import fields
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
import copy
|
||||
import sys
|
||||
import copy
|
||||
|
||||
@@ -63,6 +63,7 @@ except ImportError:
|
||||
sys.stderr.write("ERROR: Try to install the python-lxml package\n")
|
||||
sys.exit(2)
|
||||
|
||||
|
||||
from tools.config import config
|
||||
|
||||
regex_order = re.compile('^([a-z0-9_]+( *desc| *asc)?( *, *|))+$', re.I)
|
||||
@@ -535,7 +536,9 @@ class orm_template(object):
|
||||
for rr in r :
|
||||
if isinstance(rr.name, browse_record):
|
||||
rr = rr.name
|
||||
dt += rr.name or '' + ','
|
||||
rr_name = self.pool.get(rr._table_name).name_get(cr, uid, [rr.id])
|
||||
rr_name = rr_name and rr_name[0] and rr_name[0][1] or ''
|
||||
dt += tools.ustr(rr_name or '') + ','
|
||||
data[fpos] = dt[:-1]
|
||||
break
|
||||
lines += lines2[1:]
|
||||
@@ -546,7 +549,8 @@ class orm_template(object):
|
||||
i += 1
|
||||
if i == len(f):
|
||||
if isinstance(r, browse_record):
|
||||
r = r.name
|
||||
r = self.pool.get(r._table_name).name_get(cr, uid, [r.id])
|
||||
r = r and r[0] and r[0][1] or ''
|
||||
data[fpos] = tools.ustr(r or '')
|
||||
return [data] + lines
|
||||
|
||||
@@ -855,14 +859,17 @@ class orm_template(object):
|
||||
noupdate=noupdate, res_id=res_id, context=context)
|
||||
except Exception, e:
|
||||
import psycopg2
|
||||
import osv
|
||||
if isinstance(e,psycopg2.IntegrityError):
|
||||
msg= _('Insertion Failed!')
|
||||
msg= _('Insertion Failed! ')
|
||||
for key in self.pool._sql_error.keys():
|
||||
if key in e[0]:
|
||||
msg = self.pool._sql_error[key]
|
||||
break
|
||||
return (-1, res,'Line ' + str(counter) +' : ' + msg,'' )
|
||||
|
||||
return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
|
||||
if isinstance(e, osv.orm.except_orm ):
|
||||
msg = _('Insertion Failed! ' + e[1])
|
||||
return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
|
||||
for lang in translate:
|
||||
context2 = context.copy()
|
||||
context2['lang'] = lang
|
||||
@@ -1042,10 +1049,9 @@ class orm_template(object):
|
||||
attrs = {'views': views}
|
||||
if node.get('widget') and node.get('widget') == 'selection':
|
||||
# We can not use the 'string' domain has it is defined according to the record !
|
||||
dom = []
|
||||
dom = None
|
||||
if column._domain and not isinstance(column._domain, (str, unicode)):
|
||||
dom = column._domain
|
||||
|
||||
attrs['selection'] = self.pool.get(relation).name_search(cr, user, '', dom, context=context)
|
||||
if (node.get('required') and not int(node.get('required'))) or not column.required:
|
||||
attrs['selection'].append((False,''))
|
||||
@@ -1121,8 +1127,7 @@ class orm_template(object):
|
||||
# running -> done = signal_next (role Z)
|
||||
# running -> cancel = signal_cancel (role Z)
|
||||
|
||||
|
||||
# As we don't know the object state, in this scenario,
|
||||
# As we don't know the object state, in this scenario,
|
||||
# the button "signal_cancel" will be always shown as there is no restriction to cancel in draft
|
||||
# the button "signal_next" will be show if the user has any of the roles (X Y or Z)
|
||||
# The verification will be made later in workflow process...
|
||||
@@ -1239,7 +1244,7 @@ class orm_template(object):
|
||||
while len(toparse):
|
||||
node2 = toparse.pop(0)
|
||||
if node2.tag == 'data':
|
||||
toparse += node2.getchildren()
|
||||
toparse += [ c for c in doc_dest ]
|
||||
continue
|
||||
node = _find(src, node2)
|
||||
if node is not None:
|
||||
@@ -1380,7 +1385,7 @@ class orm_template(object):
|
||||
result['name'] = 'default'
|
||||
result['field_parent'] = False
|
||||
result['view_id'] = 0
|
||||
|
||||
|
||||
xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context)
|
||||
result['arch'] = xarch
|
||||
result['fields'] = xfields
|
||||
@@ -1998,12 +2003,23 @@ class orm(orm_template):
|
||||
cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k))
|
||||
cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" VARCHAR(%d)' % (self._table, k, f.size))
|
||||
cr.execute('UPDATE "%s" SET "%s"=temp_change_size::VARCHAR(%d)' % (self._table, k, f.size))
|
||||
cr.execute('ALTER TABLE "%s" DROP COLUMN temp_change_size' % (self._table,))
|
||||
cr.execute('ALTER TABLE "%s" DROP COLUMN temp_change_size CASCADE' % (self._table,))
|
||||
cr.commit()
|
||||
for c in casts:
|
||||
if (f_pg_type==c[0]) and (f._type==c[1]):
|
||||
if f_pg_type != f_obj_type:
|
||||
logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1]))
|
||||
# Adding upcoming 6 lines to check whether only the size of the fields got changed or not.E.g. :(16,3) to (16,4)
|
||||
field_size_change = False
|
||||
if f_pg_type in ['int4','numeric','float8']:
|
||||
if f.digits:
|
||||
field_size = (65535 * f.digits[0]) + f.digits[0] + f.digits[1]
|
||||
if field_size != f_pg_size:
|
||||
field_size_change = True
|
||||
|
||||
if f_pg_type != f_obj_type or field_size_change:
|
||||
if f_pg_type != f_obj_type:
|
||||
logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1]))
|
||||
if field_size_change:
|
||||
logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed in the size." % (k, self._table))
|
||||
ok = True
|
||||
cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k))
|
||||
cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, c[2]))
|
||||
@@ -2141,7 +2157,8 @@ class orm(orm_template):
|
||||
ok = True
|
||||
for x,y,z,e,f,l in self.pool._store_function[object]:
|
||||
if (x==self._name) and (y==store_field) and (e==fields2):
|
||||
ok = False
|
||||
if f==order:
|
||||
ok = False
|
||||
if ok:
|
||||
self.pool._store_function[object].append( (self._name, store_field, fnct, fields2, order, length))
|
||||
self.pool._store_function[object].sort(lambda x,y: cmp(x[4],y[4]))
|
||||
@@ -2307,7 +2324,21 @@ class orm(orm_template):
|
||||
for key, v in r.items():
|
||||
if v == None:
|
||||
r[key] = False
|
||||
|
||||
if key in self._columns.keys():
|
||||
type = self._columns[key]._type
|
||||
elif key in self._inherit_fields.keys():
|
||||
type = self._inherit_fields[key][2]._type
|
||||
else:
|
||||
continue
|
||||
if type == 'reference' and v:
|
||||
model,ref_id = v.split(',')
|
||||
table = self.pool.get(model)._table
|
||||
cr.execute('select id from "%s" where id=%s' % (table,ref_id))
|
||||
id_exist = cr.fetchone()
|
||||
if not id_exist:
|
||||
cr.execute('update "'+self._table+'" set "'+key+'"=NULL where "%s"=%s' %(key,''.join("'"+str(v)+"'")))
|
||||
r[key] = ''
|
||||
|
||||
if isinstance(ids, (int, long, dict)):
|
||||
return result and result[0] or False
|
||||
return result
|
||||
@@ -3273,6 +3304,4 @@ class orm(orm_template):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
+11
-10
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -34,6 +33,8 @@ from psycopg2 import IntegrityError
|
||||
from netsvc import Logger, LOG_ERROR
|
||||
from tools.misc import UpdateableDict
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
module_list = []
|
||||
module_class_list = {}
|
||||
class_pool = {}
|
||||
@@ -64,7 +65,7 @@ class osv_pool(netsvc.Service):
|
||||
except IntegrityError, inst:
|
||||
for key in self._sql_error.keys():
|
||||
if key in inst[0]:
|
||||
self.abortResponse(1, 'Constraint Error', 'warning', self._sql_error[key])
|
||||
self.abortResponse(1, _('Constraint Error'), 'warning', _(self._sql_error[key]))
|
||||
self.abortResponse(1, 'Integrity Error', 'warning', inst[0])
|
||||
except Exception, e:
|
||||
import traceback, sys
|
||||
|
||||
+9
-10
@@ -1,23 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>).
|
||||
# All Rights Reserved
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -1,43 +1,25 @@
|
||||
#!/bin/env python
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009, P. Christeas, Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Copyright (C) 2005, Fabien Pinckaers, UCL, FSA
|
||||
# Copyright (C) 2008, P. Christeas
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import sys
|
||||
import StringIO
|
||||
import copy
|
||||
|
||||
@@ -1,42 +1,24 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# trml2pdf - An RML to PDF converter
|
||||
# Copyright (C) 2003, Fabien Pinckaers, UCL, FSA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import re
|
||||
import reportlab
|
||||
import reportlab.lib.units
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright P. Christeas <p_christ@hol.gr> 2008,2009
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
+20
-6
@@ -52,6 +52,7 @@ psycopg2.extensions.register_type(psycopg2.extensions.new_type((700, 701, 1700,)
|
||||
import tools
|
||||
from tools.func import wraps
|
||||
from datetime import datetime as mdt
|
||||
from datetime import timedelta
|
||||
import threading
|
||||
|
||||
import re
|
||||
@@ -133,18 +134,21 @@ class Cursor(object):
|
||||
raise
|
||||
|
||||
if self.sql_log:
|
||||
delay = mdt.now() - now
|
||||
delay = delay.seconds * 1E6 + delay.microseconds
|
||||
|
||||
log("query: %s" % self._obj.query)
|
||||
self.sql_log_count+=1
|
||||
res_from = re_from.match(query.lower())
|
||||
if res_from:
|
||||
self.sql_from_log.setdefault(res_from.group(1), [0, 0])
|
||||
self.sql_from_log[res_from.group(1)][0] += 1
|
||||
self.sql_from_log[res_from.group(1)][1] += mdt.now() - now
|
||||
self.sql_from_log[res_from.group(1)][1] += delay
|
||||
res_into = re_into.match(query.lower())
|
||||
if res_into:
|
||||
self.sql_into_log.setdefault(res_into.group(1), [0, 0])
|
||||
self.sql_into_log[res_into.group(1)][0] += 1
|
||||
self.sql_into_log[res_into.group(1)][1] += mdt.now() - now
|
||||
self.sql_into_log[res_into.group(1)][1] += delay
|
||||
return res
|
||||
|
||||
def print_log(self):
|
||||
@@ -160,10 +164,12 @@ class Cursor(object):
|
||||
sqllogitems.sort(key=lambda k: k[1][1])
|
||||
log("SQL LOG %s:" % (type,))
|
||||
for r in sqllogitems:
|
||||
log("table: %s: %s/%s" %(r[0], str(r[1][1]), r[1][0]))
|
||||
delay = timedelta(microseconds=r[1][1])
|
||||
log("table: %s: %s/%s" %(r[0], str(delay), r[1][0]))
|
||||
sum+= r[1][1]
|
||||
sqllogs[type].clear()
|
||||
log("SUM %s:%s/%d [%d]" % (type, sum, self.sql_log_count,sql_counter))
|
||||
sum = timedelta(microseconds=sum)
|
||||
log("SUM %s:%s/%d [%d]" % (type, str(sum), self.sql_log_count, sql_counter))
|
||||
process('from')
|
||||
process('into')
|
||||
self.sql_log_count = 0
|
||||
@@ -240,7 +246,7 @@ class ConnectionPool(object):
|
||||
|
||||
result = None
|
||||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if not used and cnx.dsn == dsn:
|
||||
if not used and dsn_are_equals(cnx.dsn, dsn):
|
||||
self._debug('Existing connection found at index %d' % i)
|
||||
|
||||
self._connections.pop(i)
|
||||
@@ -281,7 +287,7 @@ class ConnectionPool(object):
|
||||
@locked
|
||||
def close_all(self, dsn):
|
||||
for i, (cnx, used) in tools.reverse_enumerate(self._connections):
|
||||
if cnx.dsn == dsn:
|
||||
if dsn_are_equals(cnx.dsn, dsn):
|
||||
cnx.close()
|
||||
self._connections.pop(i)
|
||||
|
||||
@@ -300,6 +306,7 @@ class Connection(object):
|
||||
|
||||
def __del__(self):
|
||||
if self._unique:
|
||||
close_db(self.dbname)
|
||||
self.__LOCKS[self.dbname].release()
|
||||
|
||||
def cursor(self, serialized=False):
|
||||
@@ -318,6 +325,13 @@ for p in ('host', 'port', 'user', 'password'):
|
||||
def dsn(db_name):
|
||||
return '%sdbname=%s' % (_dsn, db_name)
|
||||
|
||||
def dsn_are_equals(first, second):
|
||||
def key(dsn):
|
||||
k = dict(x.split('=', 1) for x in dsn.strip().split())
|
||||
k.pop('password', None) # password is not relevant
|
||||
return k
|
||||
return key(first) == key(second)
|
||||
|
||||
|
||||
_Pool = ConnectionPool(int(tools.config['db_maxconn']))
|
||||
|
||||
|
||||
+109
-128
@@ -23,147 +23,128 @@
|
||||
# French
|
||||
#-------------------------------------------------------------
|
||||
|
||||
unites = {
|
||||
0: '', 1:'un', 2:'deux', 3:'trois', 4:'quatre', 5:'cinq', 6:'six', 7:'sept', 8:'huit', 9:'neuf',
|
||||
10:'dix', 11:'onze', 12:'douze', 13:'treize', 14:'quatorze', 15:'quinze', 16:'seize',
|
||||
21:'vingt et un', 31:'trente et un', 41:'quarante et un', 51:'cinquante et un', 61:'soixante et un',
|
||||
71:'septante et un', 91:'nonante et un', 80:'quatre-vingts'
|
||||
}
|
||||
|
||||
dizaine = {
|
||||
1: 'dix', 2:'vingt', 3:'trente',4:'quarante', 5:'cinquante', 6:'soixante', 7:'septante', 8:'quatre-vingt', 9:'nonante'
|
||||
}
|
||||
to_19_fr = ( 'zéro', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six',
|
||||
'sept', 'huit', 'neuf', 'dix', 'onze', 'douze', 'treize',
|
||||
'quatorze', 'quinze', 'seize', 'dix-sept', 'dix-huit', 'dix-neuf' )
|
||||
tens_fr = ( 'vingt', 'trente', 'quarante', 'Cinquante', 'Soixante', 'Soixante-dix', 'Quatre-vingts', 'Quatre-vingt Dix')
|
||||
denom_fr = ( '',
|
||||
'Mille', 'Millions', 'Milliards', 'Billions', 'Quadrillions',
|
||||
'Quintillion', 'Sextillion', 'Septillion', 'Octillion', 'Nonillion',
|
||||
'Décillion', 'Undecillion', 'Duodecillion', 'Tredecillion', 'Quattuordecillion',
|
||||
'Sexdecillion', 'Septendecillion', 'Octodecillion', 'Icosillion', 'Vigintillion' )
|
||||
|
||||
centaine = {
|
||||
0:'', 1: 'cent', 2:'deux cent', 3:'trois cent',4:'quatre cent', 5:'cinq cent', 6:'six cent', 7:'sept cent', 8:'huit cent', 9:'neuf cent'
|
||||
}
|
||||
# convert a value < 100 to French.
|
||||
def _convert_nn_fr(val):
|
||||
if val < 20:
|
||||
return to_19_fr[val]
|
||||
for (dcap, dval) in ((k, 20 + (10 * v)) for (v, k) in enumerate(tens_fr)):
|
||||
if dval + 10 > val:
|
||||
if val % 10:
|
||||
return dcap + '-' + to_19_fr[val % 10]
|
||||
return dcap
|
||||
|
||||
mille = {
|
||||
0:'', 1:'mille'
|
||||
}
|
||||
# convert a value < 1000 to french, special cased because it is the level that kicks
|
||||
# off the < 100 special case. The rest are more general. This also allows you to
|
||||
# get strings in the form of 'forty-five hundred' if called directly.
|
||||
def _convert_nnn_fr(val):
|
||||
word = ''
|
||||
(mod, rem) = (val % 100, val // 100)
|
||||
if rem > 0:
|
||||
word = to_19_fr[rem] + ' Cent'
|
||||
if mod > 0:
|
||||
word = word + ' '
|
||||
if mod > 0:
|
||||
word = word + _convert_nn_fr(mod)
|
||||
return word
|
||||
|
||||
def _100_to_text_fr(chiffre):
|
||||
if chiffre in unites:
|
||||
return unites[chiffre]
|
||||
else:
|
||||
if chiffre%10>0:
|
||||
return dizaine[chiffre / 10]+'-'+unites[chiffre % 10]
|
||||
else:
|
||||
return dizaine[chiffre / 10]
|
||||
def french_number(val):
|
||||
if val < 100:
|
||||
return _convert_nn_fr(val)
|
||||
if val < 1000:
|
||||
return _convert_nnn_fr(val)
|
||||
for (didx, dval) in ((v - 1, 1000 ** v) for v in range(len(denom_fr))):
|
||||
if dval > val:
|
||||
mod = 1000 ** didx
|
||||
l = val // mod
|
||||
r = val - (l * mod)
|
||||
ret = _convert_nnn_fr(l) + ' ' + denom_fr[didx]
|
||||
if r > 0:
|
||||
ret = ret + ', ' + french_number(r)
|
||||
return ret
|
||||
|
||||
def _1000_to_text_fr(chiffre):
|
||||
d = _100_to_text_fr(chiffre % 100)
|
||||
d2 = chiffre/100
|
||||
if d2>0 and d:
|
||||
return centaine[d2]+' '+d
|
||||
elif d2>1 and not(d):
|
||||
return centaine[d2]+'s'
|
||||
else:
|
||||
return centaine[d2] or d
|
||||
|
||||
def _10000_to_text_fr(chiffre):
|
||||
if chiffre==0:
|
||||
return 'zero'
|
||||
part1 = _1000_to_text_fr(chiffre % 1000)
|
||||
part2 = mille.get(chiffre / 1000, _1000_to_text_fr(chiffre / 1000)+' mille')
|
||||
if part2 and part1:
|
||||
part1 = ' '+part1
|
||||
return part2+part1
|
||||
|
||||
def amount_to_text_fr(number, currency):
|
||||
units_number = int(number)
|
||||
units_name = currency
|
||||
if units_number > 1:
|
||||
units_name += 's'
|
||||
units = _10000_to_text_fr(units_number)
|
||||
units = units_number and '%s %s' % (units, units_name) or ''
|
||||
|
||||
cents_number = int(number * 100) % 100
|
||||
cents_name = (cents_number > 1) and 'cents' or 'cent'
|
||||
cents = _100_to_text_fr(cents_number)
|
||||
cents = cents_number and '%s %s' % (cents, cents_name) or ''
|
||||
|
||||
if units and cents:
|
||||
cents = ' '+cents
|
||||
|
||||
return units + cents
|
||||
list = str(number).split('.')
|
||||
start_word = french_number(abs(int(list[0])))
|
||||
end_word = french_number(int(list[1]))
|
||||
cents_number = int(list[1])
|
||||
cents_name = (cents_number > 1) and ' Cents' or ' Cent'
|
||||
final_result = start_word +' '+units_name+' '+ end_word +' '+cents_name
|
||||
return final_result
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Dutch
|
||||
#-------------------------------------------------------------
|
||||
|
||||
units_nl = {
|
||||
0:'', 1:'een', 2:'twee', 3:'drie', 4:'vier', 5:'vijf', 6:'zes', 7:'zeven', 8:'acht', 9:'negen',
|
||||
10:'tien', 11:'elf', 12:'twaalf', 13:'dertien', 14:'veertien'
|
||||
}
|
||||
to_19_nl = ( 'Nul', 'Een', 'Twee', 'Drie', 'Vier', 'Vijf', 'Zes',
|
||||
'Zeven', 'Acht', 'Negen', 'Tien', 'Elf', 'Twaalf', 'Dertien',
|
||||
'Veertien', 'Vijftien', 'Zestien', 'Zeventien', 'Achttien', 'Negentien' )
|
||||
tens_nl = ( 'Twintig', 'Dertig', 'Veertig', 'Vijftig', 'Zestig', 'Zeventig', 'Tachtig', 'Negentig')
|
||||
denom_nl = ( '',
|
||||
'Duizend', 'Miljoen', 'Miljard', 'Triljoen', 'Quadriljoen',
|
||||
'Quintillion', 'Sextiljoen', 'Septillion', 'Octillion', 'Nonillion',
|
||||
'Decillion', 'Undecillion', 'Duodecillion', 'Tredecillion', 'Quattuordecillion',
|
||||
'Sexdecillion', 'Septendecillion', 'Octodecillion', 'Novemdecillion', 'Vigintillion' )
|
||||
|
||||
tens_nl = {
|
||||
1: 'tien', 2:'twintig', 3:'dertig',4:'veertig', 5:'vijftig', 6:'zestig', 7:'zeventig', 8:'tachtig', 9:'negentig'
|
||||
}
|
||||
# convert a value < 100 to Dutch.
|
||||
def _convert_nn_nl(val):
|
||||
if val < 20:
|
||||
return to_19_nl[val]
|
||||
for (dcap, dval) in ((k, 20 + (10 * v)) for (v, k) in enumerate(tens_nl)):
|
||||
if dval + 10 > val:
|
||||
if val % 10:
|
||||
return dcap + '-' + to_19_nl[val % 10]
|
||||
return dcap
|
||||
|
||||
hundreds_nl = {
|
||||
0:'', 1: 'honderd',
|
||||
}
|
||||
# convert a value < 1000 to Dutch, special cased because it is the level that kicks
|
||||
# off the < 100 special case. The rest are more general. This also allows you to
|
||||
# get strings in the form of 'forty-five hundred' if called directly.
|
||||
def _convert_nnn_nl(val):
|
||||
word = ''
|
||||
(mod, rem) = (val % 100, val // 100)
|
||||
if rem > 0:
|
||||
word = to_19_nl[rem] + ' Honderd'
|
||||
if mod > 0:
|
||||
word = word + ' '
|
||||
if mod > 0:
|
||||
word = word + _convert_nn_nl(mod)
|
||||
return word
|
||||
|
||||
thousands_nl = {
|
||||
0:'', 1:'duizend'
|
||||
}
|
||||
def dutch_number(val):
|
||||
if val < 100:
|
||||
return _convert_nn_nl(val)
|
||||
if val < 1000:
|
||||
return _convert_nnn_nl(val)
|
||||
for (didx, dval) in ((v - 1, 1000 ** v) for v in range(len(denom_nl))):
|
||||
if dval > val:
|
||||
mod = 1000 ** didx
|
||||
l = val // mod
|
||||
r = val - (l * mod)
|
||||
ret = _convert_nnn_nl(l) + ' ' + denom_nl[didx]
|
||||
if r > 0:
|
||||
ret = ret + ', ' + dutch_number(r)
|
||||
return ret
|
||||
|
||||
def _100_to_text_nl(number):
|
||||
if number in units_nl:
|
||||
return units_nl[number]
|
||||
else:
|
||||
if number%10 > 0:
|
||||
if number>10 and number<20:
|
||||
return units_nl[number % 10]+tens_nl[number / 10]
|
||||
else:
|
||||
units = units_nl[number % 10]
|
||||
if units[-1] == 'e':
|
||||
joinword = 'ën'
|
||||
else:
|
||||
joinword = 'en'
|
||||
return units+joinword+tens_nl[number / 10]
|
||||
else:
|
||||
return tens_nl[number / 10]
|
||||
|
||||
def _1000_to_text_nl(number):
|
||||
part1 = _100_to_text_nl(number % 100)
|
||||
part2 = hundreds_nl.get(number / 100, units_nl[number/100] + hundreds_nl[1])
|
||||
if part2 and part1:
|
||||
part1 = ' ' + part1
|
||||
return part2 + part1
|
||||
|
||||
def _10000_to_text_nl(number):
|
||||
if number==0:
|
||||
return 'nul'
|
||||
part1 = _1000_to_text_nl(number % 1000)
|
||||
if thousands_nl.has_key(number / 1000):
|
||||
part2 = thousands_nl[number / 1000]
|
||||
else:
|
||||
if (number / 1000 % 100 > 0) and (number / 1000 > 100):
|
||||
space = ' '
|
||||
else:
|
||||
space = ''
|
||||
part2 = _1000_to_text_nl(number / 1000) + space + thousands_nl[1]
|
||||
if part2 and part1:
|
||||
part1 = ' ' + part1
|
||||
return part2 + part1
|
||||
|
||||
def amount_to_text_nl(number, currency):
|
||||
units_number = int(number)
|
||||
units_name = currency
|
||||
units = _10000_to_text_nl(units_number)
|
||||
units = units_number and '%s %s' % (units, units_name) or ''
|
||||
|
||||
cents_number = int(number * 100) % 100
|
||||
cents_name = 'cent'
|
||||
cents = _100_to_text_nl(cents_number)
|
||||
cents = cents_number and '%s %s' % (cents, cents_name) or ''
|
||||
|
||||
if units and cents:
|
||||
cents = ' ' + cents
|
||||
|
||||
return units + cents
|
||||
list = str(number).split('.')
|
||||
start_word = dutch_number(int(list[0]))
|
||||
end_word = dutch_number(int(list[1]))
|
||||
cents_number = int(list[1])
|
||||
cents_name = (cents_number > 1) and 'cent' or 'cent'
|
||||
final_result = start_word +' '+units_name+' '+ end_word +' '+cents_name
|
||||
return final_result
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Generic functions
|
||||
@@ -182,17 +163,17 @@ def amount_to_text(nbr, lang='fr', currency='euro'):
|
||||
Example:
|
||||
1654: mille six cent cinquante-quatre.
|
||||
"""
|
||||
if nbr > 1000000:
|
||||
#TODO: use logger
|
||||
print "WARNING: number too large '%d', can't translate it!" % (nbr,)
|
||||
return str(nbr)
|
||||
# if nbr > 1000000:
|
||||
##TODO: use logger
|
||||
# print "WARNING: number too large '%d', can't translate it!" % (nbr,)
|
||||
# return str(nbr)
|
||||
|
||||
if not _translate_funcs.has_key(lang):
|
||||
#TODO: use logger
|
||||
print "WARNING: no translation function found for lang: '%s'" % (lang,)
|
||||
#TODO: (default should be en) same as above
|
||||
lang = 'fr'
|
||||
return _translate_funcs[lang](nbr, currency)
|
||||
return _translate_funcs[lang](abs(nbr), currency)
|
||||
|
||||
if __name__=='__main__':
|
||||
from sys import argv
|
||||
|
||||
@@ -22,85 +22,66 @@
|
||||
#-------------------------------------------------------------
|
||||
#ENGLISH
|
||||
#-------------------------------------------------------------
|
||||
from tools.translate import _
|
||||
|
||||
ones = {
|
||||
0: '', 1:'One', 2:'Two', 3:'Three', 4:'Four', 5:'Five', 6:'Six', 7:'Seven', 8:'Eight', 9:'Nine',
|
||||
10:'Ten', 11:'Eleven', 12:'Twelve', 13:'Thirteen', 14:'Forteen', 15:'Fifteen', 16:'Sixteen', 17:"Seventeen",18:"Eighteen",19:"Nineteen",
|
||||
}
|
||||
to_19 = ( 'Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six',
|
||||
'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen',
|
||||
'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen' )
|
||||
tens = ( 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety')
|
||||
denom = ( '',
|
||||
'Thousand', 'Million', 'Billion', 'Trillion', 'Quadrillion',
|
||||
'Quintillion', 'Sextillion', 'Septillion', 'Octillion', 'Nonillion',
|
||||
'Decillion', 'Undecillion', 'Duodecillion', 'Tredecillion', 'Quattuordecillion',
|
||||
'Sexdecillion', 'Septendecillion', 'Octodecillion', 'Novemdecillion', 'Vigintillion' )
|
||||
|
||||
tens = {
|
||||
1: 'Ten', 2: 'Twenty ', 3:'Thirty', 4:'Forty', 5:'Fifty', 6: 'Sixty', 7 : 'Seventy', 8:'Eighty' ,9: 'Ninety'}
|
||||
# convert a value < 100 to English.
|
||||
def _convert_nn(val):
|
||||
if val < 20:
|
||||
return to_19[val]
|
||||
for (dcap, dval) in ((k, 20 + (10 * v)) for (v, k) in enumerate(tens)):
|
||||
if dval + 10 > val:
|
||||
if val % 10:
|
||||
return dcap + '-' + to_19[val % 10]
|
||||
return dcap
|
||||
|
||||
hundred = {
|
||||
0:'',1: 'One Hundred', 2: 'Two Hundred', 3: 'Three Hundred', 4 :'Four Hundred', 5: 'Five Hundred', 6: 'Six Hundred', 7 :'Seven Hundred', 8:' Eight Hundred ', 9:'Nine Hundred '
|
||||
}
|
||||
|
||||
thousands ={
|
||||
0:'',1: 'One Thousand'
|
||||
}
|
||||
|
||||
lacs = {
|
||||
0:'',1: 'Lac'
|
||||
}
|
||||
|
||||
def _100_to_text(number):
|
||||
if number in ones:
|
||||
return ones[number]
|
||||
else:
|
||||
if number%10>0:
|
||||
return tens[number / 10]+'-'+ones[number % 10]
|
||||
else:
|
||||
return tens[number / 10]
|
||||
|
||||
def _1000_to_text(number):
|
||||
d = _100_to_text(number % 100)
|
||||
d2 = number/100
|
||||
if d2>0 and d:
|
||||
return hundred[d2]+' '+d
|
||||
elif d2>1 and not(d):
|
||||
return hundred[d2]+'s'
|
||||
else:
|
||||
return hundred[d2] or d
|
||||
|
||||
def _10000_to_text(number):
|
||||
if number==0:
|
||||
return 'zero'
|
||||
part1 = _1000_to_text(number % 1000)
|
||||
part2 = thousands.get(number / 1000, _1000_to_text(number / 1000)+' Thousands')
|
||||
if part2 and part1:
|
||||
part1 = ' '+part1
|
||||
return part2+part1
|
||||
|
||||
def _1000000_to_text(number):
|
||||
if number==0:
|
||||
return 'zero'
|
||||
part1 = _10000_to_text(number % 100000)
|
||||
part2 = lacs.get(number / 100000, _10000_to_text(number / 100000)+' Lacs')
|
||||
if part2 and part1:
|
||||
part1 = ' '+part1
|
||||
return part2+part1
|
||||
# convert a value < 1000 to english, special cased because it is the level that kicks
|
||||
# off the < 100 special case. The rest are more general. This also allows you to
|
||||
# get strings in the form of 'forty-five hundred' if called directly.
|
||||
def _convert_nnn(val):
|
||||
word = ''
|
||||
(mod, rem) = (val % 100, val // 100)
|
||||
if rem > 0:
|
||||
word = to_19[rem] + ' Hundred'
|
||||
if mod > 0:
|
||||
word = word + ' '
|
||||
if mod > 0:
|
||||
word = word + _convert_nn(mod)
|
||||
return word
|
||||
|
||||
def english_number(val):
|
||||
if val < 100:
|
||||
return _convert_nn(val)
|
||||
if val < 1000:
|
||||
return _convert_nnn(val)
|
||||
for (didx, dval) in ((v - 1, 1000 ** v) for v in range(len(denom))):
|
||||
if dval > val:
|
||||
mod = 1000 ** didx
|
||||
l = val // mod
|
||||
r = val - (l * mod)
|
||||
ret = _convert_nnn(l) + ' ' + denom[didx]
|
||||
if r > 0:
|
||||
ret = ret + ', ' + english_number(r)
|
||||
return ret
|
||||
|
||||
def amount_to_text(number, currency):
|
||||
lacs_number = int(number)
|
||||
units_name = currency
|
||||
if lacs_number > 1:
|
||||
units_name += 's'
|
||||
|
||||
lacs = _1000000_to_text(lacs_number)
|
||||
lacs = lacs_number and '%s %s' % (lacs, units_name) or ''
|
||||
|
||||
units_number = int(number * 10000) % 10000
|
||||
units = _10000_to_text(units_number)
|
||||
units = units_number and '%s %s' % (units, units_name) or ''
|
||||
|
||||
cents_number = int(number * 100) % 100
|
||||
cents_name = (cents_number > 1) and 'cents' or 'cent'
|
||||
cents = _100_to_text(cents_number)
|
||||
cents = cents_number and '%s %s' % (cents.lower(), cents_name) or ''
|
||||
if cents:
|
||||
lacs += ' and %s' % (cents, )
|
||||
return lacs
|
||||
list = str(number).split('.')
|
||||
start_word = english_number(int(list[0]))
|
||||
end_word = english_number(int(list[1]))
|
||||
cents_number = int(list[1])
|
||||
cents_name = (cents_number > 1) and 'Cents' or 'Cent'
|
||||
final_result = start_word +' '+units_name+' and ' + end_word +' '+cents_name
|
||||
return final_result
|
||||
|
||||
|
||||
#-------------------------------------------------------------
|
||||
@@ -118,15 +99,15 @@ def amount_to_text(nbr, lang='en', currency='euro'):
|
||||
1654: thousands six cent cinquante-quatre.
|
||||
"""
|
||||
import netsvc
|
||||
if nbr > 10000000:
|
||||
netsvc.Logger().notifyChannel('translate', netsvc.LOG_WARNING, _("Number too large '%d', can not translate it"))
|
||||
return str(nbr)
|
||||
# if nbr > 10000000:
|
||||
# netsvc.Logger().notifyChannel('translate', netsvc.LOG_WARNING, _("Number too large '%d', can not translate it"))
|
||||
# return str(nbr)
|
||||
|
||||
if not _translate_funcs.has_key(lang):
|
||||
netsvc.Logger().notifyChannel('translate', netsvc.LOG_WARNING, _("no translation function found for lang: '%s'" % (lang,)))
|
||||
#TODO: (default should be en) same as above
|
||||
lang = 'en'
|
||||
return _translate_funcs[lang](nbr, currency)
|
||||
return _translate_funcs[lang](abs(nbr), currency)
|
||||
|
||||
if __name__=='__main__':
|
||||
from sys import argv
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
import re
|
||||
import cStringIO
|
||||
import xml.dom.minidom
|
||||
from lxml import etree
|
||||
import osv
|
||||
import ir
|
||||
import pooler
|
||||
@@ -119,7 +119,6 @@ def _eval_xml(self,node, pool, cr, uid, idref, context=None):
|
||||
idref[id]=self.id_get(cr, False, id)
|
||||
return s % idref
|
||||
txt = '<?xml version="1.0"?>\n'+_process("".join([etree.tostring(i).encode("utf8") for i in node.getchildren()]), idref)
|
||||
|
||||
return txt
|
||||
if t in ('char', 'int', 'float'):
|
||||
d = node.text
|
||||
@@ -281,9 +280,10 @@ form: module.record_id""" % (xml_id,)
|
||||
res['header'] = eval(rec.get('header',''))
|
||||
if rec.get('report_type'):
|
||||
res['report_type'] = rec.get('report_type','')
|
||||
|
||||
res['multi'] = rec.get('multi','') and eval(rec.get('multi',''))
|
||||
xml_id = rec.get('id','').encode('utf8')
|
||||
|
||||
xml_id = rec.get('id','').encode('utf8')
|
||||
|
||||
self._test_xml_id(xml_id)
|
||||
|
||||
if rec.get('groups'):
|
||||
@@ -302,7 +302,6 @@ form: module.record_id""" % (xml_id,)
|
||||
id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.report.xml", self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode)
|
||||
self.idref[xml_id] = int(id)
|
||||
|
||||
|
||||
if not rec.get('menu') or eval(rec.get('menu','')):
|
||||
keyword = str(rec.get('keyword','') or 'client_print_multi')
|
||||
keys = [('action',keyword),('res_model',res['model'])]
|
||||
@@ -380,7 +379,7 @@ form: module.record_id""" % (xml_id,)
|
||||
view_id = False
|
||||
if rec.get('view'):
|
||||
view_id = self.id_get(cr, 'ir.actions.act_window', rec.get('view','').encode('utf-8'))
|
||||
domain = rec.get('domain','').encode('utf-8')
|
||||
domain = rec.get('domain','').encode('utf-8') or '{}'
|
||||
context = rec.get('context','').encode('utf-8') or '{}'
|
||||
res_model = rec.get('res_model','').encode('utf-8')
|
||||
src_model = rec.get('src_model','').encode('utf-8')
|
||||
@@ -675,7 +674,6 @@ form: module.record_id""" % (xml_id,)
|
||||
if rec_context:
|
||||
rec_context = eval(rec_context)
|
||||
self._test_xml_id(rec_id)
|
||||
|
||||
if self.isnoupdate(data_node) and self.mode != 'init':
|
||||
# check if the xml record has an id string
|
||||
if rec_id:
|
||||
@@ -701,7 +699,6 @@ form: module.record_id""" % (xml_id,)
|
||||
else:
|
||||
# otherwise it is skipped
|
||||
return None
|
||||
|
||||
res = {}
|
||||
for field in [i for i in rec.getchildren() if (i.tag == "field")]:
|
||||
#TODO: most of this code is duplicated above (in _eval_xml)...
|
||||
@@ -895,7 +892,6 @@ def convert_xml_export(res):
|
||||
data = etree.SubElement ( page, 'data' )
|
||||
text_node = etree.SubElement ( page, 'text' )
|
||||
text_node.text = 'Some textual content.'
|
||||
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
||||
|
||||
+19
-11
@@ -1,22 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
# 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 General Public License for more details.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -135,12 +134,18 @@ class GettextAlias(object):
|
||||
cr = frame.f_locals.get('cr')
|
||||
try:
|
||||
lang = (frame.f_locals.get('context') or {}).get('lang', False)
|
||||
if not (cr and lang):
|
||||
args = frame.f_locals.get('args',False)
|
||||
if args:
|
||||
lang = args[-1].get('lang',False)
|
||||
if frame.f_globals.get('pooler',False):
|
||||
cr = pooler.get_db(frame.f_globals['pooler'].pool_dic.keys()[0]).cursor()
|
||||
if not (lang and cr):
|
||||
return source
|
||||
except:
|
||||
return source
|
||||
|
||||
cr.execute('select value from ir_translation where lang=%s and type=%s and src=%s', (lang, 'code', source))
|
||||
cr.execute('select value from ir_translation where lang=%s and type in (%s,%s) and src=%s', (lang, 'code','sql_constraint', source))
|
||||
res_trans = cr.fetchone()
|
||||
return res_trans and res_trans[0] or source
|
||||
_ = GettextAlias()
|
||||
@@ -190,6 +195,9 @@ class TinyPoFile(object):
|
||||
if 0 == len(self.lines):
|
||||
raise StopIteration()
|
||||
line = self.lines.pop(0).strip()
|
||||
while line.startswith('#'):
|
||||
if line.startswith('#~ '):
|
||||
break
|
||||
if line.startswith('#:'):
|
||||
if ' ' in line[2:].strip():
|
||||
for lpart in line[2:].strip().split(' '):
|
||||
@@ -620,7 +628,7 @@ def trans_generate(lang, modules, dbname=None):
|
||||
for fname in fnmatch.filter(files, '*.py'):
|
||||
fabsolutepath = join(root, fname)
|
||||
frelativepath = fabsolutepath[len(path):]
|
||||
module = get_module_from_path(frelativepath)
|
||||
module = get_module_from_path(fabsolutepath)
|
||||
is_mod_installed = module in installed_modules
|
||||
if (('all' in modules) or (module in modules)) and is_mod_installed:
|
||||
code_string = tools.file_open(fabsolutepath, subdir='').read()
|
||||
|
||||
Vendored
+11
-9
@@ -6,14 +6,15 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-05-30 08:24+0000\n"
|
||||
"PO-Revision-Date: 2009-06-21 08:20+0200\n"
|
||||
"Last-Translator: Vítězslav Kotrla <vitezslav.kotrla@gmail.com>\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Vitezslav Kotrla <Unknown>\n"
|
||||
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
@@ -25,12 +26,13 @@ msgstr "Vyhrazený systémový účet, pod kterým bude běžet Open ERP server:
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid ""
|
||||
"The Open ERP server must use a dedicated account for its operation so that the "
|
||||
"system's security is not compromised by running it with superuser privileges."
|
||||
"The Open ERP server must use a dedicated account for its operation so that "
|
||||
"the system's security is not compromised by running it with superuser "
|
||||
"privileges."
|
||||
msgstr ""
|
||||
"Pokud by byl Open ERP server spuštěn se superuživatelskými oprávněními, mohlo by dojít "
|
||||
"ke kompromitaci zabezpečení systému. Proto musí Open ERP server pro svoji činnost používat "
|
||||
"vyhrazený neprivilegovaný účet."
|
||||
"Pokud by byl Open ERP server spuštěn se superuživatelskými oprávněními, "
|
||||
"mohlo by dojít ke kompromitaci zabezpečení systému. Proto musí Open ERP "
|
||||
"server pro svoji činnost používat vyhrazený neprivilegovaný účet."
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-2
@@ -8,12 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-06 19:01+0200\n"
|
||||
"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Helge Kreutzmann <Unknown>\n"
|
||||
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-3
@@ -8,13 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-03-30 22:35+0200\n"
|
||||
"Last-Translator: Fernando González de Requena <fgrequena@gmail.com>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Fernando González de Requena <Unknown>\n"
|
||||
"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-4
@@ -7,14 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-07 22:19+0300\n"
|
||||
"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Esko Arajärvi <Unknown>\n"
|
||||
"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 0.3\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-2
@@ -7,12 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-03-26 01:12+0100\n"
|
||||
"Last-Translator: Steve Petruzzello <dlist@bluewin.ch>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Steve Petruzzello <Unknown>\n"
|
||||
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-4
@@ -7,14 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-15 21:32+0200\n"
|
||||
"Last-Translator: marce villarino <mvillarino@users.sourceforge.net>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: mvillarino <mvillarino@users.sourceforge.net>\n"
|
||||
"Language-Team: Galician <proxecto@trasno.ent>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 0.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-3
@@ -7,13 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-03-26 08:52+0100\n"
|
||||
"Last-Translator: Vincenzo Campanella <vinz65@gmail.com>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: vinz65 <vinz65@gmail.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-3
@@ -7,12 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-09 19:20+0900\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
|
||||
"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
@@ -28,8 +30,7 @@ msgid ""
|
||||
"the system's security is not compromised by running it with superuser "
|
||||
"privileges."
|
||||
msgstr ""
|
||||
"Open ERP サーバはその動作について専用のアカウントを使うようになっているため、"
|
||||
"管理者特権で動作していてもシステムのセキュリティは侵害されません。"
|
||||
"Open ERP サーバはその動作について専用のアカウントを使うようになっているため、管理者特権で動作していてもシステムのセキュリティは侵害されません。"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
# Dutch translation for openobject-server
|
||||
# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
|
||||
# This file is distributed under the same license as the openobject-server package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-11-27 13:51+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-28 04:56+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid "Dedicated system account for the Open ERP server:"
|
||||
msgstr "Specifieke gebruikersaccount voor de Open ERP server:"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid ""
|
||||
"The Open ERP server must use a dedicated account for its operation so that "
|
||||
"the system's security is not compromised by running it with superuser "
|
||||
"privileges."
|
||||
msgstr ""
|
||||
"De Open ERP server moet een eigen gebruikersaccount voor zijn verrichting "
|
||||
"gebruiken zodat de server niet kan worden gecompromitteerd door Open ERP met "
|
||||
"speciale-gebruikersrechten."
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid "Please choose that account's username."
|
||||
msgstr "Kies deze gebruikersnaam."
|
||||
Vendored
+4
-3
@@ -7,13 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-03-26 19:12+0000\n"
|
||||
"Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Américo Monteiro <Unknown>\n"
|
||||
"Language-Team: Portuguese <traduz@debianpt.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-5
@@ -8,15 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server 5.0.1-0-2\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-08 21:08+0400\n"
|
||||
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Yuri Kozlov <Unknown>\n"
|
||||
"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
|
||||
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Vendored
+4
-3
@@ -7,13 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-04-07 18:36+0100\n"
|
||||
"Last-Translator: Martin Bagge <brother@bsnet.se>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: brother <martin@bagge.nu>\n"
|
||||
"Language-Team: swedish <debian-l10n-swedish@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: KBabel 1.11.4\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Language: Swedish\n"
|
||||
|
||||
#. Type: string
|
||||
|
||||
Vendored
+5
-5
@@ -7,12 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: openerp-server\n"
|
||||
"Report-Msgid-Bugs-To: openerp-server@packages.debian.org\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2009-03-26 16:48+0800\n"
|
||||
"Last-Translator: Deng Xiyue <manphiz-guest@users.alioth.debian.org>\n"
|
||||
"PO-Revision-Date: 2009-11-26 07:45+0000\n"
|
||||
"Last-Translator: Deng Xiyue <Unknown>\n"
|
||||
"Language-Team: Debian Chinese GB <debian-chinese-gb@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2009-11-27 04:51+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
@@ -27,9 +29,7 @@ msgid ""
|
||||
"The Open ERP server must use a dedicated account for its operation so that "
|
||||
"the system's security is not compromised by running it with superuser "
|
||||
"privileges."
|
||||
msgstr ""
|
||||
"Open ERP 服务器必须使用一个专用的账户来进行操作,这样就不会因为使用超级用户权"
|
||||
"限运行而破坏系统的安全。"
|
||||
msgstr "Open ERP 服务器必须使用一个专用的账户来进行操作,这样就不会因为使用超级用户权限运行而破坏系统的安全。"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
|
||||
Reference in New Issue
Block a user