[MERGE] latest trunk

bzr revid: odo@openerp.com-20110912122217-a3fy0gmxbu18kemr
This commit is contained in:
Olivier Dony 2011-09-12 14:22:17 +02:00
commit b225276cd0
5 changed files with 58 additions and 47 deletions

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-13 17:34+0000\n"
"PO-Revision-Date: 2011-09-09 10:34+0000\n"
"Last-Translator: Jiří Hajda <robie@centrum.cz>\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: 2011-09-01 04:40+0000\n"
"X-Generator: Launchpad (build 13827)\n"
"X-Launchpad-Export-Date: 2011-09-10 05:01+0000\n"
"X-Generator: Launchpad (build 13900)\n"
"X-Poedit-Language: Czech\n"
#. module: base
@ -174,7 +174,7 @@ msgstr "ir.ui.view.custom"
#. module: base
#: model:res.country,name:base.sz
msgid "Swaziland"
msgstr "Švýcarsko"
msgstr "Svazijsko"
#. module: base
#: code:addons/orm.py:1993
@ -885,7 +885,7 @@ msgstr "Znak"
#: model:ir.actions.act_window,name:base.action_publisher_warranty_contract_form
#: model:ir.ui.menu,name:base.menu_publisher_warranty_contract
msgid "Contracts"
msgstr "Kontakty"
msgstr "Smlouvy"
#. module: base
#: selection:base.language.install,lang:0
@ -1876,7 +1876,7 @@ msgstr "Slovinsko"
#. module: base
#: model:res.country,name:base.pk
msgid "Pakistan"
msgstr "Pakistán"
msgstr "Pákistán"
#. module: base
#: code:addons/orm.py:1350
@ -3532,7 +3532,7 @@ msgstr "Pobřeží slonoviny (Cote D'Ivoire)"
#. module: base
#: model:res.country,name:base.kz
msgid "Kazakhstan"
msgstr "Kazakstán"
msgstr "Kazachstán"
#. module: base
#: view:res.lang:0
@ -3896,7 +3896,7 @@ msgstr "Měsíc"
#. module: base
#: model:res.country,name:base.my
msgid "Malaysia"
msgstr "Malaysie"
msgstr "Malajsie"
#. module: base
#: view:base.language.install:0
@ -3971,7 +3971,7 @@ msgstr "Neplatné ID pro záznam procházení, máme %r, očekáván integer."
#: model:ir.actions.act_window,name:base.action_partner_addess_tree
#: view:res.partner:0
msgid "Partner Contacts"
msgstr "Kontakty společníka"
msgstr "Kontakty partnera"
#. module: base
#: field:base.module.update,add:0
@ -4059,7 +4059,7 @@ msgstr "Pravidlo musí mít alespoň jedno aktivní přístupové právo !"
#. module: base
#: model:res.country,name:base.fj
msgid "Fiji"
msgstr "Fiji"
msgstr "Fii"
#. module: base
#: field:ir.model.fields,size:0
@ -4069,7 +4069,7 @@ msgstr "Velikost"
#. module: base
#: model:res.country,name:base.sd
msgid "Sudan"
msgstr "Sudan"
msgstr "Súdán"
#. module: base
#: model:res.country,name:base.fm
@ -4118,7 +4118,7 @@ msgstr "Formát času"
#. module: base
#: view:ir.module.module:0
msgid "Defined Reports"
msgstr "Definoavné výkazy"
msgstr "Definované výkazy"
#. module: base
#: view:ir.actions.report.xml:0
@ -4617,7 +4617,7 @@ msgstr "Přístup k nabídce"
#. module: base
#: model:res.country,name:base.na
msgid "Namibia"
msgstr "Nambie"
msgstr "Namibie"
#. module: base
#: model:res.country,name:base.mn
@ -4800,7 +4800,7 @@ msgstr "Adresy"
#. module: base
#: model:res.country,name:base.mm
msgid "Myanmar"
msgstr "Barma"
msgstr "Myanmar"
#. module: base
#: selection:base.language.install,lang:0
@ -5476,12 +5476,12 @@ msgstr "Globální"
#. module: base
#: model:res.country,name:base.mp
msgid "Northern Mariana Islands"
msgstr "Severní Mariánské ostrovy"
msgstr "Severní Mariany"
#. module: base
#: model:res.country,name:base.sb
msgid "Solomon Islands"
msgstr "Šalamounovy Ostrovy"
msgstr "Šalamounovy ostrovy"
#. module: base
#: code:addons/base/ir/ir_model.py:490
@ -5682,7 +5682,7 @@ msgstr "Jazyk"
#. module: base
#: model:res.country,name:base.gm
msgid "Gambia"
msgstr "Gambia"
msgstr "Gambie"
#. module: base
#: model:ir.actions.act_window,name:base.action_res_company_form
@ -6443,7 +6443,7 @@ msgstr "Mongolština / монгол"
#. module: base
#: model:res.country,name:base.mr
msgid "Mauritania"
msgstr "Mauretánie"
msgstr "Mauritánie"
#. module: base
#: model:ir.model,name:base.model_ir_translation
@ -7649,7 +7649,7 @@ msgstr "Změnit heslo"
#. module: base
#: model:res.country,name:base.nl
msgid "Netherlands"
msgstr "Nizozemí"
msgstr "Nizozemsko"
#. module: base
#: model:ir.ui.menu,name:base.next_id_4
@ -8137,7 +8137,7 @@ msgstr "Asociace"
#. module: base
#: model:res.country,name:base.cl
msgid "Chile"
msgstr "Čile"
msgstr "Chile"
#. module: base
#: model:ir.ui.menu,name:base.menu_address_book
@ -8185,7 +8185,7 @@ msgstr "Popisek pole"
#. module: base
#: model:res.country,name:base.dj
msgid "Djibouti"
msgstr "Djibouti"
msgstr "Džibutsko"
#. module: base
#: field:ir.translation,value:0
@ -8364,7 +8364,7 @@ msgstr "Chyba"
#. module: base
#: model:res.country,name:base.pm
msgid "Saint Pierre and Miquelon"
msgstr "Saint Pierre a Miquelon"
msgstr "Svatý Pierre a Miquelon"
#. module: base
#: help:ir.actions.report.xml,header:0
@ -8540,7 +8540,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.sa
msgid "Saudi Arabia"
msgstr "Saudská Arábie"
msgstr "Saúdská Arábie"
#. module: base
#: help:res.partner,supplier:0
@ -8637,7 +8637,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.sv
msgid "El Salvador"
msgstr "El Salvador"
msgstr "Salvador"
#. module: base
#: field:res.bank,phone:0
@ -8937,7 +8937,7 @@ msgstr "Pracovní postup, který má být spuštěn pro tento model."
#. module: base
#: model:res.country,name:base.jm
msgid "Jamaica"
msgstr "Jamaika"
msgstr "Jamajka"
#. module: base
#: model:ir.actions.act_window,help:base.action_partner_category_form

View File

@ -189,7 +189,7 @@ class ir_translation(osv.osv):
result = super(ir_translation, self).write(cursor, user, ids, vals, context=context)
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['src'])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['res_id'])
return result
def unlink(self, cursor, user, ids, context=None):
@ -199,7 +199,7 @@ class ir_translation(osv.osv):
ids = [ids]
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src'])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
self._get_ids.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['res_id'])
result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
return result

View File

@ -8,7 +8,7 @@
<field name="model">res.request</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Requests" colors="blue:state in ('waiting');gray:state in ('closed')">
<tree string="Requests" colors="blue:state == 'waiting';gray:state == 'closed'">
<field name="create_date"/>
<field name="act_from"/>
<field name="act_to"/>

View File

@ -471,6 +471,8 @@
<rng:optional><rng:attribute name="selection"/></rng:optional>
<rng:optional><rng:attribute name="default_focus"/></rng:optional>
<rng:optional><rng:attribute name="filters"/></rng:optional>
<rng:optional><rng:attribute name="statusbar_visible"/></rng:optional>
<rng:optional><rng:attribute name="statusbar_colors"/></rng:optional>
<rng:zeroOrMore>
<rng:choice>
<rng:ref name="diagram"/>

View File

@ -32,7 +32,9 @@
* size
"""
import base64
import datetime as DT
import re
import string
import sys
import warnings
@ -727,34 +729,41 @@ def get_nice_size(value):
size = len(value)
return tools.human_size(size)
# See http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
# and http://bugs.python.org/issue10066
invalid_xml_low_bytes = re.compile(r'[\x00-\x08\x0b-\x0c\x0e-\x1f]')
def sanitize_binary_value(value):
# binary fields should be 7-bit ASCII base64-encoded data,
# but we do additional sanity checks to make sure the values
# are not something else that won't pass via xmlrpc
# are not something else that won't pass via XML-RPC
if isinstance(value, (xmlrpclib.Binary, tuple, list, dict)):
# these builtin types are meant to pass untouched
return value
# For all other cases, handle the value as a binary string:
# it could be a 7-bit ASCII string (e.g base64 data), but also
# any 8-bit content from files, with byte values that cannot
# be passed inside XML!
# See for more info:
# Handle invalid bytes values that will cause problems
# for XML-RPC. See for more info:
# - http://bugs.python.org/issue10066
# - http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
#
# One solution is to convert the byte-string to unicode,
# so it gets serialized as utf-8 encoded data (always valid XML)
# If invalid XML byte values were present, tools.ustr() uses
# the Latin-1 codec as fallback, which converts any 8-bit
# byte value, resulting in valid utf-8-encoded bytes
# in the end:
# >>> unicode('\xe1','latin1').encode('utf8') == '\xc3\xa1'
# Note: when this happens, decoding on the other endpoint
# is not likely to produce the expected output, but this is
# just a safety mechanism (in these cases base64 data or
# xmlrpc.Binary values should be used instead)
return tools.ustr(value)
# Coercing to unicode would normally allow it to properly pass via
# XML-RPC, transparently encoded as UTF-8 by xmlrpclib.
# (this works for _any_ byte values, thanks to the fallback
# to latin-1 passthrough encoding when decoding to unicode)
value = tools.ustr(value)
# Due to Python bug #10066 this could still yield invalid XML
# bytes, specifically in the low byte range, that will crash
# the decoding side: [\x00-\x08\x0b-\x0c\x0e-\x1f]
# So check for low bytes values, and if any, perform
# base64 encoding - not very smart or useful, but this is
# our last resort to avoid crashing the request.
if invalid_xml_low_bytes.search(value):
# b64-encode after restoring the pure bytes with latin-1
# passthrough encoding
value = base64.b64encode(value.encode('latin-1'))
return value
# ---------------------------------------------------------