From 387c1edb9c0c39202af88b809da88fa71fa995b7 Mon Sep 17 00:00:00 2001 From: Odoo Translation Bot Date: Sun, 25 Nov 2018 03:17:33 +0100 Subject: [I18N] Update translation terms from Transifex --- addons/web/i18n/et.po | 15 ++++++------ addons/web/i18n/it.po | 66 +++++++++++++++++++++++++++++---------------------- 2 files changed, 46 insertions(+), 35 deletions(-) (limited to 'addons/web') diff --git a/addons/web/i18n/et.po b/addons/web/i18n/et.po index 0e2dfd2cf3a..47cb0c62408 100644 --- a/addons/web/i18n/et.po +++ b/addons/web/i18n/et.po @@ -3,20 +3,21 @@ # * web # # Translators: -# Martin Trigaux, 2017 +# Gert Valdek , 2017 # Arma Gedonsky , 2017 # Rivo Zängov , 2017 -# Eneli Õigus , 2017 -# Gert Valdek , 2017 -# Egon Raamat , 2017 # Marek Pontus, 2018 +# Eneli Õigus , 2018 +# Egon Raamat , 2018 +# Martin Trigaux, 2018 +# msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-07-27 11:56+0000\n" -"PO-Revision-Date: 2018-07-27 11:56+0000\n" -"Last-Translator: Marek Pontus, 2018\n" +"PO-Revision-Date: 2017-09-20 10:24+0000\n" +"Last-Translator: Martin Trigaux, 2018\n" "Language-Team: Estonian (https://www.transifex.com/odoo/teams/41243/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -511,7 +512,7 @@ msgstr "Kas oled kindel, et soovid eemaldada selle filtri?" #: code:addons/web/static/src/js/views/calendar/calendar_controller.js:304 #, python-format msgid "Are you sure you want to delete this record ?" -msgstr "Kas oled kindel, et soovd selle kirje kustutada?" +msgstr "Kas oled kindel, et soovid selle kirje kustutada?" #. module: web #. openerp-web diff --git a/addons/web/i18n/it.po b/addons/web/i18n/it.po index bb651472252..8ab69c4179d 100644 --- a/addons/web/i18n/it.po +++ b/addons/web/i18n/it.po @@ -17,6 +17,7 @@ # Léonie Bouchat , 2018 # Francesco Garganese , 2018 # Paolo Valier, 2018 +# Sergio Zanchetta , 2018 # msgid "" msgstr "" @@ -24,7 +25,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-07-27 11:56+0000\n" "PO-Revision-Date: 2017-09-20 10:24+0000\n" -"Last-Translator: Paolo Valier, 2018\n" +"Last-Translator: Sergio Zanchetta , 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" @@ -203,7 +204,7 @@ msgstr "'%s' non è un intero corretto" #: code:addons/web/static/src/js/fields/field_utils.js:504 #, python-format msgid "'%s' is not a correct monetary field" -msgstr "" +msgstr "\"%s\" non è un campo monetario corretto" #. module: web #. openerp-web @@ -231,7 +232,7 @@ msgstr "(senza etichetta)" #: code:addons/web/static/src/js/fields/field_utils.js:256 #, python-format msgid "1 record" -msgstr "" +msgstr "1 record" #. module: web #: model:ir.ui.view,arch_db:web.menu_secondary @@ -552,6 +553,8 @@ 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 "" +"Impossibile esportare %s. I campi binari devono avere il contenuto " +"codificato in base64 per essere esportati in Excel." #. module: web #. openerp-web @@ -675,7 +678,7 @@ msgstr "Chiuso" #: code:addons/web/static/src/xml/kanban.xml:52 #, python-format msgid "Column title" -msgstr "" +msgstr "Titolo colonna" #. module: web #. openerp-web @@ -889,7 +892,7 @@ msgstr "Elimina" #: code:addons/web/static/src/js/views/list/list_editable_renderer.js:502 #, python-format msgid "Delete row " -msgstr "" +msgstr "Elimina riga" #. module: web #. openerp-web @@ -922,7 +925,7 @@ msgstr "Annulla" #: code:addons/web/static/src/js/widgets/data_export.js:336 #, python-format msgid "Do you really want to delete this export template?" -msgstr "" +msgstr "Eliminare veramente questo modello esportato?" #. module: web #. openerp-web @@ -950,7 +953,7 @@ msgstr "Dominio" #: code:addons/web/static/src/js/widgets/domain_selector.js:520 #, python-format msgid "Domain error" -msgstr "" +msgstr "Errore dominio" #. module: web #. openerp-web @@ -1018,7 +1021,7 @@ msgstr "Modifica Colonna" #: code:addons/web/static/src/xml/base.xml:613 #, python-format msgid "Edit Domain" -msgstr "" +msgstr "Modifica dominio" #. module: web #. openerp-web @@ -1302,6 +1305,9 @@ msgid "" "\n" "Tip: try to flip axis, filter further or reduce the number of measures." msgstr "" +"Per compatibilità con Excel, non è possibile esportare i dati se ci sono più di 256 colonne.\n" +"\n" +"Suggerimento: provare a invertire gli assi, filtrare ulteriormente o ridurre il numero di misure." #. module: web #. openerp-web @@ -1408,7 +1414,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:611 #, python-format msgid "Invalid domain" -msgstr "" +msgstr "Dominio non valido" #. module: web #. openerp-web @@ -1430,7 +1436,7 @@ msgstr "" #: code:addons/web/static/src/js/widgets/debug_manager.js:208 #, python-format msgid "JS Mobile Tests" -msgstr "" +msgstr "Prove JS per cellulare" #. module: web #. openerp-web @@ -1772,7 +1778,7 @@ msgstr "Nessun metadata disponibile" #: code:addons/web/static/src/js/fields/field_utils.js:254 #, python-format msgid "No records" -msgstr "" +msgstr "Nessun record" #. module: web #. openerp-web @@ -1831,7 +1837,7 @@ msgstr "Odoo Apps saranno disponibili presto" #: code:addons/web/static/src/js/services/crash_manager.js:157 #, python-format msgid "Odoo Client Error" -msgstr "" +msgstr "Errore client Odoo" #. module: web #. openerp-web @@ -1845,14 +1851,14 @@ msgstr "Odoo Enterprise" #: code:addons/web/static/src/js/services/crash_manager.js:119 #, python-format msgid "Odoo Error" -msgstr "" +msgstr "Errore Odoo" #. module: web #. openerp-web #: code:addons/web/static/src/js/services/crash_manager.js:59 #, python-format msgid "Odoo Session Expired" -msgstr "" +msgstr "Sessione Odoo scaduta" #. module: web #. openerp-web @@ -1860,7 +1866,7 @@ msgstr "" #: code:addons/web/static/src/js/services/crash_manager.js:198 #, python-format msgid "Odoo Warning" -msgstr "" +msgstr "Avviso Odoo" #. module: web #. openerp-web @@ -1915,6 +1921,8 @@ msgstr "Sono validi solo numeri interi." msgid "" "Only employee can access this database. Please contact the administrator." msgstr "" +"Solo i dipendenti possono accedere a questo database. Contattare " +"l'amministratore." #. module: web #. openerp-web @@ -2122,7 +2130,7 @@ msgstr "Trimestre" #: code:addons/web/static/src/js/widgets/model_field_selector.js:455 #, python-format msgid "Relation not allowed" -msgstr "" +msgstr "Relazione non ammessa" #. module: web #. openerp-web @@ -2185,7 +2193,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:222 #, python-format msgid "Run JS Mobile Tests" -msgstr "" +msgstr "Esegui prove JS per cellulare" #. module: web #. openerp-web @@ -2318,7 +2326,7 @@ msgstr "Seleziona " #: code:addons/web/static/src/xml/base.xml:615 #, python-format msgid "Select a model to add a filter." -msgstr "" +msgstr "Selezionare un modello per aggiungere un filtro." #. module: web #. openerp-web @@ -2436,7 +2444,7 @@ msgstr "Accendi" #: code:addons/web/static/src/js/widgets/domain_selector.js:567 #, python-format msgid "Syntax error" -msgstr "" +msgstr "Errore di sintassi" #. module: web #. openerp-web @@ -2547,6 +2555,8 @@ msgid "" "There are too many rows (%s rows, limit: 65535) to export as Excel 97-2003 " "(.xls) format. Consider splitting the export." msgstr "" +"Impossibile esportare nel formato Excel 97-2003 (.xls) (%s righe, limite: " +"65535). Valutare di suddividere l'esportazione." #. module: web #. openerp-web @@ -2560,7 +2570,7 @@ msgstr "C'è stato un problema durante il caricamento del vostro file" #: code:addons/web/static/src/js/widgets/domain_selector.js:459 #, python-format msgid "This domain is not supported." -msgstr "" +msgstr "Questo dominio non è supportato." #. module: web #. openerp-web @@ -2726,7 +2736,7 @@ msgstr "Senza nome" #: code:addons/web/static/src/js/views/pivot/pivot_view.js:95 #, python-format msgid "Untitled" -msgstr "" +msgstr "Senza titolo" #. module: web #. openerp-web @@ -2819,18 +2829,18 @@ msgstr "" #. module: web #: model:ir.ui.view,arch_db:web.qunit_mobile_suite msgid "Web Mobile Tests" -msgstr "" +msgstr "Test web per dispositivo mobile" #. module: web #: model:ir.ui.view,arch_db:web.qunit_suite msgid "Web Tests" -msgstr "" +msgstr "Test web" #. module: web #: model:ir.ui.view,arch_db:web.external_layout_boxed #: model:ir.ui.view,arch_db:web.external_layout_standard msgid "Web:" -msgstr "" +msgstr "Web:" #. module: web #. openerp-web @@ -2852,7 +2862,7 @@ msgstr "Settimana " #: code:addons/web/static/src/js/widgets/rainbow_man.js:32 #, python-format msgid "Well Done!" -msgstr "" +msgstr "Ben fatto!" #. module: web #. openerp-web @@ -3030,7 +3040,7 @@ msgstr "circa un'ora fa" #: code:addons/web/static/src/xml/base.xml:644 #, python-format msgid "all records" -msgstr "" +msgstr "tutti i record" #. module: web #: model:ir.model,name:web.model_base @@ -3042,7 +3052,7 @@ msgstr "base" #: code:addons/web/static/src/js/widgets/domain_selector.js:28 #, python-format msgid "child of" -msgstr "" +msgstr "figlio di" #. module: web #. openerp-web @@ -3291,7 +3301,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:609 #, python-format msgid "record(s)" -msgstr "" +msgstr "record" #. module: web #. openerp-web -- cgit v1.2.3 From c9e32872c00e8b324a540fb2cf5045b67420b364 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 20 Nov 2018 12:52:51 +0000 Subject: [FIX] web: list default_sort with multiple fields Define a x2m tree view with a default_sort including more than 1 field to order the list against Before this commit, the second field was never used After this commit, it is used OPW 1909785 closes odoo/odoo#28840 --- .../web/static/src/js/views/basic/basic_model.js | 2 +- .../static/tests/fields/relational_fields_tests.js | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 0372f7cd5e7..3ee8e001258 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -4242,7 +4242,7 @@ var BasicModel = AbstractModel.extend({ if (orderData1 > orderData2) { return order.asc ? 1 : -1; } - return compareRecords(record1ID, record2ID, level + 1); + return compareRecords(resId1, resId2, level + 1); }; utils.stableSort(list.res_ids, compareRecords); } diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 61f2e8f0369..f562e799b82 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -2732,6 +2732,48 @@ QUnit.module('relational_fields', { form.destroy(); }); + QUnit.test('x2many default_order multiple fields', function (assert) { + assert.expect(7); + + this.data.partner.records = [ + {int_field: 10, id: 1, display_name: "record1"}, + {int_field: 12, id: 2, display_name: "record2"}, + {int_field: 11, id: 3, display_name: "record3"}, + {int_field: 12, id: 4, display_name: "record4"}, + {int_field: 10, id: 5, display_name: "record5"}, + {int_field: 10, id: 6, display_name: "record6"}, + {int_field: 11, id: 7, display_name: "record7"}, + ]; + + this.data.partner.records[0].p = [1, 7, 4, 5, 2, 6, 3]; + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '
', + res_id: 1, + }); + + var $recordList = form.$('.o_field_x2many_list .o_data_row'); + var expectedOrderId = ['1', '5', '6', '3', '7', '2', '4']; + + _.each($recordList, function(record, index) { + var $record = $(record); + assert.strictEqual($record.find('.o_data_cell').eq(0).text(), expectedOrderId[index], + 'The record should be the right place. Index: ' + index); + }); + + form.destroy(); + }); + QUnit.test('many2many list add *many* records, remove, re-add', function (assert) { assert.expect(5); -- cgit v1.2.3 From ac5a1662f2ff1cc2287c1453920c80e78c617c0b Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 21 Nov 2018 16:37:40 +0000 Subject: [FIX] web: propagate can_create into the search popup When creating a SO line and clicking on search more for product_id Before this commit, every user had the button "Create" to create a product.product After this commit, only user in groups that actually can create a product have the button OPW 1910371 closes odoo/odoo#28924 --- .../web/static/src/js/fields/relational_fields.js | 1 + .../web/static/tests/views/view_dialogs_tests.js | 59 ++++++++++++++++++++++ 2 files changed, 60 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 dcbd9dc09fd..5a211b3ae0b 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -468,6 +468,7 @@ var FieldMany2One = AbstractField.extend({ initial_ids: ids ? _.map(ids, function (x) { return x[0]; }) : undefined, initial_view: view, disable_multiple_selection: true, + no_create: !self.can_create, on_selected: function (records) { self.reinitialize(records[0]); self.activate(); diff --git a/addons/web/static/tests/views/view_dialogs_tests.js b/addons/web/static/tests/views/view_dialogs_tests.js index b18c552830f..f6b2b7cd441 100644 --- a/addons/web/static/tests/views/view_dialogs_tests.js +++ b/addons/web/static/tests/views/view_dialogs_tests.js @@ -420,6 +420,65 @@ QUnit.module('Views', { form.destroy(); }); + QUnit.test('propagate can_create onto the search popup o2m', function (assert) { + assert.expect(3); + + this.data.instrument.records = [ + {id: 1, name: 'Tromblon1'}, + {id: 2, name: 'Tromblon2'}, + {id: 3, name: 'Tromblon3'}, + {id: 4, name: 'Tromblon4'}, + {id: 5, name: 'Tromblon5'}, + {id: 6, name: 'Tromblon6'}, + {id: 7, name: 'Tromblon7'}, + {id: 8, name: 'Tromblon8'}, + ]; + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '
' + + '' + + '' + + '', + res_id: 1, + archs: { + 'instrument,false,list': ''+ + ''+ + '', + 'instrument,false,search': ''+ + ''+ + '', + }, + viewOptions: { + mode: 'edit', + }, + + mockRPC: function(route, args) { + if (args.method === 'get_formview_id') { + return $.when(false); + } + return this._super(route, args); + }, + }); + + form.$('.o_field_widget[name="instrument"] .o_input').click(); + + assert.notOk($('.ui-autocomplete a:contains(Create and Edit)').length, + 'Create and edit not present in dropdown'); + + $('.ui-autocomplete a:contains(Search More)').trigger('mouseenter').trigger('click'); + + var $modal = $('.modal-dialog.modal-lg'); + + assert.strictEqual($modal.length, 1, 'Modal present'); + + assert.strictEqual($modal.find('.modal-footer button').text(), "Cancel", + 'Only the cancel button is present in modal'); + + form.destroy(); + }); }); }); -- cgit v1.2.3 From 23313583b2b111610abb1940034859b07282f33b Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 26 Nov 2018 12:54:39 +0000 Subject: [FIX] web: progressbar updates on field reset Have a form record with a progress bar Modify the max_value of the progress, as well as the current_value bar through an onchange Before this commit, the new max_value was not taken into account After this commit, it is. closes odoo/odoo#29056 --- addons/web/static/src/js/fields/basic_fields.js | 12 +++++++ .../web/static/tests/fields/basic_fields_tests.js | 42 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) (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 b52567d5c7a..fd156f2d00b 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -2014,6 +2014,18 @@ var FieldProgressBar = AbstractField.extend({ this.$('.o_progressbar_value').focus().select(); } }, + /** + * The progress bar has more than one field/value to deal with + * i.e. max_value + * + * @override + * @private + */ + _reset: function () { + this._super.apply(this, arguments); + var new_max_value = this.recordData[this.nodeOptions.max_value]; + this.max_value = new_max_value !== undefined ? new_max_value : this.max_value; + }, isSet: function () { return true; }, diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 2fbc09a5622..d08f898dba1 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -4737,6 +4737,48 @@ QUnit.module('basic_fields', { form.destroy(); }); + + QUnit.module('FieldProgressBar'); + + QUnit.test('Field ProgressBar: max_value should update', function (assert) { + assert.expect(2); + + this.data.partner.records = this.data.partner.records.slice(0,1); + this.data.partner.records[0].qux = 2; + + this.data.partner.onchanges = { + display_name: function (obj) { + obj.int_field = 999; + obj.qux = 5; + } + }; + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '
' + + '' + + '' + + '' + + '', + res_id: 1, + viewOptions: { + mode: 'edit', + }, + }); + + assert.strictEqual(form.$('.o_progressbar_value').text(), '10 / 2', + 'The initial value of the progress bar should be correct'); + + // trigger the onchange + form.$('.o_input[name=display_name]').val('new name').trigger('input'); + + assert.strictEqual(form.$('.o_progressbar_value').text(), '999 / 5', + 'The value of the progress bar should be correct after the update'); + + form.destroy(); + }); }); }); }); -- cgit v1.2.3 From 2e109db01b23077044e89bcffd8802c2f95c291d Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 28 Nov 2018 09:35:39 +0000 Subject: [FIX] web: context orderedBy not propagated to x2m Have: - Model A with a x2m to model B - Object A with multiple objects B in x2m (that will be sorted) - On the list view of model A, click on a column to sort by a field - this field shall not exist in B - open a record A (towards form view) Before this commit, the sorting of the x2m crashed, because the key orderedBy was propagated Due to commit e713ed2a69af9fe97fbe2d54843adc8f1ce689aa After this commit, it doesn't crash OPW 1913133 closes odoo/odoo#29094 --- addons/web/static/src/js/views/abstract_view.js | 1 + .../web/static/src/js/views/basic/basic_model.js | 2 +- .../static/tests/fields/relational_fields_tests.js | 35 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/views/abstract_view.js b/addons/web/static/src/js/views/abstract_view.js index 5756e6cd301..85ab584fd3f 100644 --- a/addons/web/static/src/js/views/abstract_view.js +++ b/addons/web/static/src/js/views/abstract_view.js @@ -98,6 +98,7 @@ var AbstractView = Class.extend({ modelName: params.modelName, res_id: params.currentId, res_ids: params.ids, + orderedBy: params.context ? params.context.orderedBy : [], }; if (params.modelName) { this.loadParams.modelName = params.modelName; diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 3ee8e001258..04a10b46442 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -3332,7 +3332,7 @@ var BasicModel = AbstractModel.extend({ model: params.modelName, offset: params.offset || (type === 'record' ? _.indexOf(res_ids, res_id) : 0), openGroupByDefault: params.openGroupByDefault, - orderedBy: params.orderedBy || (params.context && params.context.orderedBy) || [], + orderedBy: params.orderedBy || [], orderedResIDs: params.orderedResIDs, parentID: params.parentID, rawContext: params.rawContext, diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index f562e799b82..facc8132d7b 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -2914,6 +2914,41 @@ QUnit.module('relational_fields', { form.destroy(); }); + QUnit.test('one2many from a model that has been sorted', function (assert) { + assert.expect(1); + + /* On a standard list view, sort your records by a field + * Click on a record which contains a x2m with multiple records in it + * The x2m shouldn't take the orderedBy of the parent record (the one on the form) + */ + + this.data.partner.records[0].turtles = [3, 2]; + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch:'
' + + '' + + '' + + '' + + '' + + '' + + '
', + res_id: 1, + context: { + orderedBy: [{ + name: 'foo', + asc: false, + }] + }, + }); + + assert.strictEqual(form.$('.o_field_one2many[name=turtles] tbody').text().trim(), "kawablip", + 'The o2m should not have been sorted.'); + + form.destroy(); + }); + QUnit.test('O2M List with pager, decoration and default_order: add and cancel adding', function (assert) { assert.expect(3); -- cgit v1.2.3