summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome
AgeCommit message (Collapse)Author
2019-07-24[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28baMartin Trigaux
closes odoo/odoo#35119 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-19[FIX] web: remove lazyloaded controller from stackAaron Bohy
... if the current action can't be executed. Let's assume a form view for a record with a multicompany ir.rule. If the user switches to another company, the webclient is reloaded, but he doesn't have access to that record anymore. In this case, he is redirected to the Home menu. Before this rev., when he clicked on an app in this situation, it crashed. This was due to a leftover reference of the failed action (the lazyloaded, multi-record controller) in the controller stack. closes odoo/odoo#34994 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-14[MERGE] forward port branch saas-12.2 up to 498b4b4350dChristophe Simonis
2019-06-04[FIX] web: correct forward-port of e9350993ca0b81df17308766d7e26d458bc39520Christophe Simonis
2019-06-03[MERGE] forward port branch saas-12.2 up to 995aa1685eeChristophe Simonis
2019-05-31[MERGE] forward port branch 12.0 up to 8f21148e1a8Christophe Simonis
2019-05-29[MERGE] forward port branch saas-11.3 up to 8a0e819d0bbChristophe Simonis
2019-05-27[FIX] web: restore /apps/<app> controllerRomain Derie
Since JS refactoring of ActionManager at 32b8cec536, the /apps/<app> controller was not working anymore as the refactoring dropped the support of `sa` as URL state. closes odoo/odoo#33679 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-03[FIX] web: log missing view warning rather than errorDavid Monjoie
The point of this warning is to help a view developer realize that his view is not loaded at all. However, console 'error' and 'warn' are observed by the runbot clickall tour as meaningful errors regarding a build resulting status. It makes sense, but it is an issue for community modules which have a gantt view that only exists in Enterprise. We don't want to create a bridge module for each and every module which uses a view that only exists in Enterprise, so we need to live with this warning. Since its purpose is for developers only, they can read the log and notice the error even if we use console.log rather than console.error, and that will not alter the result of the runbot clickall tour. closes odoo/odoo#33814 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-02[MERGE] forward port branch 11.0 up to 82c901c9379Christophe Simonis
2019-05-13[MERGE] forward port branch saas-12.2 up to 243a4ae5cbcChristophe Simonis
2019-05-10[MERGE] forward port branch saas-12.1 up to 330b99f60c0Christophe Simonis
2019-05-09[MERGE] forward port branch 12.0 up to e11bacfe512Christophe Simonis
2019-05-06[FIX] web: checkbox in favorites menu: don't close on clickLucas Perais (lpe)
Following f4fbaf1efae11e8bd3b1a2938ab765d391764a1b which changes the label/checkbox structure into: ``` <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="customCheck1"> <label class="custom-control-label" for="customCheck1">...</label> </div> ``` So, before this commit, there may have been multiple input with the same Id. The consequence is that, when clicking on a label, the browser would take the first Id it found which was erroneous, because all checkboxes in Favorites menu had the same Id In reality, the use case goes as: - open a x2m, - search more - Favorites > Save current search > click on one the two checkboxes > The dropdown closed, without checking the box After this commit, when clicking on the checkbox in the favorites menu the checkbox is toggled and the dropdown stays. Also, the checkboxed have now unique ids OPW 1974587 closes odoo/odoo#33032 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-26[FIX] web: no ResizeObserver video error on chromeNicolas Lempereur
When displaying a video, with the browser window at a certain size, or resizing it (or opening developer tools) we could the following error: "ResizeObserver loop limit exceeded" This can be reproduced in chromium just with this JS code: window.onerror = function(e){ console.log(e); }; document.body.innerHTML = '<div><video controls src="v.webm"/>'; The issue only happen if: - the video server does not support HTTP range requests - the controls are displayed on the video - browser size is in problematic size/resized to problematic size And the error is raised in window.onerror but not displayed in the developer console. With this change, we ignore these errors until fixed in chromium. chromium bug tracker: https://crbug.com/809574 backport of 12.0 535da9e (in pr #30239) since video loader was in 11.0 opw-1928512 closes #32983 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-17[MERGE] forward port branch saas-12.1 up to d785adba6c0Christophe Simonis
2019-05-17[MERGE] forward port branch 12.0 up to c545783b95bChristophe Simonis
2019-05-15[FIX] web: mark as read trigger notificationJulien Castiaux
Install discuss, change the general setting in dev mode to disable the "Show Effect" checkbox. Change the preferences of the user to let odoo handle notifications. Ask another user to ping you on a chatter then go to discuss and click the "Mark as Read" button. Traceback. The `notification_manager` agent has been replaced by another agent in 07cd24b1ec, the code has been updated to use the new agent. opw-1986844 closes odoo/odoo#33363 Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-04-05[FIX] web: corrected the order of icons in systrayVincent Schippefilt
Since the merge of JQuery 3, the building of systray icons is non deterministic. After this fix, the menus are loaded correctly in order. Task-ID: 1960741 closes odoo/odoo#32382 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-28[FIX] web: call super in AbstractAction willStartMathieu Duckerts-Antoine
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has modified how libraries are loaded at several places and has introduced a bug in sale_subscription_dashboard where the libraries are no longer loaded at all. We fix that situation by calling super in the willStart method of AbstractAction that inherits from Widget. Abstract actions can now also benefit from the mechanism present in Widget willStart. closes odoo/odoo#32209 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-11[MERGE] forward port branch saas-12.1 up to 2b3296bbf8bChristophe Simonis
2019-03-06[FIX] web: update breadcrumbs when switching viewMartin Geubelle
To reproduce: 1. go on list view 2. open record in form view 3. come back on list view 4. switch to kanban 5. open record in form view 6. click on breadcrumb Before this rev. we were back on the list view, and not the kanban view. This is due to the fact that the breadcrumb was not updated when switching view, (if a controller was already existing) so the form view control panel breadcrumb was still referencing the wrong (list) controller. This bug appeared with the control panel refactoring, which is now managed by the view itself (and not the action manager as previously). Task 1932646 closes odoo/odoo#31598 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-02-20[MERGE] forward port branch 11.0 up to de8cefcef4dChristophe Simonis
2019-04-01[FIX] web: call super in AbstractAction willStartMathieu Duckerts-Antoine
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has modified how libraries are loaded at several places and has introduced a bug in sale_subscription_dashboard where the libraries are no longer loaded at all. We fix that situation by calling super in the willStart method of AbstractAction that inherits from Widget. Abstract actions can now also benefit from the mechanism present in Widget willStart.
2019-04-01[MERGE] forward port branch saas-12.2 up to 18c735361a6Christophe Simonis
2019-03-22[FIX] *: pass context in kwargs in rpc callsRaphael Collet
2019-03-15[IMP] web: only display missing view erorr in debug assetsDavid Monjoie
This error is there to help developpers realize their view has not been loaded due to an error. However, we have cases where we define actions containing views that only exist in Enterprise to avoid creating an entire bridge module just to add one view to an action. The error was triggered in this case which resulted in a red build for the click all runbot test, even though this was not really a true error, as it was intended. This commit changes the error to only appear in debug=assets such that it will no longer put the click all runbot tour red while still providing help for the developper trying to debug his view since he will need to be in debug=assets to debug his view anyway. closes odoo/odoo#31884 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-06[REF] web: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-14[IMP] hr_*: introduce the employee profileLucas Lefèvre
General Purpose =============== We want an 'Employee profile' gathering every data about an employee. The main form view is modified to become this employee profile. A user can also see his own profile through the Preferences menu. The new profile replaces the current Preferences view if the hr module is installed and the current user is linked to an employee. A user should be able to see and edit his own profile. *Problem*: Many fields on hr.employee are protected by groups="hr.group_hr_user". Therefore, a regular user cannot see or edit those fields. This protection must be bypassed to allow read/write access to the regular user's own data. A similar mechanism already exists for res.users (for Preferences) The better (least worst) solution found is to reuse this mechanism by adding related fields on res.users. Pros: - Don't change security access on hr.employee - Don't implement yet another custom security layer, risking to add new security breaches - A lot of fields are added by other modules on hr.employee. It would have required to integrate them with the custom security layer. - Fields added by other modules on the user's preferences view (normal view, not the profile) are automatically included in the employee's profile view. - Allow the hr.employee form view to be different than the user profile accessible through the Preferences menu. E.g. add custom buttons only relevant to the logged in user such as "Request a leave". Cons: - Each field from hr.employee that you want to appear on its profile must be added as a related field on res.users - Those related fields must be added to user's preferences view (duplicate views) - They also must be added to SELF_[READABLE | WRITABLE]_FIELDS Note: When the front-end loads the views it gets the list of available fields for the user (according to its access rights). Later, when the front-end wants to populate the view with data, it only asks to read those available fields. However, in this case, we want the user to be able to read/write its own data, even if they are protected by groups (groups are kept on the related fields on res.users). The front-end need to be made aware of those fields by sending all field definitions. hr_attendance ============= This commit integrate attendance in the new employee profile. It also adds a stat button to this employee profile showing the number of hours worked last month. Remove the boolean computed field 'manual_attendance'. This field is just a shortcut to add/remove the employee's user in the "Manual Attendance" group. The checkbox is confusing on the employee's form and this should be done through the normal group management screens. hr_presence =========== Display the presence status on the employee kanban template. The status is a colored chip which can be green (present), orange (to define) or red (absent). Currently, the presence status is only computed when accessing the report view. As this commits displays it on the employee kanban, it should be updated more frequently. The state should not be updated every time the kanban view is loaded since the computation is a bit heavy. Instead: add a cron to update status every 15 minutes. -> The status is accurate on the report view (status is still updated when loading the view) -> The status in accurate at 15 minutes on the kanban view [ADD] hr_attendance_presence ============================ Bridge module between hr_attendance and hr_presence. This commit integrates hr_presence module in the employee profile and adds the presence status on the employee kanban view. But hr_attendance adds at the same place a similar status icon for checkin/checkout. This bridge module makes the status from hr_presence invisible as hr_attendance should be the main presence control mechanism. Also, this commit adds the ability (through a new setting option) for hr_presence to take into account checkin/checkout to determine the presence status. l10n_be_hr_payroll ================== integration with employee profile
2019-02-26[MOV] web, *: simple moves of JS files to 'public' folderqsm-odoo
* web_editor, website, survey, im_livechat Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-05[MERGE] forward port branch 11.0 up to e0b14bf9a7aChristophe Simonis
2019-02-04[FIX] search_filters: broke a thing in f1a85baXavier Morel
As part of fixing the JS docs (docstrings & references & ...), the various search filters were de-namespaced (aka ExtendedSearchProposition.Integer = ... -> var Integer = ...). This had the side-effect of making a `new Date` refer to the extended search Date field instead of the global Date object, which went unnoticed because *that* had been wrapped in a moment() call, and moment() apparently doesn't mind being given garbage, but it would also create an "unbound" and thus never destroyed widget. Remove the `new Date`, calling moment directly has pretty much the same effect, moment objects created from date objects just have an extra field (a cache for the date object I guess). closes odoo/odoo#30791
2019-01-29[MERGE] forward port branch 11.0 up to 36d96e01503Christophe Simonis
2019-01-31[FIX] web: make value_from of Datefield work without calling complete beforeNans Lefebvre
Commit 9af941428880af8e1810dfd9feef494d7a745e98 made it so that the value_from function depends on a variable defined after the function complete has been called, without any guarantee that this function would be called after. Apparently this is the right OOP thing to do. opw 1930523 closes odoo/odoo#30712
2019-01-17[MERGE] forward port branch 11.0 up to 19558129f0eChristophe Simonis
2019-01-17[FIX] web: pivot correct context after reloadLucas Perais (lpe)
Open a pivot view with default filters automatically activating Disable those filters Change the groupBys on the rows and cols of the pivot Save your result as a favorite filter Before this commit, the filter did not contain the context information for columns groupby Also, the search view did not exploit the context of the new filter as it should be After this commit, the flow works as expected OPW 1913732 closes odoo/odoo#29415
2019-01-18[MERGE] forward port branch 12.0 up to f854e01a983Christophe Simonis
2019-01-09[MERGE] forward port branch 12.0 up to 3e4138deaa2Christophe Simonis
closes odoo/odoo#30045
2019-01-15[FIX] web: no ResizeObserver video error on chromeNicolas Lempereur
When displaying a video, with the browser window at a certain size, or resizing it (or opening developer tools) we could the following error: "ResizeObserver loop limit exceeded" This can be reproduced in chromium just with this JS code: window.onerror = function(e){ console.log(e); }; document.body.innerHTML = '<div><video controls src="v.webm"/>'; The issue only happen if: - the video server does not support HTTP range requests - the controls are displayed on the video - browser size is in problematic size/resized to problematic size And the error is raised in window.onerror but not displayed in the developer console. With this change, we ignore these errors until fixed in chromium. chromium bug tracker: https://crbug.com/809574 opw-1928512 closes #30239
2019-01-04[FIX] web: do not open first app if no appMartin Trigaux
On an instance with only web installed. A non-admin use had an error as trying to open the first app (which does not exists) closes odoo/odoo#29687
2018-12-19[FIX] web: fetch toolbar info for target=current actionsAaron Bohy
The 'Actions' menu displayed in the control panel (aka sidebar, or toolbar), wasn't displayed anymore since the control panel refactoring of 4cd379cf6e. Rev. c1752b834 correctly made it appear again in list and form views. However, there was another issue as the additional model-related items (like Print, or custom actions) weren't fetched anymore. Thus, the sidebar only contained the default 'Export' and 'Delete' actions. This rev. fixes the second issue. fixes #29546 closes odoo/odoo#29633
2018-12-12[MERGE] forward port branch 12.0 up to 047e2b28de4Christophe Simonis
2018-12-11[MERGE] forward port branch saas-11.3 up to 55dafc20f6bChristophe Simonis
2018-12-11[FIX] web: correct load act_window with empty idMartin Geubelle
There was a traceback when reloading the webclient with an act_window and an empty id in the URL (ex: after saving Settings). A `read` without id was peformed when loading data instead of a `default_get`. Before rev. odoo/odoo@40dd121 the action environment was generated by the ActionManagerActWindow, which was currently defaulting the `currentId`. Now that this is not the case anymore, the `loadState` should have this responsability. Task 1902826 closes odoo/odoo#29411
2018-12-07[REF] web: move ControlPanel inside controllers/actionsGéry Debongnie
This branch introduces a large-scale reorganization of the component tree generated by the web client. The short version is that now, the control panel is a child of the view controller and no longer a sibling. Graphically (and simplified), we go from this: webClient / | \ ... ... actionManager / \ controlPanel viewController / \ to this: webClient / | \ ... ... actionManager | viewController / | \ ControlPanelController / \ CPRenderer CPModel The motivation is that this work moves the code where it should be. Before this commit, it was kind of weird to have code in the controllers to render buttons outside of their root node (in renderButtons). Also, the action manager had to take care of coordinating search view states between view transitions. So, this work simplifies the code. It also makes it easier to extend. We see day after day that Odoo needs to take care of more complex UI needs, and in many cases, these needs were quite difficult to implement (we prefer spaghettis in our plates, not in our code). The changes in this branch should open the way to implement these features. For example, - it will now be easy to add the possibility of views (for example, the search view or a new ControlPanel view) to add custom buttons (of type action or object) in the control panel. - Another need will be to serialize/ restore the state of the search view across action boundaries (needed by the dashboard). - Another example is the possibility for views to customize easily the presence/absence of sub menus (filters/groupbys/favorites/ time range/...) - Another need is an easier way for views/client action to customize their control panel. This commit also contains a large rewrite of the search view (so it is more inline with our architecture and easier to maintain). Part of task 1893568 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-05[FIX] web: exclude orderedBy when changing actionLucas Perais (lpe)
When activating a filter on a list view, the environment of the action contained a context with an orderedBy key which was then used by every controller and model in the various parallel flows, i.e. changing actions After this commit, we prevent it by excluding the key when executing an action OPW 1913190, 1914019 closes #29190
2018-11-28[FIX] web: action manager fullscreen toggleLucas Perais (lpe)
From a standard view with the main menu (what is called a target=current action) open a target=fullscreen action Then, go back to the first action, with the breadcrumbs for example Before this commit, the original view was displayed fullscreen, which impaired business navigation because the main menu was not there anymore After this commit, the original view has the main menu OPW 1906373 closes odoo/odoo#29096
2019-01-25[FIX] web: date filter operators less than greater thanHetal Dhanak
Before this commit, in the filter, when using a custom filter with a date field, the operators "is after" and "is before" were set to execute "is after or equal" and "if before or equal" respectively. That means it includes in the results, records with the same date as the filter. Now, the operators 'is after' and 'is before' won't include the records with the same date as the filter. And the operators 'is after or equal' and 'is before or equal' will include the records with the same date as the filter. Fixes #29868 OPW-1921756 closes odoo/odoo#30560
2018-11-22[MERGE] forward port branch 11.0 up to 263b388c504Christophe Simonis