From 21c1b1acd34406d1c568a66976c69511a656861e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 25 Jan 2018 15:25:30 +0100 Subject: [FIX] web: add target=_blank to url field widgets Url in the web client are supposed to open in a new tab. This was the way it worked in v10.0 and was lost with the refactoring of the new views. We just reintroduce that behaviour with this commit. Closes github issue #22389 --- addons/web/static/src/js/fields/basic_fields.js | 1 + addons/web/static/tests/fields/basic_fields_tests.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 09406b43711..26e7d86fabc 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -1068,6 +1068,7 @@ var UrlWidget = InputField.extend({ _renderReadonly: function () { this.$el.text(this.attrs.text || this.value) .addClass('o_form_uri o_text_overflow') + .attr('target', '_blank') .attr('href', this.value); } }); diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 9ea423250e4..fdc8c530af8 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -1073,7 +1073,7 @@ QUnit.module('basic_fields', { QUnit.module('UrlWidget'); QUnit.test('url widget in form view', function (assert) { - assert.expect(8); + assert.expect(9); var form = createView({ View: FormView, @@ -1093,6 +1093,8 @@ QUnit.module('basic_fields', { "should have a anchor with correct classes"); assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').attr('href'), 'yop', "should have proper href link"); + assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').attr('target'), '_blank', + "should have target attribute set to _blank"); assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').text(), 'yop', "the value should be displayed properly"); -- cgit v1.2.3 From 53c9858656ddda861b9f90a06f2c08961d6e0f09 Mon Sep 17 00:00:00 2001 From: Odoo Translation Bot Date: Sun, 28 Jan 2018 04:29:24 +0100 Subject: [I18N] Update translation terms from Transifex --- addons/web/i18n/da.po | 4 +- addons/web/i18n/fa.po | 6 +-- addons/web/i18n/it.po | 11 +++-- addons/web/i18n/ja.po | 8 +-- addons/web/i18n/ko.po | 31 ++++++------ addons/web/i18n/sl.po | 33 +++++++------ addons/web/i18n/zh_CN.po | 126 +++++++++++++++++++++++++---------------------- 7 files changed, 116 insertions(+), 103 deletions(-) (limited to 'addons/web') diff --git a/addons/web/i18n/da.po b/addons/web/i18n/da.po index 2466bce7089..441fa5a8bc4 100644 --- a/addons/web/i18n/da.po +++ b/addons/web/i18n/da.po @@ -4,7 +4,7 @@ # # Translators: # Pernille Kristensen , 2017 -# Martin Trigaux , 2017 +# Martin Trigaux, 2017 # Sanne Kristensen , 2017 # Hans Henrik Gabelgaard , 2017 # Ejner Sønniksen , 2017 @@ -1017,7 +1017,7 @@ msgstr "" #: code:addons/web/static/src/js/views/kanban/kanban_column.js:287 #, python-format msgid "Edit Column" -msgstr "Redigér kolonne" +msgstr "Redigér fase" #. module: web #. openerp-web diff --git a/addons/web/i18n/fa.po b/addons/web/i18n/fa.po index b67a1f51b9b..9a55c0f033f 100644 --- a/addons/web/i18n/fa.po +++ b/addons/web/i18n/fa.po @@ -3,8 +3,8 @@ # * web # # Translators: -# Martin Trigaux , 2017 -# Hamid Darabi , 2017 +# Martin Trigaux, 2017 +# Hamid Darabi, 2017 # ifaraz ir , 2017 # Maziar Niaki , 2017 # morteza zakaye , 2017 @@ -580,7 +580,7 @@ msgstr "نوع دکمه:" #, python-format msgid "Bytes,Kb,Mb,Gb,Tb,Pb,Eb,Zb,Yb" msgstr "" -"بایت,کیلوبایت,مگابایت,گیگابایت,ترابیات,پتابایت,اگزابایت,زتابایت,یوتابایت" +"یوتابایت,زتابایت,اگزابایت,پتابایت,ترابیات,گیگابایت,مگابایت,کیلوبایت,بایت" #. module: web #. openerp-web diff --git a/addons/web/i18n/it.po b/addons/web/i18n/it.po index 86096d7c534..d0a802f94a5 100644 --- a/addons/web/i18n/it.po +++ b/addons/web/i18n/it.po @@ -3,15 +3,16 @@ # * web # # Translators: -# Martin Trigaux , 2017 -# Paolo Valier , 2017 +# Martin Trigaux, 2017 +# Paolo Valier, 2017 +# Cesare Cugnasco , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-09 10:16+0000\n" "PO-Revision-Date: 2018-01-09 10:16+0000\n" -"Last-Translator: Paolo Valier , 2017\n" +"Last-Translator: Cesare Cugnasco , 2018\n" "Language-Team: Italian (https://www.transifex.com/odoo/teams/41243/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -319,7 +320,7 @@ msgstr "Attivo" #: code:addons/web/static/src/xml/kanban.xml:64 #, python-format msgid "Add" -msgstr "" +msgstr "Aggiungi" #. module: web #. openerp-web @@ -1371,7 +1372,7 @@ msgstr "" #: code:addons/web/static/src/js/fields/basic_fields.js:1627 #, python-format msgid "Inactive" -msgstr "" +msgstr "Inattivo" #. module: web #. openerp-web diff --git a/addons/web/i18n/ja.po b/addons/web/i18n/ja.po index b12e09c0acc..e8c4d95cedb 100644 --- a/addons/web/i18n/ja.po +++ b/addons/web/i18n/ja.po @@ -3,7 +3,7 @@ # * web # # Translators: -# Martin Trigaux , 2017 +# Martin Trigaux, 2017 # 高木正勝 , 2017 # Norimichi Sugimoto , 2017 # Yoshi Tashiro , 2017 @@ -580,7 +580,7 @@ msgstr "ボタンタイプ:" #: code:addons/web/static/src/js/core/utils.js:129 #, python-format msgid "Bytes,Kb,Mb,Gb,Tb,Pb,Eb,Zb,Yb" -msgstr "バイト、キロバイト、メガバイト、ギガバイト、テラバイト、ペタバイト、エクサバイト、ゼッタバイト、ヨッタバイト" +msgstr "バイト,キロバイト,メガバイト,ギガバイト,テラバイト,ペタバイト,エクサバイト,ゼッタバイト,ヨッタバイト" #. module: web #. openerp-web @@ -1568,7 +1568,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:639 #, python-format msgid "Match records with the following rule:" -msgstr "以下ルールに従ってレコードが適用する:" +msgstr "次のルールでレコードを特定:" #. module: web #. openerp-web @@ -3253,7 +3253,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:599 #, python-format msgid "record(s)" -msgstr "レーコド" +msgstr "レコード" #. module: web #. openerp-web diff --git a/addons/web/i18n/ko.po b/addons/web/i18n/ko.po index 05731d331a2..6eef574d75f 100644 --- a/addons/web/i18n/ko.po +++ b/addons/web/i18n/ko.po @@ -3,16 +3,17 @@ # * web # # Translators: -# Martin Trigaux , 2017 -# Link-Up , 2018 +# Martin Trigaux, 2017 +# Up Link , 2018 # link up , 2018 +# Seongseok Shin , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-09 10:16+0000\n" "PO-Revision-Date: 2018-01-09 10:16+0000\n" -"Last-Translator: link up , 2018\n" +"Last-Translator: Seongseok Shin , 2018\n" "Language-Team: Korean (https://www.transifex.com/odoo/teams/41243/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -768,7 +769,7 @@ msgstr "계수" #: code:addons/web/static/src/xml/base.xml:425 #, python-format msgid "Create" -msgstr "" +msgstr "작성" #. module: web #. openerp-web @@ -884,7 +885,7 @@ msgstr "삭제" #: code:addons/web/static/src/xml/base.xml:348 #, python-format msgid "Delete this attachment" -msgstr "" +msgstr "해당 첨부파일 삭제" #. module: web #. openerp-web @@ -986,7 +987,7 @@ msgstr "" #: code:addons/web/static/src/xml/report.xml:14 #, python-format msgid "Edit" -msgstr "" +msgstr "편집" #. module: web #. openerp-web @@ -1320,7 +1321,7 @@ msgstr "글로벌 비즈니스 오류" #: code:addons/web/static/src/js/views/graph/graph_view.js:20 #, python-format msgid "Graph" -msgstr "" +msgstr "그래프" #. module: web #. openerp-web @@ -1340,7 +1341,7 @@ msgstr "" #. module: web #: model:ir.model,name:web.model_ir_http msgid "HTTP routing" -msgstr "" +msgstr "HTTP 라우팅" #. module: web #. openerp-web @@ -2576,7 +2577,7 @@ msgstr "" #: code:addons/web/static/src/xml/web_calendar.xml:67 #, python-format msgid "Today" -msgstr "" +msgstr "오늘" #. module: web #. openerp-web @@ -2649,7 +2650,7 @@ msgstr "보관 취소" #: code:addons/web/static/src/js/views/pivot/pivot_model.js:689 #, python-format msgid "Undefined" -msgstr "" +msgstr "정의되지 않음" #. module: web #. openerp-web @@ -2719,7 +2720,7 @@ msgstr "파일 업로드" #: code:addons/web/static/src/js/fields/relational_fields.js:1496 #, python-format msgid "Uploading Error" -msgstr "" +msgstr "업로드 에러" #. module: web #. openerp-web @@ -2728,7 +2729,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:975 #, python-format msgid "Uploading..." -msgstr "" +msgstr "업로드 중…" #. module: web #. openerp-web @@ -2796,7 +2797,7 @@ msgstr "" #: code:addons/web/static/src/xml/web_calendar.xml:72 #, python-format msgid "Week" -msgstr "" +msgstr "주" #. module: web #. openerp-web @@ -2844,7 +2845,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:555 #, python-format msgid "Year" -msgstr "" +msgstr "년" #. module: web #. openerp-web @@ -3227,7 +3228,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1083 #, python-format msgid "or" -msgstr "" +msgstr "또는" #. module: web #. openerp-web diff --git a/addons/web/i18n/sl.po b/addons/web/i18n/sl.po index fa93bed0073..908b519e362 100644 --- a/addons/web/i18n/sl.po +++ b/addons/web/i18n/sl.po @@ -3,14 +3,15 @@ # * web # # Translators: -# Martin Trigaux , 2018 +# Martin Trigaux, 2018 +# matjaz k , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-09 10:16+0000\n" "PO-Revision-Date: 2018-01-09 10:16+0000\n" -"Last-Translator: Martin Trigaux , 2018\n" +"Last-Translator: matjaz k , 2018\n" "Language-Team: Slovenian (https://www.transifex.com/odoo/teams/41243/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -305,7 +306,7 @@ msgstr "" #: code:addons/web/static/src/js/fields/basic_fields.js:1635 #, python-format msgid "Active" -msgstr "" +msgstr "Aktivno" #. module: web #. openerp-web @@ -315,7 +316,7 @@ msgstr "" #: code:addons/web/static/src/xml/kanban.xml:64 #, python-format msgid "Add" -msgstr "" +msgstr "Dodaj" #. module: web #. openerp-web @@ -847,7 +848,7 @@ msgstr "" #: code:addons/web/static/src/xml/web_calendar.xml:71 #, python-format msgid "Day" -msgstr "" +msgstr "Dan" #. module: web #. openerp-web @@ -1320,7 +1321,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1115 #, python-format msgid "Group By" -msgstr "" +msgstr "Združi po" #. module: web #. openerp-web @@ -1353,7 +1354,7 @@ msgstr "" #: code:addons/web/static/src/js/fields/basic_fields.js:1210 #, python-format msgid "Image" -msgstr "" +msgstr "Slika" #. module: web #. openerp-web @@ -1620,7 +1621,7 @@ msgstr "" #: code:addons/web/static/src/xml/web_calendar.xml:73 #, python-format msgid "Month" -msgstr "" +msgstr "Mesec" #. module: web #. openerp-web @@ -1668,7 +1669,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1243 #, python-format msgid "Name:" -msgstr "" +msgstr "Naziv:" #. module: web #. openerp-web @@ -2066,7 +2067,7 @@ msgstr "" #: code:addons/web/static/src/xml/report.xml:11 #, python-format msgid "Print" -msgstr "" +msgstr "Tiskanje" #. module: web #. openerp-web @@ -2122,7 +2123,7 @@ msgstr "" #: code:addons/web/static/src/js/report/qwebactionmanager.js:94 #, python-format msgid "Report" -msgstr "" +msgstr "Poročilo" #. module: web #. openerp-web @@ -2162,7 +2163,7 @@ msgstr "" #: code:addons/web/static/src/xml/report.xml:17 #, python-format msgid "Save" -msgstr "" +msgstr "Shrani" #. module: web #. openerp-web @@ -2577,7 +2578,7 @@ msgstr "" #: code:addons/web/static/src/js/views/pivot/pivot_model.js:563 #, python-format msgid "Total" -msgstr "" +msgstr "Skupaj" #. module: web #. openerp-web @@ -2753,7 +2754,7 @@ msgstr "" #: code:addons/web/static/src/js/views/list/list_renderer.js:328 #, python-format msgid "Warning" -msgstr "" +msgstr "Opozorilo" #. module: web #: model:ir.ui.view,arch_db:web.benchmark_suite @@ -2782,7 +2783,7 @@ msgstr "" #: code:addons/web/static/src/xml/web_calendar.xml:72 #, python-format msgid "Week" -msgstr "" +msgstr "Teden" #. module: web #. openerp-web @@ -2816,7 +2817,7 @@ msgstr "" #: code:addons/web/static/src/js/fields/basic_fields.js:1890 #, python-format msgid "Wrong value entered!" -msgstr "" +msgstr "Vnesena vrednost je napačna!" #. module: web #. openerp-web diff --git a/addons/web/i18n/zh_CN.po b/addons/web/i18n/zh_CN.po index f65967c18b8..9f90f6cd175 100644 --- a/addons/web/i18n/zh_CN.po +++ b/addons/web/i18n/zh_CN.po @@ -4,9 +4,9 @@ # # Translators: # Jeffery CHEN Fan , 2017 -# Martin Trigaux , 2017 +# Martin Trigaux, 2017 # liAnGjiA , 2017 -# fausthuang , 2017 +# fausthuang, 2017 # xiaobin wu , 2017 # Gary Wei , 2017 # 苏州远鼎 , 2017 @@ -17,14 +17,16 @@ # 菜小蛇 , 2017 # Wei "oldrev" Li , 2017 # Zamba Lee , 2017 +# 山西清水欧度(QQ:54773801) <54773801@qq.com>, 2017 # Li Xiang , 2017 +# 老窦 北京 <2662059195@qq.com>, 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-09 10:16+0000\n" "PO-Revision-Date: 2018-01-09 10:16+0000\n" -"Last-Translator: Li Xiang , 2017\n" +"Last-Translator: 老窦 北京 <2662059195@qq.com>, 2018\n" "Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -51,7 +53,7 @@ msgstr " [我]" #: code:addons/web/static/src/js/chrome/search_filters.js:226 #, python-format msgid " and " -msgstr "" +msgstr "和" #. module: web #. openerp-web @@ -154,6 +156,9 @@ msgid "" " <body class=\"ie9\">\n" " <![endif]-->" msgstr "" +"<!—[if lt IE 10]>\n" +" <body class=“ie9”>\n" +" <![endif]—>" #. module: web #: model:ir.ui.view,arch_db:web.minimal_layout @@ -200,7 +205,7 @@ msgstr "'%s' 不是正确的整数" #: code:addons/web/static/src/js/fields/field_utils.js:488 #, python-format msgid "'%s' is not a correct monetary field" -msgstr "" +msgstr "‘%s’ 不是正确的货币字段" #. module: web #. openerp-web @@ -228,7 +233,7 @@ msgstr "(无标签)" #: code:addons/web/static/src/js/fields/field_utils.js:244 #, python-format msgid "1 record" -msgstr "" +msgstr "1条记录" #. module: web #: model:ir.ui.view,arch_db:web.menu_secondary @@ -247,21 +252,21 @@ msgstr "Odoo" msgid "" "A popup window with your report was blocked. You may need to change your " "browser settings to allow popup windows for this page." -msgstr "" +msgstr "你的报告弹出窗口被封锁了。您可能需要更改浏览器设置,以允许此页的弹出窗口。" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:627 #, python-format msgid "ALL" -msgstr "" +msgstr "所有" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:628 #, python-format msgid "ANY" -msgstr "" +msgstr "任何" #. module: web #. openerp-web @@ -452,7 +457,7 @@ msgstr "发生了错误" msgid "" "An unknown CORS error occured. The error probably originates from a " "JavaScript file served from a different origin." -msgstr "" +msgstr "发生未知的CORS错误。 该错误可能来自不同来源的JavaScript文件。" #. module: web #. openerp-web @@ -547,7 +552,7 @@ msgstr "柱状图" #: code:addons/web/static/src/js/fields/basic_fields.js:1311 #, python-format msgid "Binary File" -msgstr "" +msgstr "二进制文件" #. module: web #: code:addons/web/controllers/main.py:1474 @@ -555,7 +560,7 @@ msgstr "" msgid "" "Binary fields can not be exported to Excel unless their content is " "base64-encoded. That does not seem to be the case for %s." -msgstr "" +msgstr "二进制字段不能导出到Excel,除非他们的内容是Base64编码。这似乎不适用于 %s。" #. module: web #. openerp-web @@ -1009,7 +1014,7 @@ msgstr "编辑动作" #: code:addons/web/static/src/xml/base.xml:275 #, python-format msgid "Edit Calendar view" -msgstr "" +msgstr "编辑日历视图" #. module: web #. openerp-web @@ -1030,49 +1035,49 @@ msgstr "编辑域" #: code:addons/web/static/src/xml/base.xml:269 #, python-format msgid "Edit Form view" -msgstr "" +msgstr "编辑表单视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:273 #, python-format msgid "Edit Gantt view" -msgstr "" +msgstr "编辑甘特视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:272 #, python-format msgid "Edit Graph view" -msgstr "" +msgstr "编辑图表视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:271 #, python-format msgid "Edit Kanban view" -msgstr "" +msgstr "编辑看板视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:270 #, python-format msgid "Edit List view" -msgstr "" +msgstr "编辑列表视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:274 #, python-format msgid "Edit Pivot view" -msgstr "" +msgstr "编辑数据透视视图" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:279 #, python-format msgid "Edit Search view" -msgstr "" +msgstr "编辑搜索视图" #. module: web #. openerp-web @@ -1086,7 +1091,7 @@ msgstr "编辑阶段" #: code:addons/web/static/src/xml/base.xml:276 #, python-format msgid "Edit view, type:" -msgstr "" +msgstr "编辑视图,输入:" #. module: web #: model:ir.ui.view,arch_db:web.login @@ -1189,7 +1194,7 @@ msgstr "搜索条件评估失败" #: code:addons/web/static/src/js/fields/field_utils.js:45 #, python-format msgid "False" -msgstr "False" +msgstr "假" #. module: web #. openerp-web @@ -1299,6 +1304,9 @@ msgid "" "\n" "Tip: try to flip axis, filter further or reduce the number of measures." msgstr "" +"为了兼容Excel,如果列数超过256,则不能导出数据。\n" +"\n" +"提示:尝试翻转轴,进一步过滤或减少测量次数。" #. module: web #. openerp-web @@ -1353,7 +1361,7 @@ msgstr "HTTP 路由" #: code:addons/web/static/src/js/core/dialog.js:250 #, python-format msgid "I am sure about this." -msgstr "" +msgstr "我确信这一点。" #. module: web #. openerp-web @@ -1398,7 +1406,7 @@ msgstr "无效的数据" msgid "" "Invalid database name. Only alphanumerical characters, underscore, hyphen " "and dot are allowed." -msgstr "" +msgstr "数据库名称无效。只允许字母数字字符,下划线,连字符和点。" #. module: web #. openerp-web @@ -1427,7 +1435,7 @@ msgstr "非法的模式" #: code:addons/web/static/src/js/widgets/debug_manager.js:207 #, python-format msgid "JS Mobile Tests" -msgstr "" +msgstr "JS移动端测试" #. module: web #. openerp-web @@ -1534,7 +1542,7 @@ msgstr "M2O搜索字段目前不支持多个默认值" #. module: web #: model:ir.ui.view,arch_db:web.external_layout_boxed msgid "Mail:" -msgstr "" +msgstr "Mail:" #. module: web #: model:ir.ui.view,arch_db:web.login_layout @@ -1561,14 +1569,14 @@ msgstr "匹配" #: code:addons/web/static/src/xml/base.xml:641 #, python-format msgid "Match records with" -msgstr "" +msgstr "配记录" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:639 #, python-format msgid "Match records with the following rule:" -msgstr "" +msgstr "根据以下规则匹配记录:" #. module: web #. openerp-web @@ -1675,7 +1683,7 @@ msgstr "Odoo.com帐户" #: code:addons/web/static/src/xml/base.xml:629 #, python-format msgid "NONE" -msgstr "" +msgstr "无" #. module: web #. openerp-web @@ -1898,7 +1906,7 @@ msgstr "仅整型数值是有效的。" #, python-format msgid "" "Only employee can access this database. Please contact the administrator." -msgstr "" +msgstr "只有员工才能访问这个数据库。请与管理员联系。" #. module: web #. openerp-web @@ -2004,7 +2012,7 @@ msgstr "透视表" #: code:addons/web/static/src/js/views/list/list_renderer.js:328 #, python-format msgid "Please click on the \"save\" button first" -msgstr "" +msgstr "请先点击“保存”按钮" #. module: web #. openerp-web @@ -2049,7 +2057,7 @@ msgstr "请选择要保存成导出列表的字段..." #, python-format msgid "" "Please use the copy button to report the error to your support service." -msgstr "" +msgstr "请使用复制按钮将错误报告给您的支持服务。" #. module: web #: model:ir.ui.view,arch_db:web.menu_secondary @@ -2161,7 +2169,7 @@ msgstr "恢复记录" #: code:addons/web/static/src/xml/base.xml:223 #, python-format msgid "Run JS Mobile Tests" -msgstr "" +msgstr "运行JS 移动端测试" #. module: web #. openerp-web @@ -2429,7 +2437,7 @@ msgstr "" #: code:addons/web/static/src/js/widgets/switch_company_menu.js:38 #, python-format msgid "Tap on the list to change company" -msgstr "" +msgstr "点击列表更改公司" #. module: web #. openerp-web @@ -2450,7 +2458,7 @@ msgstr "电话:" #: code:addons/web/static/src/js/widgets/domain_selector.js:567 #, python-format msgid "The domain you entered is not properly formed" -msgstr "" +msgstr "您输入的域格式不正确。" #. module: web #. openerp-web @@ -2459,7 +2467,7 @@ msgstr "" msgid "" "The field chain is not valid. Did you maybe use a non-existing field name or" " followed a non-relational field?" -msgstr "" +msgstr "字段链无效。 你可能使用了一个不存在的字段名称,或者跟着一个非关系的字段?" #. module: web #. openerp-web @@ -2495,7 +2503,7 @@ msgstr "你提供的原密码是错误的,密码没有改变" msgid "" "The record has been modified, your changes will be discarded. Do you want to" " proceed?" -msgstr "" +msgstr "记录已被修改,您的更改将被丢弃。你想继续吗?" #. module: web #. openerp-web @@ -2519,7 +2527,7 @@ msgstr "字段类型 '%s' 必须是一个关联到 'ir.attachment'模型的 man msgid "" "There are too many rows (%s rows, limit: 65535) to export as Excel 97-2003 " "(.xls) format. Consider splitting the export." -msgstr "" +msgstr "有太多行 (%s行, 限制: 65535) 导出为 Excel 97-2003 (. xls) 格式。考虑拆分导出。" #. module: web #. openerp-web @@ -2533,7 +2541,7 @@ msgstr "上传文件时发生了问题" #: code:addons/web/static/src/js/widgets/domain_selector.js:459 #, python-format msgid "This domain is not supported." -msgstr "" +msgstr "此域不受支持" #. module: web #. openerp-web @@ -2782,17 +2790,17 @@ msgstr "警告" #. module: web #: model:ir.ui.view,arch_db:web.benchmark_suite msgid "Web Benchmarks" -msgstr "" +msgstr "Web 基准" #. module: web #: model:ir.ui.view,arch_db:web.qunit_mobile_suite msgid "Web Mobile Tests" -msgstr "" +msgstr "Web 移动端测试" #. module: web #: model:ir.ui.view,arch_db:web.qunit_suite msgid "Web Tests" -msgstr "" +msgstr "Web 测试" #. module: web #: model:ir.ui.view,arch_db:web.external_layout_boxed @@ -2827,7 +2835,7 @@ msgstr "干的漂亮 !" #: code:addons/web/static/src/xml/base.xml:29 #, python-format msgid "Widget:" -msgstr "挂件:" +msgstr "小部件:" #. module: web #: code:addons/web/controllers/main.py:487 @@ -2883,7 +2891,7 @@ msgstr "正要创建新的 %s,确认它真的不存在吗?" #: code:addons/web/static/src/js/widgets/model_field_selector.js:455 #, python-format msgid "You cannot follow relations for this field chain construction" -msgstr "" +msgstr "无法跟踪此字段链结构的关系。" #. module: web #: code:addons/web/controllers/main.py:787 @@ -2949,13 +2957,15 @@ msgid "" "shown in html.

wkhtmltopdf.org" msgstr "" +"你安装的 Wkhtmltopdf 似乎坏了。该报告将以 html 格式显示。

wkhtmltopdf.org " #. module: web #. openerp-web #: code:addons/web/static/src/js/views/kanban/kanban_record.js:198 #, python-format msgid "[No widget %s]" -msgstr "" +msgstr "[没有小部件 %s]" #. module: web #. openerp-web @@ -3009,7 +3019,7 @@ msgstr "base" #: code:addons/web/static/src/js/widgets/domain_selector.js:28 #, python-format msgid "child of" -msgstr "" +msgstr "子类" #. module: web #. openerp-web @@ -3069,14 +3079,14 @@ msgstr "是" #: code:addons/web/static/src/js/chrome/search_filters.js:183 #, python-format msgid "is after" -msgstr "" +msgstr "在之后" #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome/search_filters.js:184 #, python-format msgid "is before" -msgstr "" +msgstr "在之前" #. module: web #. openerp-web @@ -3156,7 +3166,7 @@ msgstr "为真" #: code:addons/web/static/src/js/core/utils.js:111 #, python-format msgid "kMGTPE" -msgstr "" +msgstr "kMGTPE" #. module: web #. openerp-web @@ -3187,7 +3197,7 @@ msgstr "少于及等于" #: code:addons/web/static/src/xml/base.xml:724 #, python-format msgid "not" -msgstr "" +msgstr "不是" #. module: web #. openerp-web @@ -3208,35 +3218,35 @@ msgstr "不是一个有效的数字" #: code:addons/web/static/src/js/widgets/domain_selector.js:24 #, python-format msgid "not contains" -msgstr "" +msgstr "不包含" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:26 #, python-format msgid "not in" -msgstr "" +msgstr "不在" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:658 #, python-format msgid "not set (false)" -msgstr "" +msgstr "未设置 (否)" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:643 #, python-format msgid "of the following rules:" -msgstr "" +msgstr "以下规则:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:658 #, python-format msgid "of:" -msgstr "" +msgstr "的:" #. module: web #. openerp-web @@ -3251,7 +3261,7 @@ msgstr "或" #: code:addons/web/static/src/js/widgets/domain_selector.js:29 #, python-format msgid "parent of" -msgstr "" +msgstr "父类" #. module: web #. openerp-web @@ -3272,11 +3282,11 @@ msgstr "剩余)" #: code:addons/web/static/src/xml/base.xml:724 #, python-format msgid "set" -msgstr "" +msgstr "设置" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:658 #, python-format msgid "set (true)" -msgstr "" +msgstr "设置(真)" -- cgit v1.2.3 From d06bf070cbdf89bbf8d0c8c8aceef5f2bbf66238 Mon Sep 17 00:00:00 2001 From: Odoo Translation Bot Date: Sun, 28 Jan 2018 07:04:23 +0100 Subject: [I18N] Update translation terms from Transifex --- addons/web/i18n/zh_CN.po | 101 ++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 46 deletions(-) (limited to 'addons/web') diff --git a/addons/web/i18n/zh_CN.po b/addons/web/i18n/zh_CN.po index b9f131801ae..4a4ac82e4ff 100644 --- a/addons/web/i18n/zh_CN.po +++ b/addons/web/i18n/zh_CN.po @@ -4,8 +4,8 @@ # # Translators: # Jeffery CHEN Fan , 2016 -# Martin Trigaux , 2016 -# fausthuang , 2016 +# Martin Trigaux, 2016 +# fausthuang, 2016 # Gary Wei , 2016 # Talway <9010446@qq.com>, 2016 # xiaobin wu , 2016 @@ -18,13 +18,14 @@ # 菜小蛇 , 2016 # 苏州远鼎 , 2017 # 卓忆科技 , 2017 +# 山西清水欧度(QQ:54773801) <54773801@qq.com>, 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~11.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-12-13 14:37+0000\n" "PO-Revision-Date: 2017-12-13 14:37+0000\n" -"Last-Translator: 卓忆科技 , 2017\n" +"Last-Translator: 山西清水欧度(QQ:54773801) <54773801@qq.com>, 2018\n" "Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -51,7 +52,7 @@ msgstr " [我]" #: code:addons/web/static/src/js/chrome/search_filters.js:226 #, python-format msgid " and " -msgstr "" +msgstr " 与" #. module: web #. openerp-web @@ -154,6 +155,9 @@ msgid "" " <body class=\"ie9\">\n" " <![endif]-->" msgstr "" +"<!—[if lt IE 10]>\n" +" <body class=“ie9”>\n" +" <![endif]—>" #. module: web #: model:ir.ui.view,arch_db:web.minimal_layout @@ -200,7 +204,7 @@ msgstr "'%s' 不是正确的整数" #: code:addons/web/static/src/js/fields/field_utils.js:483 #, python-format msgid "'%s' is not a correct monetary field" -msgstr "" +msgstr "‘%s’ 不是正确的货币字段" #. module: web #. openerp-web @@ -228,7 +232,7 @@ msgstr "(无标签)" #: code:addons/web/static/src/js/fields/field_utils.js:239 #, python-format msgid "1 record" -msgstr "" +msgstr "1条记录" #. module: web #: model:ir.ui.view,arch_db:web.menu_secondary @@ -247,21 +251,21 @@ msgstr "Odoo" msgid "" "A popup window with your report was blocked. You may need to change your " "browser settings to allow popup windows for this page." -msgstr "" +msgstr "你的报告弹出窗口被封锁了。您可能需要更改浏览器设置,以允许此页的弹出窗口。" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:589 #, python-format msgid "ALL" -msgstr "" +msgstr "所有" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:590 #, python-format msgid "ANY" -msgstr "" +msgstr "任何" #. module: web #. openerp-web @@ -452,7 +456,7 @@ msgstr "发生了错误" msgid "" "An unknown CORS error occured. The error probably originates from a " "JavaScript file served from a different origin." -msgstr "" +msgstr "发生未知的CORS错误。 该错误可能来自不同来源的JavaScript文件。" #. module: web #. openerp-web @@ -548,7 +552,7 @@ msgstr "柱状图" msgid "" "Binary fields can not be exported to Excel unless their content is " "base64-encoded. That does not seem to be the case for %s." -msgstr "" +msgstr "二进制字段不能导出到Excel,除非他们的内容是Base64编码。这似乎不适用于 %s。" #. module: web #. openerp-web @@ -1229,6 +1233,9 @@ msgid "" "\n" "Tip: try to flip axis, filter further or reduce the number of measures." msgstr "" +"为了兼容Excel,如果列数超过256,则不能导出数据。\n" +"\n" +"提示:尝试翻转轴,进一步过滤或减少测量次数。" #. module: web #. openerp-web @@ -1290,7 +1297,7 @@ msgstr "" #: code:addons/web/static/src/js/core/dialog.js:250 #, python-format msgid "I am sure about this." -msgstr "" +msgstr "我确信这一点。" #. module: web #. openerp-web @@ -1335,7 +1342,7 @@ msgstr "无效的数据" msgid "" "Invalid database name. Only alphanumerical characters, underscore, hyphen " "and dot are allowed." -msgstr "" +msgstr "数据库名称无效。只允许字母数字字符,下划线,连字符和点。" #. module: web #. openerp-web @@ -1364,7 +1371,7 @@ msgstr "非法的模式" #: code:addons/web/static/src/js/widgets/debug_manager.js:208 #, python-format msgid "JS Mobile Tests" -msgstr "" +msgstr "JS移动端测试" #. module: web #. openerp-web @@ -1471,7 +1478,7 @@ msgstr "M2O搜索字段目前不支持多个默认值" #. module: web #: model:ir.ui.view,arch_db:web.external_layout_boxed msgid "Mail:" -msgstr "" +msgstr "Mail:" #. module: web #: model:ir.ui.view,arch_db:web.login_layout @@ -1498,14 +1505,14 @@ msgstr "匹配" #: code:addons/web/static/src/xml/base.xml:603 #, python-format msgid "Match records with" -msgstr "" +msgstr "配记录" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:601 #, python-format msgid "Match records with the following rule:" -msgstr "" +msgstr "根据以下规则匹配记录:" #. module: web #. openerp-web @@ -1612,7 +1619,7 @@ msgstr "我的Odoo.com帐号" #: code:addons/web/static/src/xml/base.xml:591 #, python-format msgid "NONE" -msgstr "" +msgstr "无" #. module: web #. openerp-web @@ -1835,7 +1842,7 @@ msgstr "仅整型数值是合法的。" #, python-format msgid "" "Only employee can access this database. Please contact the administrator." -msgstr "" +msgstr "只有员工才能访问这个数据库。请与管理员联系。" #. module: web #. openerp-web @@ -1941,7 +1948,7 @@ msgstr "透视表" #: code:addons/web/static/src/js/views/list/list_renderer.js:327 #, python-format msgid "Please click on the \"save\" button first" -msgstr "" +msgstr "请先点击“保存”按钮" #. module: web #. openerp-web @@ -1993,7 +2000,7 @@ msgstr "" #, python-format msgid "" "Please use the copy button to report the error to your support service." -msgstr "" +msgstr "请使用复制按钮将错误报告给您的支持服务。" #. module: web #: model:ir.ui.view,arch_db:web.menu_secondary @@ -2112,7 +2119,7 @@ msgstr "恢复记录" #: code:addons/web/static/src/xml/base.xml:223 #, python-format msgid "Run JS Mobile Tests" -msgstr "" +msgstr "运行JS 移动端测试" #. module: web #. openerp-web @@ -2380,7 +2387,7 @@ msgstr "" #: code:addons/web/static/src/js/widgets/switch_company_menu.js:44 #, python-format msgid "Tap on the list to change company" -msgstr "" +msgstr "点击列表更改公司" #. module: web #. openerp-web @@ -2401,7 +2408,7 @@ msgstr "电话:" #: code:addons/web/static/src/js/widgets/domain_selector.js:567 #, python-format msgid "The domain you entered is not properly formed" -msgstr "" +msgstr "您输入的域格式不正确。" #. module: web #. openerp-web @@ -2410,7 +2417,7 @@ msgstr "" msgid "" "The field chain is not valid. Did you maybe use a non-existing field name or" " followed a non-relational field?" -msgstr "" +msgstr "字段链无效。 你可能使用了一个不存在的字段名称,或者跟着一个非关系的字段?" #. module: web #. openerp-web @@ -2446,7 +2453,7 @@ msgstr "你提供的原密码是错误的,密码没有改变" msgid "" "The record has been modified, your changes will be discarded. Do you want to" " proceed?" -msgstr "" +msgstr "记录已被修改,您的更改将被丢弃。你想继续吗?" #. module: web #. openerp-web @@ -2470,7 +2477,7 @@ msgstr "字段类型 '%s' 必须是一个关联到 'ir.attachment'模型的 man msgid "" "There are too many rows (%s rows, limit: 65535) to export as Excel 97-2003 " "(.xls) format. Consider splitting the export." -msgstr "" +msgstr "有太多行 (%s行, 限制: 65535) 导出为 Excel 97-2003 (. xls) 格式。考虑拆分导出。" #. module: web #. openerp-web @@ -2484,7 +2491,7 @@ msgstr "上传文件时发生了问题" #: code:addons/web/static/src/js/widgets/domain_selector.js:459 #, python-format msgid "This domain is not supported." -msgstr "" +msgstr "此域不受支持" #. module: web #. openerp-web @@ -2725,17 +2732,17 @@ msgstr "警告" #. module: web #: model:ir.ui.view,arch_db:web.benchmark_suite msgid "Web Benchmarks" -msgstr "" +msgstr "Web 基准" #. module: web #: model:ir.ui.view,arch_db:web.qunit_mobile_suite msgid "Web Mobile Tests" -msgstr "" +msgstr "Web 移动端测试" #. module: web #: model:ir.ui.view,arch_db:web.qunit_suite msgid "Web Tests" -msgstr "" +msgstr "Web 测试" #. module: web #: model:ir.ui.view,arch_db:web.external_layout_boxed @@ -2826,7 +2833,7 @@ msgstr "正要创建新的 %s,确认它真的不存在吗?" #: code:addons/web/static/src/js/widgets/model_field_selector.js:455 #, python-format msgid "You cannot follow relations for this field chain construction" -msgstr "" +msgstr "无法跟踪此字段链结构的关系。" #. module: web #: code:addons/web/controllers/main.py:787 @@ -2885,13 +2892,15 @@ msgid "" "shown in html.

wkhtmltopdf.org" msgstr "" +"你安装的 Wkhtmltopdf 似乎坏了。该报告将以 html 格式显示。

wkhtmltopdf.org " #. module: web #. openerp-web #: code:addons/web/static/src/js/views/kanban/kanban_record.js:199 #, python-format msgid "[No widget %s]" -msgstr "" +msgstr "[没有小部件 %s]" #. module: web #. openerp-web @@ -2945,7 +2954,7 @@ msgstr "base" #: code:addons/web/static/src/js/widgets/domain_selector.js:28 #, python-format msgid "child of" -msgstr "" +msgstr "子类" #. module: web #. openerp-web @@ -3005,14 +3014,14 @@ msgstr "是" #: code:addons/web/static/src/js/chrome/search_filters.js:183 #, python-format msgid "is after" -msgstr "" +msgstr "在之后" #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome/search_filters.js:184 #, python-format msgid "is before" -msgstr "" +msgstr "在之前" #. module: web #. openerp-web @@ -3092,7 +3101,7 @@ msgstr "为真" #: code:addons/web/static/src/js/core/utils.js:111 #, python-format msgid "kMGTPE" -msgstr "" +msgstr "kMGTPE" #. module: web #. openerp-web @@ -3123,7 +3132,7 @@ msgstr "少于及等于" #: code:addons/web/static/src/xml/base.xml:686 #, python-format msgid "not" -msgstr "" +msgstr "不是" #. module: web #. openerp-web @@ -3144,35 +3153,35 @@ msgstr "不是一个有效的数字" #: code:addons/web/static/src/js/widgets/domain_selector.js:24 #, python-format msgid "not contains" -msgstr "" +msgstr "不包含" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:26 #, python-format msgid "not in" -msgstr "" +msgstr "不在" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:658 #, python-format msgid "not set (false)" -msgstr "" +msgstr "未设置 (否)" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:605 #, python-format msgid "of the following rules:" -msgstr "" +msgstr "以下规则:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:620 #, python-format msgid "of:" -msgstr "" +msgstr "的:" #. module: web #. openerp-web @@ -3187,7 +3196,7 @@ msgstr "或" #: code:addons/web/static/src/js/widgets/domain_selector.js:29 #, python-format msgid "parent of" -msgstr "" +msgstr "父类" #. module: web #. openerp-web @@ -3208,11 +3217,11 @@ msgstr "剩余)" #: code:addons/web/static/src/xml/base.xml:686 #, python-format msgid "set" -msgstr "" +msgstr "设置" #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:658 #, python-format msgid "set (true)" -msgstr "" +msgstr "设置(真)" -- cgit v1.2.3 From 5b230c34cb960f3f729d6612735dd9c3c896b785 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 29 Jan 2018 10:29:12 +0100 Subject: [FIX] web: noshow list view aggregates w/ currency In df69b5bb the aggregates of a column with currency was shown only if records were of the same currency when a grouping was closed. But when the list view is grouped, this would cause a number of issue: - error if with first grouping is opened, another one is closed - if the first grouping was closed aggregates were always shown - the code only acts when closing a grouping - aggregates could be shown when they should not - aggregates could be not shown when they should So this commit change things so this feature is ignored when the list view is grouped. There is also a fix so `currency_field` of the column is used instead of just using `currency_id` that may be wrong. note: only for saas-14 and saas-15 (feature is not present in saas-16) opw-810835 closes #22598 --- addons/web/static/src/js/views/list_view.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/views/list_view.js b/addons/web/static/src/js/views/list_view.js index 83e1b7bf900..d28ac5e0774 100644 --- a/addons/web/static/src/js/views/list_view.js +++ b/addons/web/static/src/js/views/list_view.js @@ -713,6 +713,7 @@ var ListView = View.extend({ * @param {Array} [records] */ compute_aggregates: function (records) { + var self = this; var columns = _(this.aggregate_columns).filter(function (column) { return column['function']; }); if (_.isEmpty(columns)) { return; } @@ -763,8 +764,12 @@ var ListView = View.extend({ var aggregates = {}; _.each(_.filter(columns, function (column) { - if (column.currency_field && records.length > 0 && records[0].values['currency_id']) { - var currency_ids = _.map(records, function(record) {return record.values['currency_id'][0]}); + if (!self.grouped && column.currency_field) { + var currency_ids = _.map(records, function(record) { + if (record.values[column.currency_field]) { + return record.values[column.currency_field][0]; + } + }); if (_.every(currency_ids, function (currency_id){return currency_id === currency_ids[0]})) { return column; } -- cgit v1.2.3 From a4c7481f249a7e3d999189cfac907dadcd847a6a Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 31 Jan 2018 08:58:06 +0100 Subject: [FIX] web: auto-refresh of time When a TZ mismatch is detected, the datetime value is displayed in the widget. However, on MacOS, this forces the dropdown list to close at each refresh of the value, which occurs every second. The refresh interval is set to 1 minute in case of MacOS. opw-804035 --- addons/web/static/src/js/fields/special_fields.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/fields/special_fields.js b/addons/web/static/src/js/fields/special_fields.js index 19db97fe985..6bd5d03ac69 100644 --- a/addons/web/static/src/js/fields/special_fields.js +++ b/addons/web/static/src/js/fields/special_fields.js @@ -20,7 +20,8 @@ var FieldTimezoneMismatch = FieldSelection.extend({ * @override */ start: function () { - this._datetime = setInterval(this._renderDateTimeTimezone.bind(this), 1000); + var interval = navigator.platform.toUpperCase().indexOf('MAC') >= 0 ? 60000 : 1000; + this._datetime = setInterval(this._renderDateTimeTimezone.bind(this), interval); return this._super.apply(this, arguments); }, /** -- cgit v1.2.3 From e6cccbf441eddf48feaa0ff1e99ecf40f9f973ed Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 30 Jan 2018 11:04:57 +0100 Subject: [FIX] web: less boolean_toogle Before this commit, the boolean_toggle widget was rendered but the less contained errors that prevented it from displaying correctly This was due to commit 9dead7e3d33ee0ddafb55060b3f95027e9330e55 After this commit, the widget displays correctly There might be an issue in the future because of field_utils.formatBoolean, when this function decides to pass the full options dict OPW 80782 --- addons/web/static/src/less/webclient.less | 50 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'addons/web') diff --git a/addons/web/static/src/less/webclient.less b/addons/web/static/src/less/webclient.less index dfc26b11f5a..215b86cef83 100644 --- a/addons/web/static/src/less/webclient.less +++ b/addons/web/static/src/less/webclient.less @@ -86,39 +86,37 @@ div.o_boolean_toggle { width: 32px !important; height: 18px; - & > label { - & > input { + > input { display: none; } - & > .slider { + .slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #a0a0a0; + border-radius: 24px; + + &:before { position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #a0a0a0; - border-radius: 24px; - - &:before { - position: absolute; - content: ""; - height: 12px; - width: 12px; - left: 3px; - bottom: 3px; - background-color: white; - border-radius: 50%; - } + content: ""; + height: 12px; + width: 12px; + left: 3px; + bottom: 3px; + background-color: white; + border-radius: 50%; } + } - & > input:checked + .slider { - background-color: @odoo-brand-optional; + > input:checked + .slider { + background-color: @odoo-brand-optional; - &:before { - .translate(14px; 0px); - } + &:before { + .translate(14px; 0px); } } } -- cgit v1.2.3 From eeebd4ad857fec39c14abc0a0e387c13adcfa30b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 30 Jan 2018 10:41:11 +0100 Subject: [FIX] web: kanban containment Set up the following kanban columns: | Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | F | | | | | | | Card | | <------- Screen width ----------> Col x are unfolded columns. F is a folded colum. Moving the Card from Col 6 to F is impossible: the card won't go 'out of the screen' on the right, which prevents its center to reach F. Commit 5ba6d93810ba44 deactivates the drag & drop on read-only fields. In order to restrict the kanban cards displacements, the `containment` attribute is used to either restrict the displacement: - in `o_kanban_view` if draggable - in the parent if not (to allow the resequence) The class `o_kanban_view` is too restrictive: when movind the card to the folded column F, the card must go out of `o_kanban_view`. opw-803929 --- addons/web/static/src/js/views/kanban/kanban_column.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/views/kanban/kanban_column.js b/addons/web/static/src/js/views/kanban/kanban_column.js index 82fc5d168ff..acb4a7bc412 100644 --- a/addons/web/static/src/js/views/kanban/kanban_column.js +++ b/addons/web/static/src/js/views/kanban/kanban_column.js @@ -93,7 +93,7 @@ var KanbanColumn = Widget.extend({ // should find a way to use the touch events to make sortable work. this.$el.sortable({ connectWith: '.o_kanban_group', - containment: this.draggable ? '.o_kanban_view' : 'parent', + containment: this.draggable ? false : 'parent', revert: 0, delay: 0, items: '> .o_kanban_record:not(.o_updating)', -- cgit v1.2.3 From 695bd75a1383e88099a79de89db9ee1042c83d5e Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 31 Jan 2018 15:45:48 +0100 Subject: [FIX] web: invalid domain in DomainSelector Backport of this commit: c13c9e0b5c6ff8a8ae030ff2467d4675fb6197b8 Steps to reproduce the bug: - install application MRP Maintenance - open maintenance request form view, and from top right corner click Studio icon - click on Equipment field while you are still in studio interface - It will show left side studio panel, click Domain box and it will throw an error opw:813594 --- .../web/static/src/js/widgets/domain_selector.js | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/widgets/domain_selector.js b/addons/web/static/src/js/widgets/domain_selector.js index eccbd9d7491..5fd517ebc6f 100644 --- a/addons/web/static/src/js/widgets/domain_selector.js +++ b/addons/web/static/src/js/widgets/domain_selector.js @@ -110,7 +110,16 @@ var DomainTree = DomainNode.extend({ /// @see DomainTree._addFlattenedChildren init: function (parent, model, domain, options) { this._super.apply(this, arguments); - this._initialize(domainUtils.stringToDomain(domain)); + try { + domain = domainUtils.stringToDomain(domain); + } catch (err) { + // TODO: domain could contain `parent` for example, which is + // currently not handled by the DomainSelector + this.invalidDomain = true; + this.children = []; + return; + } + this._initialize(domain); }, /// @see DomainTree.init _initialize: function (domain) { @@ -279,6 +288,18 @@ var DomainSelector = DomainTree.extend({ } }, }), + + start: function () { + var self = this; + return this._super.apply(this, arguments).then(function () { + if (self.invalidDomain) { + var msg = _t("This domain is not supported."); + self.$el.html(msg); + } + }); + }, + + _initialize: function (domain) { // Check if the domain starts with implicit "&" operators and make them // explicit. As the DomainSelector is a specialization of a DomainTree, -- cgit v1.2.3 From 9fa597c7ec46c5fe446ab8cf6344ae31a079b044 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 29 Jan 2018 16:41:26 +0100 Subject: [FIX] web: sequence handlers on modal's one2many list From a form view (say Bill of materials) Edit the form Click on a bom line Click on the external button that makes the product form pop up change the order of suppliers on that product Before this commit, a JS traceback was raised This was because the changing object was not present in the localData that the Model object holds or more accurately, it was not the **right** model object that was targetted and this was due to the propagation of the resequence event After this commit, no error is thrown, and the resequencing works as expected OPW 807196 --- .../web/static/src/js/fields/relational_fields.js | 1 + .../static/tests/fields/relational_fields_tests.js | 87 ++++++++++++++++++++++ 2 files changed, 88 insertions(+) (limited to 'addons/web') diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index c399ffebe88..ee5b8c7726c 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -1104,6 +1104,7 @@ var FieldX2Many = AbstractField.extend({ * @param {OdooEvent} event */ _onResequence: function (event) { + event.stopPropagation(); var self = this; this.trigger_up('freeze_order', {id: this.value.id}); var rowIDs = event.data.rowIDs.slice(); diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index be922d3fa1a..31bd9183f58 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -1321,6 +1321,93 @@ QUnit.module('relational_fields', { form.destroy(); }); + QUnit.test('X2Many sequence list in modal', function (assert) { + assert.expect(5); + + this.data.partner.fields.sequence = {string: 'Sequence', type: 'integer'}; + this.data.partner.records[0].sequence = 1; + this.data.partner.records[1].sequence = 2; + this.data.partner.onchanges = { + sequence: function (obj) { + if (obj.id === 2) { + obj.sequence = 1; + assert.step('onchange sequence'); + } + }, + }; + + this.data.product.fields.turtle_ids = {string: 'Turtles', type: 'one2many', relation: 'turtle'}; + this.data.product.records[0].turtle_ids = [1]; + + this.data.turtle.fields.partner_types_ids = {string: "Partner", type: "one2many", relation: 'partner'}; + this.data.turtle.fields.type_id = {string: "Partner Type", type: "many2one", relation: 'partner_type'}; + + this.data.partner_type.fields.partner_ids = {string: "Partner", type: "one2many", relation: 'partner'}; + this.data.partner_type.records[0].partner_ids = [1,2]; + + testUtils.createAsyncView({ + View: FormView, + model: 'product', + data: this.data, + arch: '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '', + archs: { + 'partner_type,false,form': '
', + 'partner,false,list': '' + + '' + + '' + + '', + }, + res_id: 37, + mockRPC: function (route, args) { + if (route === '/web/dataset/call_kw/product/read') { + return $.when([{id: 37, name: 'xphone', display_name: 'leonardo', turtle_ids: [1]}]); + } + if (route === '/web/dataset/call_kw/turtle/read') { + return $.when([{id: 1, type_id: [12, 'gold']}]); + } + if (route === '/web/dataset/call_kw/partner_type/get_formview_id') { + return $.when(false) + } + if (route === '/web/dataset/call_kw/partner_type/read') { + return $.when([{id: 12, partner_ids: [1,2], display_name: 'gold'}]) + } + if (route === '/web/dataset/call_kw/partner_type/write') { + assert.step('partner_type write'); + } + return this._super.apply(this, arguments); + }, + }).then(function(form) { + form.$buttons.find('.o_form_button_edit').click(); + form.$('.o_data_cell').click(); + form.$('.o_external_button').click(); + + var $modal = $('.modal-dialog'); + assert.equal($modal.length, 1, + 'There should be 1 modal opened'); + + var $handles = $modal.find('.ui-sortable-handle'); + assert.equal($handles.length, 2, + 'There should be 2 sequence handlers'); + + testUtils.dragAndDrop($handles.eq(1), $modal.find('tbody tr').first()); + + // Saving the modal and then the original model + $modal.find('.modal-footer .btn-primary').click(); + form.$buttons.find('.o_form_button_save').click(); + + assert.verifySteps(['onchange sequence', 'partner_type write']); + + form.destroy(); + }); + }); + QUnit.test('autocompletion in a many2one, in form view with a domain', function (assert) { assert.expect(1); -- cgit v1.2.3