summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/debug_manager.js
AgeCommit message (Collapse)Author
2018-08-29[REF] web: move debug_managers in toolsChristophe Monniez
2018-08-29[IMP] web: New test to test Odoo menusChristophe Monniez
This commit adds a new js test in web that enters each app and click on each view switcher, each menu and each search filter. This test is tagged '-standard' and 'click_all' as it could last a long time, that way it's not executed by default. It could also be started from the browser console with 'clickEverywhere();'.
2018-08-14[IMP] web: Better view fields for debug mode.Nhomar Hernández
When you need to fast review all properties of a model, mostly the fields it is really anoying go to all the technical path which has all the information already. The previous "View Fields" action was very messy. My proposal is simply instead use a dialog which is almost useless open a normal vie (a little improved) which allow us audit completely everything. Remove the previous dialog, this will not be used anymore. Closes #26364
2018-07-27[REF] *: BS4, adapt dropdowns and caretsqsm-odoo
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-25[ADD] web: easy to change noupdate valueMartin Trigaux
It is currently difficult to mark a record as noupdate Make it doable in one click. The choice of what should and should not be on noupdate is personal and depends of the company need and how technical are the users. Problem raised at #25748 The res.lang records are typically complicated and changing the date format may break the database. Keeping it in noupdate=0 makes sense for most use but allow to change it if needed. Closes #25759
2018-07-09[FIX] *: fix some side-effects of ↵qsm-odoo
https://github.com/odoo/odoo/commit/9de1bc0eef6f5bfaa2a8d745431caa361ae91548 - JS Modals were not correctly built anymore, their .modal-body element was duplicated and many without-effect JS lines were introduced (as a side effect, the form view design was broken when inside modals) - Tests were changed to make bugs go unnoticed. For example, the media dialog functionnality was entirely broken because the .modal-dialog element was not receiving the correct class anymore. - The JS translation function is _t, not _ - Do not use the <title/> tag as a regular DOM element, it is meant to be unique, in the <head/> section - CSS rules were added to the utils.scss file, which is meant to contain functions and mixins, otherwise, the rule is duplicated in every asset - Some icons were still broken, as missed by https://github.com/odoo/odoo/commit/f90cf060a3cfeb37a67bec83264c0aaab8892b56 - Tests were changed to use [role="dialog"]/footer/header in their selectors without any reason, this commit restores some of that to avoid rebase conflicts with the BS4 work. - ... Note: other elements should still be discussed, like the direct use of the 'o_form_label' class in views definition... but those do not cause direct problems.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2018-04-06[MERGE] forward port branch 11.0 up to d277adf4d59Christophe Simonis
2018-04-04[FIX] web: debug manager: replace tree mode by listLucas Perais (lpe)
- Open in debug mode the 'beetle' - Click on open view - select a Tree view in the list Before this commit: A traceback appears This was because while the Tree view per se has been discontinued the mode 'tree' of an action must be supported Which was not the case for this particular widget After this commit: the list view asked for appears OPW 1833008 closes #23963 closes #24005
2018-01-25[MERGE] forward port branch saas-11.1 up to 8613724bfccChristophe Simonis
2018-01-25[MERGE] forward port branch 11.0 up to eefe879a37aChristophe Simonis
2018-01-22[FIX] web: set default you/all option flippedNicolas Lempereur
In 60d9f6fe the ir.default replaced uses of ir.values. But the [ir.default].set user_id has opposite meaning to [ir.values].set_default for_all_users. This was not taken into account when adapting javascript in 791152a87 and this commit fixes that. opw-805871 closes #22437
2018-01-16[REF] web,*: ActionManager/ViewManager refactoringAaron Bohy
This rev. is the first part (out of 3) of the refactoring of the ActionManager and ViewManager layer of the webclient. The main changes are: - there is no ViewManager anymore, its work is now handled by the ActionManager itself, but isolated in a specific file ; this eases a lot of things, as the breadcrumbs handling for example. - the ActionManager code is converted to the new coding principles and guidelines ; mainly, children widgets communicate with it by triggering events up, and not by function calls anymore. - the ActionManager layer is now testable, and a lot of tests have already been written. - the code in other addons has been adapted consequently. What's coming next: - introduce the 'AbstractAction' Widget, and make client actions and view controllers inherit from it ; this widget will implement a common API that could be used uniformly by the ActionManager (e.g. restore(), canBeLeft(), renderButtons(), getTitle()...). - move the ControlPanel handling from the ActionManager to the AbstractAction.
2018-01-10[MERGE] forward port branch 11.0 up to ff0abd214c8Christophe Simonis
2018-01-08[FIX] web: DebugManager in dialogsAaron Bohy
For actions executed in dialogs (target='new'), a DebugManager is instantiated and appended to the dialog's header (div with classname 'modal-header'). However, in the full composer dialog (in a chatter, click on 'Send message', and then click on the expand icon), there are more than one element matching the selector '.modal-header', because it also occurs in the html generated by summernote. In this case, the widget's $el is cloned and appended to each element of the JQuery nodeset matching the given selector, but widget.$el only refers to one of those. So when it isn't the one appended in the real dialog's header, the debug manager remains empty as the widget isn't able to populate it correctly. This bug appeared with rev. 5f1ef09, as before it, the debug manager was appended to the dialog before its content.
2017-11-10[MERGE] forward port branch 11.0 up to 350973ff366Christophe Simonis
2017-11-10[FIX] web(_editor): enable mobile testsAaron Bohy
This rev. introduces a new test suite meant to test the webclient components on mobile devices. The key 'config.device.isMobile' is forced to true in this test suite, so that mobile specific JS files are properly executed, which isn't the case in the classic JS test suite (setting isMobile to true in the test definition is too late, as the JS files are already processed). For now, this new test suite contains a single test, which was skipped until this rev. as it couldn't be executed in the classical JS test suite. Both suites are executed at each build of the runbot, and they can be manually executed from the webclient as well (via the debug manager).
2017-10-18[FIX] web,*: replace core.debug by config.debugKhoi Nguyen
2017-10-18[IMP] web: Regenerate assets from debug menuKhoi Nguyen
This commit adds a "Regenerate Assets Bundles" entry in the debug menu, whose role is to unlink all assets from ir.attachment, forcing their regeneration.
2017-10-03[FIX] web: The model "ir.values" has been renamedGoffin Simon
The model "ir.values" has been renamed in "ir.default" by this commit: 60d9f6fef9e15c96cb710a17318a56c1cc1c33dc
2017-09-13[MERGE] forward port branch saas-17 up to 1e17035f71fChristophe Simonis
2017-09-13[MERGE] forward port branch saas-16 up to 268cf9d04abChristophe Simonis
2017-09-12[FIX] web, account: display partner in reconciliationMartin Geubelle
When selecting a partner in the reconciliation widget, using the SelectCreateDialog (Search More), the partner wasn't correctly displayed. This was due to a difference between the change format of the many2one ; when using the dialog, only the `id` is sent (while the `id` and `display_name` are sent when using the many2one dropdown). These two behaviours are now standardized and both now send `id` and `display_name`. It has the advantage of sparing some `name_get`s called by the model because the `display_name` was missing. This change implies some refactoring where the SelectCreateDialog was used.
2017-09-12[MERGE] forward port branch saas-17 up to d08b4407be3Christophe Simonis
2017-09-11[MERGE] forward port branch saas-16 up to 3ac2a1106c8Christophe Simonis
2017-09-11[MERGE] forward port branch saas-15 up to ec15765eecfChristophe Simonis
2017-08-24[MERGE] forward port branch saas-17 up to 877e7098719Christophe Simonis
2017-08-23[MERGE] forward port branch saas-16 up to aec6248bb37Christophe Simonis
2017-08-23[FIX] web: reimplement conditions in the "Set Default" dialogMartin Geubelle
The rev. https://github.com/odoo/odoo/commit/49f0413290821cb123e75b4546873cf98edf1d25 reintroduced the "Set Default" dialog but forgot the conditions part. This rev. reintroduces the missing part.
2017-08-18[FIX] web: debug manager: open the set_default dialogfwi-odoo
Before this commit, the function opening the set_default dialog was not declared anymore. This commit redefines this function in the debug manager.
2017-07-24[IMP] web, *: lazy load dialog xml templateqsm-odoo
* web_editor, web_planner, website The 'Dialog' class is used in both backend and frontend. Also, lots of actions can be done without the use of any modal. It thus makes sense to lazy load its related xml only when a first modal is opened. This change also allows to get rid of the "base_common.xml" file as the dialog template is the only remaining one in there and, in the future website update, it will allow to not load any static XML file on website page loadings.
2017-07-11[FIX] web,odoo: Remove remaining workflow related codeMehul Patel
2017-06-21[FIX] web: remove "Edit Workflow"Nicolas Martinelli
Since all workflows have been removed, remove the menu to edit it, since it generates a traceback and confuse users.
2017-05-16[MERGE] Forward-port saas-15 up to 878fbc75ff9ebade92f43748500e64350367a824Olivier Dony
2017-05-16[MERGE] Forward-port 10.0 up to 1545995b393a1d347c6c1988da03dd1c6f1ea037Olivier Dony
2017-05-16[MERGE] Forward-port saas-11 up to 0570033ae7c5b4e0efa4a1ee9fd90dcb9675f890Olivier Dony
2017-05-11[FIX] web: DebugManager: open view: search and qweb viewsAaron Bohy
can't be opened that way. For now, only views that can be opened with a view manager are supported, i.e. views like form, list, kanban, graph... So this fix filters out the views of type qweb and search from the list.
2017-04-24[FIX] web: debugmanager view metadata should not crashGéry Debongnie
In general, I think that we can safely consider that crashes are not the intended behaviour. In this case, viewing metadata crashed because we tried to format a date which was not parsed (so, a string), instead of a moment object. We simply just parse the date before, and it works as intended.
2017-04-11[FIX] web: fix two small crashes in debug managerGéry Debongnie
- remove edit workflow link in debug manager. The workflow feature was removed, but there was still a link in the debug manager. Clicking on that link was a crash. - the rpc to fetch a view was wrongly updated, so the return value was not properly used.
2017-04-11[REF] web, *: simplify our RPC system (in JS)Géry Debongnie
The RPC system was not completely satisfactory, we decided to prepare the future and do it properly. This commit introduces the new rpc system, which replace the previous new one. We now simply have a method, this._rpc, which takes a dictionary of parameters. The idea is that depending on the parameters, it is able to add correct default value when necessary. For situations where we don't have the this._rpc method, we can use the rpc.query method, which takes the same arguments, but directly calls ajax.rpc instead of triggering up some events.
2017-04-11[REF] *: use _rpc method for all rpcsGéry Debongnie
The _rpc method is now the preferred method to do a rpc, so we need to update all calls.
2017-04-11[REF] web,*: remove 'web.model' and 'web.dataModelGéry Debongnie
Use this.rpc instead of Model object, with web.ajax if necessary. nb: EventDispatcherMixin include now the custom_events managment instead of widget
2017-04-11[REF] web,*: improve the way field_utils are doneGéry Debongnie
We replace a bunch of formatting and parsing functions by an object (parse or format) which can be used to dispatch on the correct type. It allows us to remove the format_field and parse_field functions. Also, we camelcase our new code and add some comments.
2017-04-11[REF] web: remove format.jsChristophe Matthieu
use 'web.field_utils' instead of 'web.formats'
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-12-02[REF] web: Remove is_admin key in session infoYannick Tivisse
Because of its redundency with is_system key.
2016-10-10[FIX] web: remove "Disable/Enable Technical Features"Nicolas Martinelli
This link was useful when the "Technical Features" group was not linked to the "?debug" parameter. This is not the case anymore, and this button has no effect.
2016-09-28[IMP] web: trigger event when changing actionMartin Geubelle
This comportement was added in the DebugManager to trigger an event. As this event could be useful in other situations (e.g. studio), we trigger the event directly in the ActionManager. By default, the WebClient does not use this event but an handler is added to be overwritten. This handler is overwritten in some widgets (DebugManager, Studio, etc.) that requires the Systray items instances so we add them in ´widgets´ in the Systray Menu. As the module dashboard uses multiple ActionManager, the event bubbling should be avoided in this case.
2016-09-02[IMP] web, website: adapt tour launching to new systemqsm-odoo
* The debug manager contains a feature to launch tours, adapt it to new web_tour.tour system * The website help menu allowed to relaunch tutorial tour in debug mode. This feature is not adapted to new tour system and was useless in the first place (debug mode in frontend is barely used anyway). -> remove the website help menu and the feature
2016-07-15[MERGE] forward port branch saas-11 up to a62b8cfChristophe Simonis