diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml
index 6873f875b69..4f61dd1ddfc 100644
--- a/bin/addons/base/base_data.xml
+++ b/bin/addons/base/base_data.xml
@@ -1285,6 +1285,18 @@
+
+ UAH
+ UAH
+ 0.01
+ 4
+
+
+
+ 10.8266
+
+
+
diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml
index a033724b3d3..2f20199a4d8 100644
--- a/bin/addons/base/base_update.xml
+++ b/bin/addons/base/base_update.xml
@@ -121,7 +121,7 @@
-
+
diff --git a/bin/addons/base/i18n/hr.po b/bin/addons/base/i18n/hr.po
index 456d9c01496..c22c24df042 100644
--- a/bin/addons/base/i18n/hr.po
+++ b/bin/addons/base/i18n/hr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-02-25 06:18+0000\n"
+"PO-Revision-Date: 2010-03-01 06:21+0000\n"
"Last-Translator: goranc \n"
"Language-Team: openerp-translators\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
+"X-Launchpad-Export-Date: 2010-03-02 04:41+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: hr\n"
diff --git a/bin/addons/base/i18n/ja.po b/bin/addons/base/i18n/ja.po
index 98297b49132..caafbdf2a71 100644
--- a/bin/addons/base/i18n/ja.po
+++ b/bin/addons/base/i18n/ja.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-02-25 06:23+0000\n"
+"PO-Revision-Date: 2010-03-01 06:18+0000\n"
"Last-Translator: OpenERP Administrators \n"
"Language-Team: Japanese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
+"X-Launchpad-Export-Date: 2010-03-02 04:41+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml
index 73fa7fc1953..3eb53ff2aa7 100644
--- a/bin/addons/base/res/partner/partner_view.xml
+++ b/bin/addons/base/res/partner/partner_view.xml
@@ -94,30 +94,30 @@
@@ -158,15 +158,15 @@
-
+
-
-
+
+
-
+
@@ -238,8 +238,8 @@
-
-
+
+
@@ -256,11 +256,11 @@
-
+
-
+
@@ -268,27 +268,27 @@
@@ -301,14 +301,14 @@
-
+
-
-
+
+
-
+
@@ -457,7 +457,7 @@
form
@@ -539,7 +539,7 @@
-
+
diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py
index eb4ca575391..ff61b9ec6fa 100644
--- a/bin/addons/base/res/res_user.py
+++ b/bin/addons/base/res/res_user.py
@@ -188,7 +188,7 @@ class users(osv.osv):
'rules_id': fields.many2many('ir.rule.group', 'user_rule_group_rel', 'user_id', 'rule_group_id', 'Rules'),
'company_id': fields.many2one('res.company', 'Company', required=True,
help="The company this user is currently working for."),
- 'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Accepted Companies'),
+ 'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Companies'),
'context_lang': fields.selection(_lang_get, 'Language', required=True,
help="Sets the language for the user's user interface, when UI "
"translations are available"),
diff --git a/bin/osv/orm.py b/bin/osv/orm.py
index 188fdcbb852..47e1ae5a5cb 100644
--- a/bin/osv/orm.py
+++ b/bin/osv/orm.py
@@ -1849,7 +1849,7 @@ class orm(orm_template):
self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context)
if not fields:
fields = self._columns.keys()
-
+
(where_clause, where_params, tables) = self._where_calc(cr, uid, domain, context=context)
dom = self.pool.get('ir.rule').domain_get(cr, uid, self._name, context=context)
where_clause = where_clause + dom[0]
@@ -1857,10 +1857,10 @@ class orm(orm_template):
for t in dom[2]:
if t not in tables:
tables.append(t)
-
+
# Take care of adding join(s) if groupby is an '_inherits'ed field
- tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause)
-
+ tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause)
+
if len(where_clause):
where_clause = ' where '+string.join(where_clause, ' and ')
else:
@@ -1889,7 +1889,7 @@ class orm(orm_template):
flist += ',avg('+f+') as '+f
else:
flist += ',sum('+f+') as '+f
-
+
cr.execute('select min(%s.id) as id,' % self._table + flist + ' from ' + ','.join(tables) + where_clause + ' group by '+ groupby + limit_str + offset_str, where_params)
alldata = {}
groupby = group_by
@@ -1914,7 +1914,7 @@ class orm(orm_template):
d['__domain'] = [(groupby,'>=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01','%Y-%m-%d').strftime('%Y-%m-%d') or False),\
(groupby,'<=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days),'%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain
elif fget[groupby]['type'] == 'many2one':
- d[groupby] = d[groupby] and d[groupby][1] or ''
+ d[groupby] = d[groupby] and ((type(d[groupby])==type(1)) and d[groupby] or d[groupby][1]) or ''
del alldata[d['id']][groupby]
d.update(alldata[d['id']])
@@ -1922,10 +1922,10 @@ class orm(orm_template):
return data
def _inherits_join_calc(self, field, tables, where_clause):
- """ Adds missing table select and join clause(s) for reaching
+ """ Adds missing table select and join clause(s) for reaching
the field coming from an '_inherits' parent table.
@param tables: list of table._table names enclosed in double quotes as returned
- by _where_calc()
+ by _where_calc()
"""
current_table = self
while field in current_table._inherit_fields and not field in current_table._columns:
diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py
index 3a7dc4035ca..80912e47acb 100644
--- a/bin/report/render/rml2pdf/utils.py
+++ b/bin/report/render/rml2pdf/utils.py
@@ -40,18 +40,16 @@ import re
import reportlab
from lxml import etree
import copy
-import tools
import locale
-import netsvc
import traceback, sys
_regex = re.compile('\[\[(.+?)\]\]')
def str2xml(s):
- return s.replace('&', '&').replace('<', '<').replace('>', '>')
+ return (s or '').replace('&', '&').replace('<', '<').replace('>', '>')
def xml2str(s):
- return s.replace('&','&').replace('<','<').replace('>','>')
+ return (s or '').replace('&','&').replace('<','<').replace('>','>')
def _child_get(node, self=None, tagname=None):
for n in node:
@@ -106,25 +104,24 @@ def _process_text(self, txt):
sps = _regex.split(txt)
while sps:
# This is a simple text to translate
- result += tools.ustr(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
+ result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
if sps:
try:
expr = sps.pop(0)
txt = eval(expr,self.localcontext)
if txt and (isinstance(txt, unicode) or isinstance(txt, str)):
- txt = tools.ustr(self.localcontext.get('translate', lambda x:x)(txt))
+ txt = unicode(self.localcontext.get('translate', lambda x:x)(txt))
except Exception,e:
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
- netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,'report :\n%s\n%s\nexpr: %s' % (tb_s, str(e),expr.encode('utf-8')))
if type(txt)==type('') or type(txt)==type(u''):
txt2 = str2xml(txt)
- result += tools.ustr(txt2)
+ result += unicode(txt2)
elif (txt is not None) and (txt is not False):
- result += tools.ustr(txt)
+ result += unicode(txt)
return result
def text_get(node):
- return ''.join([tools.ustr(n.text) for n in node])
+ return ''.join([unicode(n.text) for n in node])
units = [
(re.compile('^(-?[0-9\.]+)\s*in$'), reportlab.lib.units.inch),
diff --git a/bin/service/web_services.py b/bin/service/web_services.py
index f3325114bc2..4dfdeec1237 100644
--- a/bin/service/web_services.py
+++ b/bin/service/web_services.py
@@ -383,7 +383,8 @@ class common(_ObjectService):
auth.logout(params[1])
logger.notifyChannel("web-service", netsvc.LOG_INFO,'Logout %s from database %s'%(login,db))
return True
- elif method in ['about', 'timezone_get', 'get_server_environment', 'login_message', 'get_stats' ]:
+ elif method in ['about', 'timezone_get', 'get_server_environment',
+ 'login_message','get_stats', 'check_connectivity']:
pass
elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel']:
passwd = params[0]
@@ -564,7 +565,8 @@ GNU Public Licence.
res = "OpenERP server: %d threads\n" % threading.active_count()
res += netsvc.Server.allStats()
return res
- def check_connectivity(self):
+
+ def exp_check_connectivity(self):
return bool(sql_db.db_connect('template1'))
common()
diff --git a/bin/tools/convert.py b/bin/tools/convert.py
index 4314651d084..cc5b5bdc5df 100644
--- a/bin/tools/convert.py
+++ b/bin/tools/convert.py
@@ -18,6 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
+
import cStringIO
import csv
import logging
@@ -62,7 +63,6 @@ def _eval_xml(self,node, pool, cr, uid, idref, context=None):
f_search = node.get("search",'').encode('utf-8')
f_use = node.get("use",'id').encode('ascii')
f_name = node.get("name",'').encode('utf-8')
-
q = eval(f_search, idref)
ids = pool.get(f_model).search(cr, uid, q)
if f_use != 'id':
@@ -190,7 +190,6 @@ class assertion_report(object):
return res
class xml_import(object):
-
@staticmethod
def nodeattr2bool(node, attr, default=False):
if not node.get(attr):
@@ -866,19 +865,3 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa
obj.parse(doc.getroot())
return True
-def convert_xml_export(res):
- uid=1
- pool=pooler.get_pool(cr.dbname)
- cr=pooler.db.cursor()
- idref = {}
- page = etree.Element ( 'terp' )
- doc = etree.ElementTree ( page )
- data = etree.SubElement ( page, 'data' )
- text_node = etree.SubElement ( page, 'text' )
- text_node.text = 'Some textual content.'
- cr.commit()
- cr.close()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-