summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
AgeCommit message (Collapse)Author
2017-05-02[FIX] web: min/max integerNicolas Martinelli
In PostgreSQL, a field of type `integer` must be in the range -2147483648 to +2147483647. If the user enters a lower or a larger value, a traceback is thrown. opw-740286
2017-03-28[MERGE] forward port branch saas-11 up to 8bab7aebd62Christophe Simonis
2017-03-28[MERGE] forward port branch 9.0 up to e876becada8Christophe Simonis
2017-03-28[MERGE] forward port branch saas-6 up to 7bcfa2b52a3Christophe Simonis
2017-03-28[MERGE] forward port branch saas-11 up to c2569b9df1bChristophe Simonis
2017-03-24[MERGE] forward port branch 9.0 up to 8376f538b56Christophe Simonis
2017-03-24[MERGE] forward port branch saas-6 up to 9d04d14669fChristophe Simonis
2017-02-03[FIX] web: do not call session load_qweb on frontendqsm-odoo
Since commits 2a8a17024d2b46f3f8837a8672334a7dff3abd1b and 9c68bc74827864a3c6c21be8ead1b2ed3d122d73, the session is not started by the webclient anymore but directly by the session service instead, and the session info is found in the DOM instead of by RPC. Because of that, the session is started in the frontend and other non-backend environments which caused a JS error while trying to load qweb (as no qweb has to be loaded). This commit makes the session start check if it is a non-backend environment and only initialize session info (from DOM) in that case.
2017-01-23[MERGE] forward port branch 9.0 up to 0997a1cf6dcChristophe Simonis
2017-01-19[FIX] web: date < 01-01-1900Nicolas Martinelli
The Python method `strftime` raises an error when the date is older than 01-01-1900 ("The datetime strftime() methods require year >= 1900"). If the user mistyped the date (or was expecting 01-01-16 to be converted into 01-01-2016), this can lead errors since the ORM uses this method frequently. opw-702313
2017-01-19[FIX] web: date < 01-01-1900Nicolas Martinelli
The Python method `strftime` raises an error when the date is older than 01-01-1900 ("The datetime strftime() methods require year >= 1900"). If the user mistyped the date (or was expecting 01-01-16 to be converted into 01-01-2016), this can lead errors since the ORM uses this method frequently. opw-702313
2016-12-01[MERGE] forward port branch saas-11 up to 7842498Christophe Simonis
2016-12-01[MERGE] forward port branch 9.0 up to 5bed95fChristophe Simonis
2016-11-30[FIX] web: date autocompletionNicolas Martinelli
When a user fills partially a date or datetime field, the system will somehow autocomplete the value entered. For example, if the user enters "11//11" then clicks on the Tab key, it will be completed as "11/11/0000". However, the year 0000 is not recognized in Python, and this causes a crash upon saving. opw-695035
2016-11-29[FIX] website_sale: format amount according to currency client sideJeremy Kersten
This commit closes #1103, closes #11553
2016-11-08[MERGE] forward port branch saas-12 up to 6386037Christophe Simonis
2016-11-08[MERGE] forward port branch saas-11 up to c19f546Christophe Simonis
2016-11-08[MERGE] forward port branch 9.0 up to b795755Christophe Simonis
2016-11-07[FIX] web: correctly saves last change in wizards with many2omanyChristophe Matthieu
With this change, form_relational_widgets will wait for the 'web.ListEditor' module to be loaded before patching the list view. This is particularly important for wizards containing and editable list view. Note that to achieve this, I had to fix a horrible hack in session.
2016-11-04[FIX] bus,im_odoo_support, web*: fix various memory leaksChristophe Matthieu
* Tip are never destroyed when change view mode * unbind methods * mail: memory leak with unbind methods * web: memory leak because 'ui-autocomplete' is never destroyed * web_editor: memory leak for wrong unbind on destroy * web: memory leak: must remove fileupload handler * bus: memory leak: correctly debind handlers on window in bus.Bus * remove handlers on switch buttons and views $buttons * remove handlers on breadcrumbs * web: memory leak: correctly debind handlers * im_odoo_support: memory leak: remove fileupload handler odoo_support Note: part of this commit was actually authored by aab
2016-10-27[MERGE] forward port branch saas-12 up to 6f8e40cChristophe Simonis
2016-10-27[MERGE] forward port branch saas-11 up to 1304d13Christophe Simonis
2016-10-27[MERGE] forward port branch 9.0 up to 25616b9Christophe Simonis
2016-10-24[FIX] web: BufferedDataSet write to length fieldNicolas Lempereur
Underscore method _.each expects an array like object when a "length" property is present. This was an issue with a record having a numeric "length" field set to a non-negative value. opw-691070
2016-09-28[REF] web: process views arch in data managerAaron Bohy
A refactoring of the js views is in progress. Those new views are used in web studio, and this change is part of it. This is necessary to allow web studio to correctly fetch data from the server when rendering a preview. Note: this is necessary for special widgets (status bar, selection, radio widgets)
2016-09-28[IMP] web: allow to clear the cache in data managerMartin Geubelle
Sometimes, we need better control on the cache. For example, if a view or an action has been changed, it is required to make sure that the correct data is loaded.
2016-09-28[FIX] web: add modal-body class when renderElementAdrien Dieudonne
2016-09-09[MERGE] forward port branch saas-12 up to 9f28139Christophe Simonis
2016-09-09[MERGE] forward port branch saas-11 up to dc4d6b6Christophe Simonis
2016-09-09[MERGE] forward port branch saas-10 up to e1bd405Christophe Simonis
2016-09-09[MERGE] forward port branch 9.0 up to af87c57Christophe Simonis
2016-09-06[FIX] web, web-kanban: update dataset size at record's drop in a columnPierre Masereel
When we drag and drop a record in a folded column, the number of elements in this column displayed in the column title is not updated. This issue is present because when a record is droped in a column its id is not added to the dataset of its new column. To fix this, we had to add the id of the record in the dataset, and override the method 'add_ids' in 'DataSetSearch' to have the size of the dataset equal to the number of ids in it. We have replicated the behaviour of the function 'remove_ids' in the new function 'add_ids'.
2016-08-31[FIX] web: avoid autoresize duplicatesDenis Vermylen (dve)
In web_planner, changing pages would take more and more time after a few clicks if autoresize was called on textareas. Every time we would change page, autoresize was called on all textareas and added an additional textarea for each one, doubling the amount on each page change. The autoresize function in dom_utils was checking too shallowly for duplicates and created a new textarea where autoresize would again be called upon on a later stage. This commit fixes both problems.
2016-08-22[FIX] web: Set correct debug mode value in headers variable 'X-Debug-Mode'Yannick Tivisse
For the need of the next commit, we have to know when making a request from an RPC call in which debug mode we are. Previously, the value was always 'true' if we were in debug mode. Now it will return 'true' if we are in simple debug mode and 'assets' if we are in the other one. (this is the current behavior for the simple WebRequest). Why do we need to know that? When loading the settings dashboard, an rpc request to /web/dataset/call_kw to load the view is accessing the odoo.debug @property method. This value is used in the template to decide which buttons to display to activate or deactivate the debug mode.
2016-08-20[MERGE] forward port branch saas-12 up to 9ad5f26Christophe Simonis
2016-08-20[MERGE] forward port branch saas-11 up to 3a2147dChristophe Simonis
2016-08-20[MERGE] forward port branch saas-10 up to bc1a0a3Christophe Simonis
2016-08-19[MERGE] forward port branch 9.0 up to 58cbcbaChristophe Simonis
2016-08-17[FIX] web: fix DataSetSearch to avoid race conditionsDenis Ledoux
This is a following of revision ab8a93c85268a4d7fc0bef10c0f39fb25d1530c6 This revision solves a new case: when quickly performing a second search after one which has not been resolved yet in a kanban view, and the second search is resolved before the first, it was not possible to load the form by clicking the card of the kanban, it leaded to a `Could not find id in dataset` web client error This was because the ids of the dataset were altered with the ids of the first search (the one that lasted longer), while the records displayed were the ones of the second search (the one that finished first) opw-682362
2016-07-20[IMP] web: logout client action: prevent toggling app switcherAaron Bohy
When the webclient calls do_action from the app_switcher, it toggles it when the returned deferred is resolved. The logout client action didn't return anything, so when logging out from the app switcher, the webclient directly toggled the app_switcher and displayed the last opened action if any, and a gray screen otherwise. This commit makes the client action return a deferred which is never resolved, so the app_switcher isn't toggled when logging out.
2016-07-15[MERGE] forward port branch saas-11 up to a62b8cfChristophe Simonis
2016-07-13[FIX] web,website,point_of_sale: session.debug valueqsm-odoo
Now that the debug URL parameter can be equal to "assets", the session debug variable has to be updated to not only be true or false. Now, its value is false if the debug parameter is not specified in the url and a the URL parameter string value otherwise (or 1 if the value is an empty string). Also modify all redirection which kept the debug mode to also keep =assets. Use the $.param.querystring function.
2016-07-06[FIX] web: qweb: correctly set `preprocess_node` on qweb engineSimon Lejeune
issue: xml template are not translated anymore rev d56b35e2 moved qweb code inside the `qweb.js` file and also changed the behavior with the introduction of a `QWeb` factory returning instances of qweb rendering engine. However, we have to set on the rendering engine instance a `preprocess_node` function that will translate the qweb templates. The solution for this issue (also introduced with rev d56b35e2) was to set this function on the prototype of the QWeb factory, and it was obviously not enough as it has to be attached to the rendering engine instance. In order to benefit from the fact that the `preprocess_node` function is attached to the prototype of the QWeb factory, we could attach it to the rendering engine instance with something like `qweb.preprocessed_node = this.preprocessed_node`, however i find that conceptually attaching a translate function to a factory does not make sense, si i simply made `preprocess_node` a free function and i set it on rendering engine instance.
2016-07-06[MERGE] forward port of branch saas-11 up to e7190cbChristophe Simonis
2016-07-05[MERGE] forward port of branch saas-10 up to 74b51d3Christophe Simonis
2016-07-05[MERGE] forward port of branch 9.0 up to 489ea42Christophe Simonis
2016-07-05[FIX] web: parsing of date with abbreviated month/dayDenis Ledoux
When using the abbreviated month in the language date format (`%b`), e.g. `%d %b %Y` in some languages, the parsing of the date from this format to the database format (YYYY-mm-dd) failed because of a dot `.` added from time to time to the end of the abbreviated name e.g., in French, `5 juil. 2016` This is a bug of `moment.js` < 2.13.0, handling badly this dot. This is solved from `moment.js` 2.13.0, thanks to the below revision moment/moment@41fdb58572546740c3a840ebd36fbe9e1bcdc9cb moment/moment#3078 Unfortunately, we cannot update this library to its latest release in stable release of Odoo (e.g. 9.0), as this is seen as an unstable change (if some API changes occured in the given library) Instead, if the parsing of the date fails with the strict mode (meaning the date must respect the format exactly), we perform a second pass without the strict mode, so this dot will be ignored, and the date can be correctly parsed. The issue can be reproduced by loading the French language, and setting `%d %b %Y` as date format, and then performing an advanced search on a date field. The value of the date in the advanced search will be empty without this revision (for the months having more than 4 chars, other than `mars`, `mai`, `juin`, `aout`). Fixes #11854 opw-682534
2016-07-05[FIX] web: translation: don't reset database on `set_bundle`Simon Lejeune
set_bundle is called twice (one time by the session, another time by the web_editor). As the `set_bundle` actually drop the dict of translations instead of updating it and as web_editor only load the terms of its module, depending on which call to `set_bundle` ends first result on having your translations or not. This commit update the database of translation instead of dropping it, which fixe the current issue (the dict of traductions empty of the traduction you really need) but another fix would be to remove the useless call by web_editor when launched in the backend (which is probably there because it was needed when the web_editor was only working in the website).
2016-07-04[FIX] web: dialog close with a reasonDenis Ledoux
In the below revision: c0db6aec56d383d173fa56b1a2dec2e42495911b The dialog close `reason` was introduced to not reload the current form if the dialog has been closed for a reason (e.g. a window action was returned by the server). This is to prevent the record reload, which: - Is useless, as another action has been launched and the user therefore redirected elsewhere - Can fail, in the case the initial action deleted the current record (e.g. when merging a lead in an opportunity, the lead is removed, and therefore this is not possible to reload it). opw-680180
2016-07-04[REF] web_editor: code refactoring and simplificationqsm-odoo
* Remove dead code + optimization * Use Dialog API from web module * Reorganize files * Correct buggy $() function for snippet option class * Add comments * Fix the snippet parent navigation : If a page contained a three level snippet structure (i.e A contains B contains C), when editing the following bug occured : If B or C was selected first, parenting buttons were correctly set. But if selecting A then C, clicking on the parent lead to going back on A instead of going on B. * Fix snippet thumbnail layout * Better isolate ui css from themes * MediaDialog image list : prevent displaying empty attachments * ...