[Merge]with trunk

bzr revid: mba@tinyerp.com-20140408123619-j3qv10fsnrxqn6a9
bzr revid: mba@tinyerp.com-20140411045426-dngn51p0qw4nduig
This commit is contained in:
Barad Mahendra 2014-04-11 10:24:26 +05:30
commit 850b4f198a
362 changed files with 1089 additions and 992 deletions

View File

@ -151,8 +151,15 @@ def ensure_db(redirect='/web/database/selector'):
# may depend on data injected by the database route dispatcher.
# Thus, we redirect the user to the same page but with the session cookie set.
# This will force using the database route dispatcher...
r = request.httprequest
url_redirect = r.base_url
if r.query_string:
# Can't use werkzeug.wrappers.BaseRequest.url with encoded hashes:
# https://github.com/amigrave/werkzeug/commit/b4a62433f2f7678c234cdcac6247a869f90a7eb7
url_redirect += '?' + r.query_string
response = werkzeug.utils.redirect(url_redirect, 302)
request.session.db = db
abort_and_redirect(request.httprequest.url)
abort_and_redirect(url_redirect)
# if db not provided, use the session one
if not db:
@ -649,6 +656,9 @@ class Home(http.Controller):
ensure_db()
if request.session.uid:
if kw.get('redirect'):
return werkzeug.utils.redirect(kw.get('redirect'), 303)
headers = {
'Cache-Control': 'no-cache',
'Content-Type': 'text/html; charset=utf-8',
@ -661,6 +671,9 @@ class Home(http.Controller):
def web_login(self, redirect=None, **kw):
ensure_db()
if request.httprequest.method == 'GET' and redirect and request.session.uid:
return http.redirect_with_hash(redirect)
if not request.uid:
request.uid = openerp.SUPERUSER_ID
@ -1202,11 +1215,14 @@ class DataSet(http.Controller):
def _call_kw(self, model, method, args, kwargs):
# Temporary implements future display_name special field for model#read()
if method == 'read' and kwargs.get('context', {}).get('future_display_name'):
if method in ('read', 'search_read') and kwargs.get('context', {}).get('future_display_name'):
if 'display_name' in args[1]:
names = dict(request.session.model(model).name_get(args[0], **kwargs))
if method == 'read':
names = dict(request.session.model(model).name_get(args[0], **kwargs))
else:
names = dict(request.session.model(model).name_search('', args[0], **kwargs))
args[1].remove('display_name')
records = request.session.model(model).read(*args, **kwargs)
records = getattr(request.session.model(model), method)(*args, **kwargs)
for record in records:
record['display_name'] = \
names.get(record['id']) or "%s#%d" % (model, (record['id']))

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
"X-Poedit-Language: Czech\n"
#. module: web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
"Language: es\n"
#. module: web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -8,35 +8,35 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-06-13 13:18+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2014-04-09 07:11+0000\n"
"Last-Translator: Paramjit Singh Sahota(OpenERP) <Unknown>\n"
"Language-Team: Hindi <hi@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: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-10 05:56+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web
#: code:addons/web/static/src/xml/base.xml:147
#, python-format
msgid "Default language:"
msgstr ""
msgstr "डिफ़ॉल्ट भाषाः"
#. module: web
#. openerp-web
#: code:addons/web/static/src/js/coresetup.js:592
#, python-format
msgid "%d minutes ago"
msgstr ""
msgstr "%d मिनट पहले"
#. module: web
#. openerp-web
#: code:addons/web/static/src/js/coresetup.js:620
#, python-format
msgid "Still loading...<br />Please be patient."
msgstr ""
msgstr "अब भी है लोड हो रहा है ... <br /> कृपया धैर्य रखें."
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:07+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:06+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:38+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:39+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:08+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web
#. openerp-web

View File

@ -1284,12 +1284,14 @@
width: 100%;
}
.openerp .oe_view_manager .oe_view_manager_body {
display: table-row;
height: inherit;
}
.openerp .oe_view_manager .oe_view_manager_view_kanban:not(:empty) {
height: inherit;
}
.openerp .oe_view_manager[data-view-type=kanban] .oe_view_manager_body {
display: table-row;
}
.openerp .oe_view_manager table.oe_view_manager_header {
border-collapse: separate;
width: 100%;

View File

@ -1068,10 +1068,12 @@ $sheet-padding: 16px
height: inherit
width: 100%
.oe_view_manager_body
display: table-row
height: inherit
.oe_view_manager_view_kanban:not(:empty)
height: inherit
&[data-view-type=kanban]
.oe_view_manager_body
display: table-row
table.oe_view_manager_header
border-collapse: separate

View File

@ -105,9 +105,6 @@ instance.web.Dialog = instance.web.Widget.extend({
autoOpen: false,
position: [false, 40],
buttons: null,
beforeClose: function () {
self.trigger("closing");
},
resizeStop: function() {
self.trigger("resized");
},
@ -208,8 +205,9 @@ instance.web.Dialog = instance.web.Widget.extend({
/**
Closes the popup, if destroy_on_close was passed to the constructor, it is also destroyed.
*/
close: function() {
close: function(reason) {
if (this.dialog_inited && this.$el.is(":data(dialog)")) {
this.trigger("closing", reason);
this.$el.dialog('close');
}
},
@ -225,14 +223,14 @@ instance.web.Dialog = instance.web.Widget.extend({
/**
Destroys the popup, also closes it.
*/
destroy: function () {
destroy: function (reason) {
this.$buttons.remove();
_.each(this.getChildren(), function(el) {
el.destroy();
});
if (! this.__tmp_dialog_closing) {
this.__tmp_dialog_destroying = true;
this.close();
this.close(reason);
this.__tmp_dialog_destroying = undefined;
}
if (this.dialog_inited && !this.isDestroyed() && this.$el.is(":data(dialog)")) {
@ -256,7 +254,7 @@ instance.web.CrashManager = instance.web.Class.extend({
new (handler)(this, error).display();
return;
}
if (error.data.name === "openerp.http.SessionExpiredException") {
if (error.data.name === "openerp.http.SessionExpiredException" || error.data.name === "werkzeug.exceptions.Forbidden") {
this.show_warning({type: "Session Expired", data: { message: _t("Your OpenERP session expired. Please refresh the current web page.") }});
return;
}
@ -1264,9 +1262,9 @@ instance.web.WebClient = instance.web.Client.extend({
};
self.action_manager.do_action(result);
var form = self.action_manager.dialog_widget.views.form.controller;
form.on("on_button_cancel", self.action_manager.dialog, self.action_manager.dialog.close);
form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop);
form.on('record_saved', self, function() {
self.action_manager.dialog.close();
self.action_manager.dialog_stop();
self.update_logo();
});
});

View File

@ -271,7 +271,12 @@ instance.web.Session.include( /** @lends instance.web.Session# */{
for(var i=0; i<cookies.length; ++i) {
var cookie = cookies[i].replace(/^\s*/, '');
if(cookie.indexOf(nameEQ) === 0) {
return JSON.parse(decodeURIComponent(cookie.substring(nameEQ.length)));
try {
return JSON.parse(decodeURIComponent(cookie.substring(nameEQ.length)));
} catch(err) {
// wrong cookie, delete it
this.set_cookie(name, '', -1);
}
}
}
return null;

View File

@ -27,6 +27,7 @@ instance.web.Query = instance.web.Class.extend({
this._fields = fields;
this._filter = [];
this._context = {};
this._lazy = true;
this._limit = false;
this._offset = 0;
this._order_by = [];
@ -36,6 +37,7 @@ instance.web.Query = instance.web.Class.extend({
var q = new instance.web.Query(this._model, this._fields);
q._context = this._context;
q._filter = this._filter;
q._lazy = this._lazy;
q._limit = this._limit;
q._offset = this._offset;
q._order_by = this._order_by;
@ -51,6 +53,7 @@ instance.web.Query = instance.web.Class.extend({
q._context = new instance.web.CompoundContext(
q._context, to_set.context);
break;
case 'lazy':
case 'limit':
case 'offset':
case 'order_by':
@ -140,6 +143,7 @@ instance.web.Query = instance.web.Class.extend({
domain: this._model.domain(this._filter),
context: ctx,
offset: this._offset,
lazy: this._lazy,
limit: this._limit,
orderby: instance.web.serialize_sort(this._order_by) || false
}).then(function (results) {
@ -148,8 +152,9 @@ instance.web.Query = instance.web.Class.extend({
result.__context = result.__context || {};
result.__context.group_by = result.__context.group_by || [];
_.defaults(result.__context, ctx);
var grouping_fields = self._lazy ? [grouping[0]] : grouping;
return new instance.web.QueryGroup(
self._model.name, grouping[0], result);
self._model.name, grouping_fields, result);
});
});
},
@ -175,6 +180,18 @@ instance.web.Query = instance.web.Class.extend({
if (!domain) { return this; }
return this.clone({filter: domain});
},
/**
* Creates a new query with the provided parameter lazy replacing the current
* query's own.
*
* @param {Boolean} lazy indicates if the read_group should return only the
* first level of groupby records, or should return the records grouped by
* all levels at once (so, it makes only 1 db request).
* @returns {openerp.web.Query}
*/
lazy: function (lazy) {
return this.clone({lazy: lazy});
},
/**
* Creates a new query with the provided limit replacing the current
* query's own limit
@ -213,7 +230,7 @@ instance.web.Query = instance.web.Class.extend({
});
instance.web.QueryGroup = instance.web.Class.extend({
init: function (model, grouping_field, read_group_group) {
init: function (model, grouping_fields, read_group_group) {
// In cases where group_by_no_leaf and no group_by, the result of
// read_group has aggregate fields but no __context or __domain.
// Create default (empty) values for those so that things don't break
@ -221,12 +238,12 @@ instance.web.QueryGroup = instance.web.Class.extend({
{__context: {group_by: []}, __domain: []},
read_group_group);
var raw_field = grouping_field && grouping_field.split(':')[0];
var count_key = (grouping_fields[0] && grouping_fields[0].split(':')[0]) + '_count';
var aggregates = {};
_(fixed_group).each(function (value, key) {
if (key.indexOf('__') === 0
|| key === raw_field
|| key === raw_field + '_count') {
|| _.contains(grouping_fields, key)
|| (key === count_key)) {
return;
}
aggregates[key] = value || 0;
@ -235,15 +252,21 @@ instance.web.QueryGroup = instance.web.Class.extend({
this.model = new instance.web.Model(
model, fixed_group.__context, fixed_group.__domain);
var group_size = fixed_group[raw_field + '_count'] || fixed_group.__count || 0;
var group_size = fixed_group[count_key] || fixed_group.__count || 0;
var leaf_group = fixed_group.__context.group_by.length === 0;
var value = (grouping_fields.length === 1)
? fixed_group[grouping_fields[0]]
: _.map(grouping_fields, function (field) { return fixed_group[field]; });
var grouped_on = (grouping_fields.length === 1)
? grouping_fields[0]
: grouping_fields;
this.attributes = {
folded: !!(fixed_group.__fold),
grouped_on: grouping_field,
grouped_on: grouped_on,
// if terminal group (or no group) and group_by_no_leaf => use group.__count
length: group_size,
value: fixed_group[raw_field],
value: value,
// A group is open-able if it's not a leaf in group_by_no_leaf mode
has_children: !(leaf_group && fixed_group.__context['group_by_no_leaf']),
@ -457,9 +480,17 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin,
return $.Deferred().resolve([]);
options = options || {};
return this._model.call('read',
[ids, fields || false],
{context: this.get_context(options.context)})
var method = 'read';
var ids_arg = ids;
var context = this.get_context(options.context);
if (options.check_access_rule === true){
method = 'search_read';
ids_arg = [['id', 'in', ids]];
context = new instance.web.CompoundContext(context, {active_test: false});
}
return this._model.call(method,
[ids_arg, fields || false],
{context: context})
.then(function (records) {
if (records.length <= 1) { return records; }
var indexes = {};

View File

@ -1560,9 +1560,6 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
this.model = new instance.web.Model(this.attrs.relation);
},
complete: function (needle) {
if (this.attrs.operator || this.attrs.filter_domain) {
return this._super(needle);
}
var self = this;
// FIXME: "concurrent" searches (multiple requests, mis-ordered responses)
var context = instance.web.pyeval.eval(

View File

@ -967,9 +967,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
context: {
'bin_size': true,
'future_display_name': true
}
},
check_access_rule: true
}).then(function(r) {
self.trigger('load_record', r);
}).fail(function (){
self.do_action('history_back');
});
}
});
@ -1990,8 +1993,10 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
var context = this.build_context();
return this.view.do_execute_action(
_.extend({}, this.node.attrs, {context: context}),
this.view.dataset, this.view.datarecord.id, function () {
self.view.recursive_reload();
this.view.dataset, this.view.datarecord.id, function (reason) {
if (!_.isObject(reason)) {
self.view.recursive_reload();
}
});
},
check_disable: function() {
@ -2264,7 +2269,7 @@ instance.web.form.ReinitializeFieldMixin = _.extend({}, instance.web.form.Reini
/**
Some hack to make placeholders work in ie9.
*/
if ($.browser.msie && $.browser.version === "9.0") {
if (!('placeholder' in document.createElement('input'))) {
document.addEventListener("DOMNodeInserted",function(event){
var nodename = event.target.nodeName.toLowerCase();
if ( nodename === "input" || nodename == "textarea" ) {
@ -4459,7 +4464,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
if (data.id) {
self.add_id(data.id);
} else {
ignore_blur = true;
self.ignore_blur = true;
data.action();
}
this.trigger('setSuggestions', {result : []});
@ -4499,7 +4504,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
if (this.get("effective_readonly"))
return;
var self = this;
var ignore_blur = false;
self.ignore_blur = false;
self.$text = this.$("textarea");
self.$text.textext(self.initialize_texttext()).bind('getSuggestions', function(e, data) {
var _this = this;
@ -4519,11 +4524,11 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
self.$text
.focusin(function () {
self.trigger('focused');
ignore_blur = false;
self.ignore_blur = false;
})
.focusout(function() {
self.$text.trigger("setInputData", "");
if (!ignore_blur) {
if (!self.ignore_blur) {
self.trigger('blurred');
}
}).keydown(function(e) {
@ -4601,6 +4606,10 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
width: width,
minHeight: height
});
},
_search_create_popup: function() {
self.ignore_blur = true;
return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments);
},
});

View File

@ -537,7 +537,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
[record.get('id')],
_.pluck(_(this.columns).filter(function (r) {
return r.tag === 'field';
}), 'name')
}), 'name'),
{check_access_rule: true}
).done(function (records) {
var values = records[0];
if (!values) {

View File

@ -126,10 +126,19 @@
* as an editable row at the top or bottom of the list)
*/
do_add_record: function () {
var self = this;
if (this.editable()) {
this.$el.find('table:first').show();
this.$el.find('.oe_view_nocontent').remove();
this.start_edition();
this.start_edition().then(function(){
var fields = self.editor.form.fields;
self.editor.form.fields_order.some(function(field){
if (fields[field].$el.is(':visible')){
fields[field].$el.find("input").select();
return true;
}
});
});
} else {
this._super();
}

View File

@ -25,9 +25,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
this._super.apply(this, arguments);
this.$el.on('click', 'a.oe_breadcrumb_item', this.on_breadcrumb_clicked);
},
dialog_stop: function () {
dialog_stop: function (reason) {
if (this.dialog) {
this.dialog.destroy();
this.dialog.destroy(reason);
}
this.dialog = null;
},
@ -408,7 +408,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
if (this.dialog_widget && !this.dialog_widget.isDestroyed()) {
this.dialog_widget.destroy();
}
this.dialog_stop();
this.dialog_stop(executor.action);
this.dialog = new instance.web.Dialog(this, {
dialogClass: executor.klass,
});
@ -426,7 +426,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
this.dialog.open();
return initialized;
} else {
this.dialog_stop();
this.dialog_stop(executor.action);
this.inner_action = executor.action;
this.inner_widget = widget;
executor.post_process(widget);
@ -639,7 +639,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
this.$el
.find('.oe_view_manager_switch a').filter('[data-view-type="' + view_type + '"]')
.parent().addClass('active');
this.$el.attr("data-view-type", view_type);
return $.when(view_promise).done(function () {
_.each(_.keys(self.views), function(view_name) {
var controller = self.views[view_name].controller;
@ -1402,7 +1402,7 @@ instance.web.View = instance.web.Widget.extend({
// Wrong group_by values will simply fail and forbid rendering of the destination view
var ncontext = new instance.web.CompoundContext(
_.object(_.reject(_.pairs(dataset.get_context().eval()), function(pair) {
return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
return pair[0].match('^(?:(?:default_|search_default_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))
);
ncontext.add(action_data.context || {});

View File

@ -1299,7 +1299,7 @@
<td>
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
<t t-set="fileupload_style" t-translation="off">width: 83px;</t>
<t t-set="fileupload_style" t-translation="off">overflow-x: hidden</t>
<button class="oe_button oe_field_button" type="button">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
<span>Select</span>

View File

@ -81,7 +81,7 @@ openerp.testing.section('editor', {
test('toggle-edition-save', {
asserts: 4,
setup: function (instance, $s, mock) {
mock('test.model:read', function () {
mock('test.model:search_read', function () {
return [{id: 42, a: false, b: false, c: false}];
});
}
@ -183,6 +183,15 @@ openerp.testing.section('list.edition', {
}
return [];
});
mock('demo:search_read', function (args) {
// args[0][0] = ["id", "=", 42]
// args[0][0] = 42
var id = args[0][0][2];
if (id in records) {
return [records[id]];
}
return [];
});
mock('demo:fields_view_get', function () {
return {
type: 'tree',
@ -316,11 +325,13 @@ openerp.testing.section('list.edition.onwrite', {
mock('demo:read', function (args, kwargs) {
if (_.isEmpty(args[0])) {
return [];
} else if (_.isEqual(args[0], [1])) {
return [
{id: 1, a: 'some value'}
];
} else if (_.isEqual(args[0], [42])) {
}
throw new Error(JSON.stringify(_.toArray(arguments)));
});
mock('demo:search_read', function (args, kwargs) {
if (_.isEqual(args[0], [['id', 'in', [1]]])) {
return [{id: 1, a: 'some value'}];
} else if (_.isEqual(args[0], [['id', 'in', [42]]])) {
return [ {id: 42, a: 'foo'} ];
}
throw new Error(JSON.stringify(_.toArray(arguments)));

View File

@ -18,8 +18,12 @@ openerp.testing.section('list.buttons', {
return [
{id: 1, a: 'foo'}, {id: 2, a: 'bar'}, {id: 3, a: 'baz'}
];
} else if (_.isEqual(args[0], [2])) {
// button action virtually removed record
}
throw new Error(JSON.stringify(_.toArray(arguments)));
});
mock('demo:search_read', function (args, kwargs) {
console.log(args);
if (_.isEqual(args[0], [['id', 'in', [2]]])) {
return [];
}
throw new Error(JSON.stringify(_.toArray(arguments)));

View File

@ -620,29 +620,33 @@ openerp.testing.section('search.completions', {
{relation: 'dummy.model'}, view);
return f.complete("bob");
});
test("M2O custom operator", {asserts: 6}, function (instance) {
var view = { inputs: [], };
test("M2O custom operator", {asserts: 10}, function (instance, $s, mock) {
mock('dummy.model:name_search', function (args, kwargs) {
deepEqual(args, [], "should have no positional arguments");
// the operator is meant for the final search term generation, not the autocompletion
equal(kwargs.operator, undefined, "operator should not be used for autocompletion")
strictEqual(kwargs.name, 'bob');
return [[42, "Match"]];
});
var view = {inputs: [], dataset: {get_context: function () {}}};
var f = new instance.web.search.ManyToOneField(
{attrs: {string: 'Dummy', operator:'ilike'}},
{attrs: {string: 'Dummy', operator: 'ilike'}},
{relation: 'dummy.model'}, view);
return f.complete('bob')
.done(function (completions) {
equal(completions.length, 1, "should provide a single completion");
var c = completions[0];
equal(c.label, "Search <em>Dummy</em> for: <strong>bob</strong>",
"should propose fuzzy searching of the value");
ok(c.facet, "should have a facet");
.done(function (c) {
equal(c.length, 2, "should return result + title");
var title = c[0];
equal(title.label, f.attrs.string, "title should match field name");
ok(!title.facet, "title should not have a facet");
var facet = new instance.web.search.Facet(c.facet);
equal(facet.get('category'), f.attrs.string,
"completion facet should bear the field's name");
strictEqual(facet.get('field'), f,
"completion facet should yield the field");
deepEqual(facet.values.toJSON(), [{label: 'bob', value: 'bob'}],
"facet should have a single value using the completion item");
var f1 = new instance.web.search.Facet(c[1].facet);
equal(c[1].label, "Match");
equal(f1.get('category'), f.attrs.string);
equal(f1.get('field'), f);
deepEqual(f1.values.toJSON(), [{label: 'Match', value: 42}]);
});
});
});
test('Integer: invalid', {asserts: 1}, function (instance) {
var view = {inputs: []};
var f = new instance.web.search.IntegerField(

View File

@ -6,6 +6,7 @@ OpenERP Web Calendar view.
==========================
""",
'author': 'OpenERP SA, Valentino Lab (Kalysto)',
'version': '2.0',
'depends': ['web'],
'data' : [],

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
"X-Poedit-Language: Czech\n"
#. module: web_calendar

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
"Language: es\n"
#. module: web_calendar

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:41+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-04-01 06:09+0000\n"
"X-Generator: Launchpad (build 16967)\n"
"X-Launchpad-Export-Date: 2014-04-09 06:40+0000\n"
"X-Generator: Launchpad (build 16976)\n"
#. module: web_calendar
#. openerp-web

Some files were not shown because too many files have changed in this diff Show More