summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
AgeCommit message (Collapse)Author
2016-06-08[MERGE] forward port of branch saas-11 up to ac50230Christophe Simonis
2016-06-03[FIX] web: data_manager: load_action: return deep copy of actionAaron Bohy
The action object, and in particular its context, is modified by the Action Manager and by some views (e.g. sales_team_dashboard Kanban). So, as the action is stored in cache, the same object was returned each time the action was requested, and previous modifications of its context still applied. This produced a bug with the sales_team_dashboard when following those steps: - click on the link to today's activities, it opens an action with 'search_default_today' in the context, - come back to the dashboard - click on the link to this week's activities, it opens an action with 'search_default_this_week' in the context, but the formerly added key 'search_default_today' is still there as well, so the domain is wrong.
2016-05-30[IMP] web: remove rpc call to get module listGéry Debongnie
It is already in the web client page source (or more precisely, in the assets_backent bundle)
2016-05-30[IMP] web: move currency rpc to session_infoGéry Debongnie
2016-05-30[REF] point_of_sale,web(site): move session info into page sourceGéry Debongnie
This commit introduces a mechanism to add information into the session from a different module, without having to fetch it manually with a rpc. This is intended to be used with small pieces of info required at the start of the web client, such as currency informations. To add information to the session, one can simply inherit from ir.http and modify the session_info method.
2016-05-27[REF] web: move dom_utils to its own fileGéry Debongnie
2016-05-27[REF] report,web(_editor): services extracted in their own filesGéry Debongnie
session_instance.js moved from framework/ to services/ and renamed into session.js, which required to change the bundles in report and web_editor addons.
2016-05-23[FIX] web,base: m2o empty name resultsqsm-odoo
M2O use the autocomplete lib to display its content. The problem is that if a result is empty (or only composed of whitespaces), a divider is displayed in the dropdown. Commit 1d9f7d279a74aaf6aaf25f91e2313b23b4122827 was fixing this by only displaying non-empty name results... but it did not work as many models implement the name_search method the wrong way. The new solution is to add a default display for record values which are empty strings, at the right places in the webclient components.
2016-05-18[FIX] web: data_manager: invalidate cache on RPC failAaron Bohy
Before this rev., if an error occured during an RPC handled by the data_manager, the RPC result was stored in cache anyway, and there was thus no other way than refreshing the page to get correct result for that RPC.
2016-05-13[MERGE] forward port of branch saas-10 up to 5aa0baeChristophe Simonis
2016-05-13[MERGE] forward port of branch saas-9 up to 087729fChristophe Simonis
2016-05-13[MERGE] forward port of branch 9.0 up to dcab356Christophe Simonis
2016-05-10[FIX] web: search input of dateNicolas Martinelli
When the user searches for date (or a datetime) in the search bar, the suggested date can become completely wrong. For example, in the French localization where the date format is DD/MM/YYYY, the system will search for the date MM/DD/YYYY. This is even worse when the date is not fully written: DD/MM could be converted to MM/DD/0000, which doesn't make any sense. This is related to the moment issue https://github.com/moment/moment/issues/1407. The fix is to make sure that the input date has a correct format thanks to `parse_value`. The latter converts the date into a fixed format. Fixes #11876 opw-676604
2016-05-04[ADD] web: some deferred utilsAaron Bohy
2016-04-26[FIX] web: view's do_execute_action with multiple input idsAaron Bohy
Commit of xmo that has been lost by the unduplication of webclients (6768bbfc).
2016-04-25[MERGE] forward port of branch saas-10 up to bb8f0f1Christophe Simonis
2016-04-25[MERGE] forward port of branch saas-9 up to 4d337f7Christophe Simonis
2016-04-21[MERGE] Forward-port 9.0 up to 74d8cbc190d1a93ef699ee254b1efbc88d2a1e26Olivier Dony
2016-04-21[REF] web: stop duplicating webAaron Bohy
Avoid duplicating web addon in enterprise by extracting a common basis. Enterprise features stay in enterprise, but use that common basis. Mainly: - JS refactoring and linting - Conversion of .sass into .less split into multiple files - Templates cleaning and DOM simplification - Re-generation of web.pot, and update of .po files
2016-04-20[FIX] web: fix dataset to avoid race conditionsGéry Debongnie
The read_slice method in dataset is problematic, because it alters the dataset ids. So, if 2 consecutive read_slice are started, but the first one ends after the second one, we don't have the correct ids in the dataset. This commit just make sure that previous read_slice do not alter the ids of the next read_slice.
2016-04-19[FIX] web: fix iOS file downloadingJoren Van Onder
e8a00bc50da435d3859118ca127d20a2eb9a0cab moved the get_file function from web.session to web.ajax. The issue is that get_file uses session.url() for iOS devices. Also, in order to prevent an infinite spinner options.complete() is called before actually opening up the new window. Although this resolves the issue it still requires the user to configure Safari to allow pop-ups, otherwise they are silently ignored. opw-672882
2016-04-07[REF] base_import: simplify import by reducing choice for the columns based ↵Cedric Snauwaert
on heuristic automatically try to detect type of columns from the first 10 rows of file: If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard If column only contains true/false values, only show boolean fields in wizard etc add an advanced mode which is the same as previous import (show all fields) Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
2016-04-05[MERGE] forward port of branch saas-10 up to aa6ebd1Christophe Simonis
2016-04-05[MERGE] forward port of branch saas-9 up to 549daaaChristophe Simonis
2016-04-05[MERGE] forward port of branch 9.0 up to 9e2de9bChristophe Simonis
2016-04-04[FIX] web: some float fields silently ignores their changesGéry Debongnie
We have an interesting problem when editing all custom float fields and all fields with no explicit digit attributes: the propertiesmixin tries to check if the number was changed, according to their declared precision. But for these specific fields, it does not find a digit attribute, and defaults to 2. Then, it makes sure that the changes are ignored if the new value is too close to the old value (with 2 digits precision) For example, if the user sets the value to 1.234, then save, then change it to 1.235, then save, the form view will display 1.234 and totally ignore the change. Not that handling the digit precision is done in the propertiesmixin and in the field float widget. Also, they do different things, and in some case, may not be the same. All this logic should be moved to the fieldfloat widget.
2016-04-01[MERGE] forward port of branch saas-10 up to 2483327Christophe Simonis
2016-03-24[MERGE] forward port of branch saas-9 up to 59d3f63Christophe Simonis
2016-03-18[IMP] openerp,web: cache of actions, fields(_views) and filtersAaron Bohy
Introduction of 'data_manager' service which handles meta-data related to actions and views (fields_views, fields and filters). Ideally, all RPCs to get that kind of information should go through data_manager, as it holds an internal cache.
2016-03-18[IMP] openerp, web(_*): batch views RPCsAaron Bohy
Load the fields_view of all views of the action together. If a searchview is required, also load its fields_view and its filters. Use lazy-loading for fields as they are required for the Pivot and Graph views only, and may be used by Filters and GroupBy menus of the Search view if the users clicks on 'Add a custom Filter/Group'. The fields are thus also loaded directly if the first view of the action is Pivot or Graph, and otherwise, they are lazy-loaded when/if the user opens a Pivot or Graph view, or if he wants to add a custom Filter/Group. Some refactoring of views API as well: - Views must now be instantiated with their fields_view - Move code requiring fields_view from start() to init(), or willStart() for heavy processing. - Remove view_type attribute from views as it was used to call fields_view_get. - Remove view_id parameter to views' init as it is no longer used. - Move duplicate code from various views' init to the View widget. - Remove view_loading() function from views as they now follow the classical lifecycle of widgets (init -> willStart -> start -> destroy). - Searchview now extends View like all other views. - Remove useless function guard_active() as it was used for the form_view's action buttons to wrap handlers to ensure that they are executed only if the form_view is the current active view. This is not useful anymore as from v9, views and their control panel are appended in the DOM simultaneously, so one can't click on a button of a view which is not the current active view.
2016-03-18[REF] web: /web/action/load: remove unused 'do_not_eval' argumentAaron Bohy
unused since rev. odoo/odoo@4a5cb1ebc478cb650a2bf33081f101e4f74bc6fe.
2016-03-16[MERGE] forward port of branch 9.0 up to e8b965fChristophe Simonis
2016-03-16[FIX] web: len & non zero implementation for wrapping list/dictDenis Ledoux
The implementation of `__len__` & `__nonzero__` were not defined for the py types `wrapping_dict` and `wrapping_list`. For instance, this prevented an empty list to be considered as `False` in domains evaluated by the web client. e.g., in the automatic partner merge wizard, the domain ``` [('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)] ``` is used. When the `partner_ids` list was empty (meaning the "partners to merge" list was empty in the wizard), it wasn't considered as `False`, and it therefore attempted to get `partner_ids[0]`, which resulted to a crash, as the list was empty. opw-672095 Closes #11343 Courtesy of Xavier Morel (xmo@odoo.com)
2016-03-16[MERGE] forward port of branch 9.0 up to revision ↵qdp-odoo
083e172dd969303fc818e6a769caea82cec86527
2016-03-14[FIX] web: dataset alter_ids method must use optionsChristophe Matthieu
x2m send_commands add options for all command to avoid onchange trigger for internal change.
2016-03-14[FIX] web: various small issues in form view onchange/one2manyChristophe Matthieu
- Issue: Edit sale.order form view, add new line, change product who have taxes and click quickly on save (with slow network) => error message. Because some deferreds are lost. - reduce number of reads and onchange for x2m widgets - remove before_save method and use commit_value (the issue was that if the before_save and the change trigger an onchange, the onchange deferred is not checked before saving the content.
2016-02-24[MERGE] forward port of branch 9.0 up to c169c59Christophe Simonis
2016-02-23[IMP] web: update Dialog classqsm-odoo
Update Dialog class with enterprise version.
2016-02-23[FIX] web: Dialog closingqsm-odoo
The Dialog class destroys the modal (and so removes it from the DOM) when the dialog closes but leaves the modal-open class on the body element if there are still other modal(s) in the DOM. The problem is that (maily on the frontend side) there may be others modal(s) in the DOM (not handled by the Dialog class) but which are not shown to the user, and in that case the modal-open class should be removed.
2016-02-17[MERGE] forward port of branch saas-9 up to 87a01c7Christophe Simonis
2016-02-17[MERGE] forward port of branch 9.0 up to 27058c4Christophe Simonis
2016-02-17[FIX] web: prevent focus issue with autoresizeGéry Debongnie
The copied textarea used in autoresize was a valid target for focus when using the tab key. This is a major issue in editable list views, because when the user leaves a textarea, the list view jumps up, with no visible focused field.
2016-02-17[IMP] web_kanban_gauge: remove justgage lib and use d3Christophe Matthieu
2016-02-17[IMP] web: remove spin lib and replace by an image with css to spinChristophe Matthieu
2016-02-17[IMP] web: remove useless jQuery.timeago libChristophe Matthieu
Replace call by moment(date).fromNow()
2016-02-02[MERGE] forward port of branch saas-9 up to 469e04eChristophe Simonis
2016-02-02[MERGE] forward port of branch 9.0 up to f0a63e5Christophe Simonis
2016-02-01[FIX] mail,web: don't block chat windows when blocking uiAaron Bohy
One will still be able to chat in chat windows during long RPCs...
2016-01-27[MERGE] forward port of branch saas-9 up to 78d20b5Christophe Simonis
2016-01-19[MERGE] forward port of branch 9.0 up to 365e298Julien Legros