This rev. improves the layout of the inner kanban view for
operators in livechat channels, mainly by setting a max-width on
their avatar (with classname 'o_kanban_image').
The motivation of this commit comes from a feedback following an
internal migration.
Since the new views, `record.id.value` contains the formatted value of
the ID, meaning it can contain separators. For example, by default,
`1234 => 1,234`. Since this value is used in the image URL, using
`value` won't work anymore.
This commit display rating on kanban card
of livechat channel, in order to directly
jump on the kanban rating used to compute
the customer satisfaction on the last 7 days.
Default filters are used.
A reporting menu entry is also added to have
access to global livechat satifaction reporting
with graph and pivot views.
Rating is used on different objects that
don't have the same business needs.
We want rating module to provide the common
needs (filter, views, basic actions, ...) and
other module will extends these basic tools
to complete their specific business needs.
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
The JS module 'web.session' is already defined directly in the template.
When two modules have the same name, the second one that is read is
ignored, and a error is displayed in the console (in debug mode).
Use the mention mechanism of the composer to autocomplete on canned responses
(keyword :) with fuzzy search.
Directly perform the string replacement in the composer, instead of
server-side as before.
Add a menu item to access an editable list view to create and edit canned
responses.
Add two canned responses as demo data.
File variables.less is located in web/ in the community edition, but in
web_enterprise/ in the enterprise one.
This fix uses the template 'web.less_helpers' containing the correct version of
variables.less instead of directly include variables.less and utils.less.
The problem was that the matching rule was evaluated before sending the html
page, and the script was inserted in the page according to the matching rule
(it wasn't inserted if the rule was 'hide_button'). However, the matching rule
wasn't re-evaluated if the page was already in the cache. The page content thus
might depend on a matching rule computed for someone else in that case.
Rather than inserting the script according to the matching rule, we insert it
only if there is an operator available. We then ask for the matching rule in
the livechat widget, by RPC, and we reject its willStart deferred if the rule
says so. We also re-check for operator availability in the same RPC.
The Website Live Chat is supposed to appear following 3 ways outside of
the backend:
- in a singleton page with path /im_livechat/support/{id}
- in a page in which a code code snippet (with two script and a css
bundle) has been inserted in the head section
- by installing the module "Website Live Support"
In the first both instances, including some less files and bootstrap
default variables is required which this commit do.
In the last instance these file should already be included in the
website and the additional assets required are inserted in the
website.assets_frontend bundle.
opw-654898
On website page, in debug mode, error 'web.session already defined' appears in the console. This was due to the fact the namespace web.session was redefined a second time to bind the session on the server_url param for the livechat to work. On website page, this is already done by the native web.session (session_instance.js). Define a session in the bundle is required when livechat is intergrated on external page, so fetching the bundle is done through /im_livechat/loader/, and generating a web.session can be conditional.
LESS rules (enterprise compatibility) :
* .oe_avatar is float:left by default
* .oe_title is placed between oe_avatar/oe_button_box if any
without the need to make it float
* Remove use of flex for kanban record layout (text overflow ellipsis
could not work in row wrap flex layout as flex would prefer to wrap its
elements than add an ellipsis inside its content)
* Fix xml templates (double use of o_kanban_image + non-existing class)