diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml
index c8ad4c2b636..6873f875b69 100644
--- a/bin/addons/base/base_data.xml
+++ b/bin/addons/base/base_data.xml
@@ -1271,6 +1271,20 @@
+
+
+ AUD
+ AUD
+ 0.01
+ 4
+
+
+
+ 1.5266
+
+
+
+
diff --git a/bin/addons/base/i18n/hr.po b/bin/addons/base/i18n/hr.po
index 4be565e330e..456d9c01496 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-22 05:40+0000\n"
+"PO-Revision-Date: 2010-02-25 06:18+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-23 05:05+0000\n"
+"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: hr\n"
@@ -1458,7 +1458,7 @@ msgstr "Madagaskar"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
-"aziv objekta mora početi s x_ i ne smije sadržavati posebne znakove !"
+"Naziv objekta mora početi s x_ i ne smije sadržavati posebne znakove !"
#. module: base
#: help:ir.rule.group,global:0
diff --git a/bin/addons/base/i18n/ja.po b/bin/addons/base/i18n/ja.po
index 9edb5c9979d..98297b49132 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-22 05:38+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-02-25 06:23+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-23 05:04+0000\n"
+"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -25,7 +25,7 @@ msgstr "セント・ヘレナ"
#. module: base
#: wizard_view:res.partner.sms_send,init:0
msgid "SMS - Gateway: clickatell"
-msgstr ""
+msgstr "SMS - ゲートウェイ:clickatell"
#. module: base
#: view:res.lang:0
diff --git a/bin/addons/base/i18n/zh_TW.po b/bin/addons/base/i18n/zh_TW.po
index 467fb6f2462..bdc50bf6a90 100644
--- a/bin/addons/base/i18n/zh_TW.po
+++ b/bin/addons/base/i18n/zh_TW.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-02-15 05:47+0000\n"
-"Last-Translator: Walter Cheuk \n"
+"PO-Revision-Date: 2010-02-24 06:09+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \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-17 04:54+0000\n"
+"X-Launchpad-Export-Date: 2010-02-25 04:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -40,7 +40,7 @@ msgstr ""
#: field:ir.ui.view,arch:0
#: field:ir.ui.view.custom,arch:0
msgid "View Architecture"
-msgstr "视图结构"
+msgstr "視圖結構"
#. module: base
#: code:addons/base/ir/ir_model.py:0
@@ -58,7 +58,7 @@ msgstr ""
#: field:workflow.activity,wkf_id:0
#: field:workflow.instance,wkf_id:0
msgid "Workflow"
-msgstr "工作流"
+msgstr "工作流程"
#. module: base
#: view:wizard.module.lang.export:0
@@ -7784,7 +7784,7 @@ msgstr ""
#. module: base
#: field:ir.actions.server,mobile:0
msgid "Mobile No"
-msgstr ""
+msgstr "手機號碼"
#. module: base
#: model:ir.actions.act_window,name:base.action_partner_by_category
@@ -7886,12 +7886,12 @@ msgstr ""
#: code:addons/base/res/partner/partner.py:0
#, python-format
msgid "Partners: "
-msgstr ""
+msgstr "合作伙伴 "
#. module: base
#: model:res.country,name:base.kp
msgid "North Korea"
-msgstr ""
+msgstr "北韓(North Korea)"
#. module: base
#: view:ir.report.custom:0
@@ -7921,7 +7921,7 @@ msgstr ""
#. module: base
#: field:ir.exports,name:0
msgid "Export Name"
-msgstr ""
+msgstr "匯出名稱"
#. module: base
#: help:res.partner.address,type:0
diff --git a/bin/addons/base/security/base_security.xml b/bin/addons/base/security/base_security.xml
index 6fe5731713c..c6a362edbe3 100644
--- a/bin/addons/base/security/base_security.xml
+++ b/bin/addons/base/security/base_security.xml
@@ -18,7 +18,7 @@
- Useability / Multi Company
+ Multi Companies
@@ -29,10 +29,6 @@
Useability / No One
-
- Multi Companies
-
-
diff --git a/bin/osv/orm.py b/bin/osv/orm.py
index 38d6dd0c473..188fdcbb852 100644
--- a/bin/osv/orm.py
+++ b/bin/osv/orm.py
@@ -1849,18 +1849,22 @@ 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()
-
- (qu1, qu2, tables) = self._where_calc(cr, uid, domain, context=context)
+
+ (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)
- qu1 = qu1 + dom[0]
- qu2 = qu2 + dom[1]
+ where_clause = where_clause + dom[0]
+ where_params = where_params + dom[1]
for t in dom[2]:
if t not in tables:
tables.append(t)
- if len(qu1):
- qu1 = ' where '+string.join(qu1, ' and ')
+
+ # Take care of adding join(s) if groupby is an '_inherits'ed field
+ tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause)
+
+ if len(where_clause):
+ where_clause = ' where '+string.join(where_clause, ' and ')
else:
- qu1 = ''
+ where_clause = ''
limit_str = limit and ' limit %d' % limit or ''
offset_str = offset and ' offset %d' % offset or ''
@@ -1885,7 +1889,8 @@ class orm(orm_template):
flist += ',avg('+f+') as '+f
else:
flist += ',sum('+f+') as '+f
- cr.execute('select min(id) as id,'+flist+' from ' + self._table +qu1+' group by '+ groupby + limit_str + offset_str,qu2)
+
+ 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
for r in cr.dictfetchall():
@@ -1916,6 +1921,22 @@ class orm(orm_template):
del d['id']
return data
+ def _inherits_join_calc(self, field, tables, where_clause):
+ """ 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()
+ """
+ current_table = self
+ while field in current_table._inherit_fields and not field in current_table._columns:
+ parent_table = self.pool.get(current_table._inherit_fields[field][0])
+ parent_table_name = parent_table._table
+ if '"%s"'%parent_table_name not in tables:
+ tables.append('"%s"'%parent_table_name)
+ where_clause.append('(%s.%s = %s.id)' % (current_table._table, current_table._inherits[parent_table._name], parent_table_name))
+ current_table = parent_table
+ return (tables, where_clause)
+
def _parent_store_compute(self, cr):
logger = netsvc.Logger()
logger.notifyChannel('orm', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, ))
diff --git a/bin/tools/misc.py b/bin/tools/misc.py
index cb4f58004fd..387b7c2d2a2 100644
--- a/bin/tools/misc.py
+++ b/bin/tools/misc.py
@@ -327,23 +327,23 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
## (c) Fry-IT, www.fry-it.com, 2007
##
## download here: http://www.peterbe.com/plog/html2plaintext
-
-
+
+
""" from an HTML text, convert the HTML to plain text.
- If @body_id is provided then this is the tag where the
+ If @body_id is provided then this is the tag where the
body (not necessarily ) starts.
"""
try:
from BeautifulSoup import BeautifulSoup, SoupStrainer, Comment
except:
return html
-
+
urls = []
if body_id is not None:
strainer = SoupStrainer(id=body_id)
else:
strainer = SoupStrainer('body')
-
+
soup = BeautifulSoup(html, parseOnlyThese=strainer, fromEncoding=encoding)
for link in soup.findAll('a'):
title = link.renderContents()
@@ -351,7 +351,7 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
urls.append(dict(url=url, tag=str(link), title=title))
html = soup.__str__()
-
+
url_index = []
i = 0
for d in urls:
@@ -368,11 +368,11 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
html = html.replace('','**').replace('
','**')
html = html.replace('','**').replace('
','**')
html = html.replace('','/').replace('','/')
-
- # the only line breaks we respect is those of ending tags and
+
+ # the only line breaks we respect is those of ending tags and
# breaks
-
+
html = html.replace('\n',' ')
html = html.replace('
', '\n')
html = html.replace('', '\n')
@@ -381,7 +381,7 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
html = html.replace(' ' * 2, ' ')
- # for all other tags we failed to clean up, just remove then and
+ # for all other tags we failed to clean up, just remove then and
# complain about them on the stderr
def desperate_fixer(g):
#print >>sys.stderr, "failed to clean up %s" % str(g.group())
@@ -501,8 +501,8 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
return True
except Exception,e:
netsvc.Logger().notifyChannel('email_send (maildir)', netsvc.LOG_ERROR, e)
- return False
-
+ return False
+
try:
oldstderr = smtplib.stderr
s = smtplib.SMTP()
@@ -511,7 +511,7 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
if debug:
smtplib.stderr = WriteToLogger()
- s.set_debuglevel(int(bool(debug))) # 0 or 1
+ s.set_debuglevel(int(bool(debug))) # 0 or 1
s.connect(smtp_server, config['smtp_port'])
if ssl:
s.ehlo()
@@ -519,7 +519,7 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
s.ehlo()
if config['smtp_user'] or config['smtp_password']:
- s.login(config['smtp_user'], config['smtp_password'])
+ s.login(config['smtp_user'], config['smtp_password'])
s.sendmail(email_from,
flatten([email_to, email_cc, email_bcc]),
msg.as_string()
@@ -754,10 +754,10 @@ class cache(object):
else:
kwargs2 = self._unify_args(*args, **kwargs)
keys_to_del = [key for key, _ in self._generate_keys(dbname, kwargs2) if key in self.cache.keys()]
-
+
for key in keys_to_del:
self.cache.pop(key)
-
+
@classmethod
def clean_caches_for_db(cls, dbname):
for c in cls.__caches:
@@ -906,6 +906,7 @@ def get_iso_codes(lang):
def get_languages():
languages={
+ 'ab_RU': u'Abkhazian (RU)',
'ar_AR': u'Arabic / الْعَرَبيّة',
'bg_BG': u'Bulgarian / български',
'bs_BS': u'Bosnian / bosanski jezik',
@@ -920,29 +921,48 @@ def get_languages():
'es_AR': u'Spanish (AR) / Español (AR)',
'es_ES': u'Spanish / Español',
'et_EE': u'Estonian / Eesti keel',
+ 'fa_IR': u'Persian / Iran, Islamic Republic of',
'fi_FI': u'Finland / Suomi',
'fr_BE': u'French (BE) / Français (BE)',
'fr_CH': u'French (CH) / Français (CH)',
'fr_FR': u'French / Français',
+ 'gl_ES': u'Galician / Spain',
+ 'gu_IN': u'Gujarati / India',
+ 'hi_IN': u'Hindi / India',
'hr_HR': u'Croatian / hrvatski jezik',
'hu_HU': u'Hungarian / Magyar',
'id_ID': u'Indonesian / Bahasa Indonesia',
'it_IT': u'Italian / Italiano',
+ 'iu_CA': u'Inuktitut / Canada',
+ 'ja_JP': u'Japanese / Japan',
+ 'ko_KP': u'Korean / Korea, Democratic Peoples Republic of',
+ 'ko_KR': u'Korean / Korea, Republic of',
'lt_LT': u'Lithuanian / Lietuvių kalba',
+ 'lv_LV': u'Latvian / Latvia',
+ 'ml_IN': u'Malayalam / India',
+ 'mn_MN': u'Mongolian / Mongolia',
+ 'nb_NO': u'Norwegian Bokmål / Norway',
'nl_NL': u'Dutch / Nederlands',
'nl_BE': u'Dutch (Belgium) / Nederlands (Belgïe)',
+ 'oc_FR': u'Occitan (post 1500) / France',
'pl_PL': u'Polish / Język polski',
'pt_BR': u'Portugese (BR) / português (BR)',
'pt_PT': u'Portugese / português',
'ro_RO': u'Romanian / limba română',
'ru_RU': u'Russian / русский язык',
+ 'si_LK': u'Sinhalese / Sri Lanka',
+ 'sk_SK': u'Slovak / Slovakia',
'sl_SL': u'Slovenian / slovenščina',
'sq_AL': u'Albanian / Shqipëri',
+ 'sr_RS': u'Serbian / Serbia',
'sv_SE': u'Swedish / svenska',
+ 'te_IN': u'Telugu / India',
'tr_TR': u'Turkish / Türkçe',
'vi_VN': u'Vietnam / Cộng hòa xã hội chủ nghĩa Việt Nam',
'uk_UA': u'Ukrainian / украї́нська мо́ва',
+ 'ur_PK': u'Urdu / Pakistan',
'zh_CN': u'Chinese (CN) / 简体中文',
+ 'zh_HK': u'Chinese (HK)',
'zh_TW': u'Chinese (TW) / 正體字',
'th_TH': u'Thai / ภาษาไทย',
'tlh_TLH': u'Klingon',
@@ -1181,9 +1201,9 @@ def detect_ip_addr():
# RATIONALE BEHIND TIMESTAMP CALCULATIONS AND TIMEZONE MANAGEMENT:
# The server side never does any timestamp calculation, always
# sends them in a naive (timezone agnostic) format supposed to be
-# expressed within the server timezone, and expects the clients to
+# expressed within the server timezone, and expects the clients to
# provide timestamps in the server timezone as well.
-# It stores all timestamps in the database in naive format as well,
+# It stores all timestamps in the database in naive format as well,
# which also expresses the time in the server timezone.
# For this reason the server makes its timezone name available via the
# common/timezone_get() rpc method, which clients need to read