summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
AgeCommit message (Collapse)Author
2018-09-06[MERGE] forward port branch 10.0 up to 72f76caa39fChristophe Simonis
2018-09-06[FIX] web: relativedelta>11months work as expectedNicolas Lempereur
Since march 2015, using in a domain "relativedelta(months=X)" with X being bigger than 11 or lower than -11 would result in an error. This is because in the refactoring adding modules (e8a00bc50d) the two functions divmod and utils.divmod with different implementation in pyeval.js were replaced by one function divmod in web.utils module. But there was still an usage of the removed implementation. opw-1880766 closes #26816
2018-07-16[MERGE] forward port branch 10.0 up to 13e321325b9Christophe Simonis
2018-07-16[FIX] web: groupby product on package types triggers a js errorlen-odoo
On a database where many modules are installed (e.g. runbot all), with the option "manage available packaging options per products", doing a groupby "product" on the "package type" list view triggers a js error. It comes from the fact that the fixed_group variable contains a "length" attribute; the _().each function uses this to determine (erroneously) that the object is an array. It thus uses fixed_group[0] to get an undefined, and then tries to access a method of undefined. We replace the each by a simple js loop. opw 1863576
2018-05-18[MERGE] forward port branch 10.0 up to 9001a75f23cChristophe Simonis
2018-05-18[FIX] web: get_file handles arbitrary AND serialized exceptionsLucas Perais (lpe)
Commit bcd4c90 was intendend to make get_file handle uncaught/unserialized exceptions in the context of a http request The drawback is that when get_file received a serialized exception (route: /report/download) the JS modal was empty in that case This commit handles both the cases OPW 1848606 closes #24794
2018-05-02[MERGE] forward port branch 10.0 up to 79bbd1dcb8cChristophe Simonis
2018-04-26[FIX] web: `get_file` and CPU time exceededNicolas Martinelli
- Create a binary field which takes some time for computation. For example: ``` ding_dong = fields.Binary(compute='_compute_ding_dong') def _compute_ding_dong(self): if not self.env.context.get('bin_size'): while True: 3*3 for x in self: x.ding_dong = x.product_id.image_medium ``` - Run the server with a limited CPU time, for example: `--workers=2 --limit-time-cpu=10` - Download the file A JS traceback occurs, without any information about the real crash. The error management is simply not working: `JSON.parse` is called on a string which is not JSON-parseable. opw-1838832
2018-02-21[MERGE] forward port branch 10.0 up to 1512618d3e1Christophe Simonis
2018-02-21[MERGE] forward port branch 9.0 up to e544ec8df70Christophe Simonis
2018-02-20[FIX] web, web_editor: Better email validation with regex (JS)Romain Derie
This commit improves link creation in web editor. Before this commit, anything with a @​ would be considered as valid email which is obviously not the case. It would then be prefixed by 'mailto:'. This was causing 2 issues: - URL with @​ symbol in it would have 'mailto:' added as prefix, like google maps coordinates. eg: mailto:http://www.google.com/maps/whatever/@​312211.22,321321 - Incorrect emails would go through (eg: @​@​@​, ko@​k@​k@​, mail@​mail) Now, we will try to detect and identify valid emails from invalid emails from URLs. It will also handle 'mailto:' directly typed in the input. This commit comes with it's counterpart in enterprise https://github.com/odoo/enterprise/pull/1859 This closes #11984, closes #22936 Note that there is a WIP in master to use this new is_email function everywhere we try to validate emails. It will aim to uniformize email validation in odoo's javascript that are often performed with different mean here and there, some more permissive than others, some only checking for @​.
2018-01-12[MERGE] forward port branch 10.0 up to d76237e038aChristophe Simonis
2018-01-12[MERGE] forward port branch 9.0 up to 26d3b77a1deChristophe Simonis
2018-01-12[FIX] web: Kanban image not showing in some languagestbe-odoo
- In some languages the kanban images are not displayed because of a bug in human_size method in JS. This method translates the Unit Size for data and strip with the string with a comma as separator. When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result. This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit. Resulting in a bug in the method 'kanban_image'. opw #804973 #804970 #804648
2018-01-02[MERGE] forward port branch 10.0 up to e336dc38ca4Christophe Simonis
2017-12-19[FIX] web: prevent double translation in kanban viewGéry Debongnie
The kanban view uses a template which comes from the server, already translated. Before this commit, it tried to retranslate again the template in qweb.js, which may be a problem (in addition to the useless work): if some english string A is translated in B (french), but B is also a valid english string which is translated into C in french, then we will have a wrong result. In this commit, we simply add a flag to disable the translation process, which should also slightly improve the kanban view rendering performance.
2017-11-15[MERGE] forward port branch 10.0 up to 0fe7989e24fChristophe Simonis
2017-11-14[FIX] web: handle SessionExpiredException in the crash_managerfwi-odoo
2017-09-04[MERGE] forward port branch 10.0 up to c5df78f38bdChristophe Simonis
2017-09-01[FIX] account: reconciliation_widget: rounding of reconciliation_amount ↵Lucas Perais (lpe)
computation Use case: - a tax of 10%, computation method: percentage of tax included - a account_reconciliation_model with an amount of 90% - make a statement of 1.31 (or something weird when it comes to digits) - reconcile it with a counterpart - prefill that counterpart with the account_reconciliation just created - push on reconcile Before this commit, the amount that was computed was not rounded, resulting in making unbalanced account_moves (by 0.001) This was invisble since the display of monetary is rounded After this commit, the rounding is done according to the currency's parameters and produces correct move_lines OPW 751881
2017-07-28[MERGE] forward port branch 10.0 up to e6863851382Christophe Simonis
2017-07-28[FIX] web: change exception name from openerp to Odoo Yenthe V.G
The crash manager still used the old name for the exception. (PR #18522)
2017-05-02[MERGE] forward port branch 10.0 up to cc7ae17bd53Christophe Simonis
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 10.0 up to 72fa3e8bdaeChristophe Simonis
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-10[MERGE] forward port branch 10.0 up to ffd4442b06bChristophe 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 10.0 up to 6804085b8ceChristophe Simonis
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
2017-01-06[IMP] web: allow DomainSelector widget to be instanciated with a stringqsm-odoo
Before this commit, the DomainSelector had to be instanciated with an array-typed value which forced the user to use (and import) the pyeval module. Now, the conversion to array is done in the DomainSelector. This commit introduces a web.domainUtils module allowing to do the convertion array -> string and string -> array of a domain.
2016-12-05[REM] *: remove ir.needaction mixinJérome Maes
ir.needaction_mixin is not used anymore by the webclient. From 9.0, the concept has changed: this feature is now available in mail module, with the mail.thread mixin, and message_neeadction field. Remove all code handeling needaction bullet and counter on ir.ui.menu, knowing that since 9.0 webclient does not display the counter anymore. This code was, thus, useless and some RPC calls were done for nothing, and adapt accounting reconcialiation widget.
2016-12-01[MERGE] forward port branch 10.0 up to 5dc1c57Christophe Simonis
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-24[FIX] web: lazy loading the same file multiple times with loadJSqsm-odoo
Before this commit, if the loadJS method was called two times with the same url, the associated script was effectively put in the DOM only one time. However, the second call returned deferred was immediatly resolved while the script (added by the first call) might not be fully loaded yet. Now, calling loadJS for a same url multiple times will always return the same deferred, resolved when the associated script is fully loaded.
2016-11-23[REM] workflow: Remove workflow engine, documentation and testsYannick Tivisse
2016-11-15[REF] web_planner, *: refactor planner codeqsm-odoo
* Share code between website and backend * Do not do a [100ms - 500ms] RPC on each app change in the backend but do it only if the planner is asked to be opened * Use the Dialog class so that the planner is not broken * Simplify/optimize code, use standard conventions, lint files, ...
2016-11-08[MERGE] forward port branch 10.0 up to 3d085f6Christophe Simonis
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