* 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.
Although a dark 'border-bottom' is necessary in some occasions (to add
contrast between the page's content and the navbar itself), the other
borders were totally unnecessary.
Moreover, having a complete border causes complications to calculate the
sidebar height and to manage buttons' size and line-height.
This fix will keep the border-bottom only, removing the other ones.
Compensation rules ("- 2px") are no longer necessary.
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.
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
Planners should only be visible for "base.group_system" user group (admin settings) because there are links to install apps etc. For now missing access rights messages whenever you click a settings link.Only for admin and not by company.
Admin and the user who has "base.group_system" rights can see the planners.
* 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, ...
Now, when the module is not found, instead to display a traceback, we open a popup to upgrade to Enterprise.
That will be wrong in case of outdated / wrong link, but in most cases, it is because it is an enterprise module.
This commit closes#13882
TODO: Remove zindex 1051 on planner in master/saas-14
Change color #a24689 to #875A7B
Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).
Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
Sort systray items by sequence to allow, e.g. to force the planner item to
be the left-most item of the systray as it is not displayed in all apps, and
thus produces a flickering of the other items.
Also invert the push order of the two mail items to keep the previous order
as they are now prepended instead of appended.
* Convert some CSS to LESS
* Split/Join LESS files
* Remove duplicates between website and web_editor
* UI improvements
* Allow simple customizations thanks to LESS var&mixins for website
Instead of using a default value of 5%, we now add a fictive first
step and consider it as done.
this is related to 9a8153ee55
(fp is watching my ugly commits)
The web planner should be hidden by default. Now, it is displayed,
then hidden in js after a while (but it can be seen by the user), then
displayed again if necessary
Missing context in call to render the planner leading to untranslated planner.
Use the session to get the user context as outside of the view manager.
opw 660627
- Differentiate between the Community and Enterprise editions
in the version number. By adding this attribute on the global
odoo JS object in the web client bootstrap controller /web,
we can differentiate between versions easily on the client
side without extra RPC calls.
- Remove a couple of version-related RPC calls in case
the global version info is present in the JS environment
- Update "About" panel to display the edition info
- This commit also reverts 07fe5afc87
which implemented the idea in a more limited way.
Closes#9625
A PlannerDialog does not extend Dialog for historical and graphical
reasons. Thus sometime a logic in Dialog is missed in a PlannerDialog
whilst it is useful.
In this instance, when doing an action from the planner which destroyed
it, the modal backdrop was not removed by bootstrap. Bootstrap does this
when the modal 'hide' function is called.
opw-653734
Help has been moved to web_planner, but only in backend. The comportement needs to be defined in website also so it is now shared in frontend and backend (mixin in common)
* 'Help' has now its own dropdown, directly accessible in the systray, instead of being hidden in the Administrator dropdown
* 'About' has been moved there also
* We can access the planner through this dropdown, even if the planner is hidden (complete)
Also correctly left align the menu when there is a multi line item and
vertical-align all the elements of the header so that it does not look
broken when there is a multi line title.
* Correct inheritance of async method
* Correct calls to do_hide/show
* Fetch the template in `willStart`
* Correct bootstrap structure for the layout, remove useless branding
and dom depth
* Each planner page is now in its own bootstrap grid
* Compatibility between both webclients
This introduces a new way to define web_planners. They now take the
following form:
<template id="project_planner">
<t t-call="web_planner.pages">
<t t-call="web_planner.category">
<t t-set="menu_categorytitle" t-value="'Prepare'"/>
<t t-set="menu_categoryclasses" t-value="'fa-flag-checkered'"/>
<t t-call="web_planner.page">
<t t-set="page_title" t-value="'Welcome'"/>
<t t-set="hide_mark_as_done" t-value="True"/>
<t t-set="hide_from_menu" t-value="True"/>
<!-- content here -->
</t>
</t>
</template>
The menu is not manually created anymore, it is automatically generated.
Pages do not have to be part of a category and can just be defined as
children of web_planner.pages. A page can have hide_mark_as_done and
hide_from_menu, these are optional and will both default to False when
omitted.