This PRs fixes an issue where an emoji stayed greyed-out when
hovered, and the popover is scrolled
This fix create a field to hover an emoji, and the field can
only hold one emoji view at a time
Task-2998153
closesodoo/odoo#101499
X-original-commit: 5c2a6878856635d732a417ea9f8067953ba6df33
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR makes it so that the button to open emojis stays grey
when the emoji popover view is opened.
The focused behavior of the button is also disabled
Task-2998149
closesodoo/odoo#101348
X-original-commit: d022939ed1ed29d2e93a05c6c408ac65e8fb704e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
On windows, displayed emojis are bigger than the expected size
This commit removes the horizontal scrolbar that would appear
on Windows
Task-2991415
closesodoo/odoo#101347
X-original-commit: 578157fbbae92afa1581193df9173fd085fd9f09
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This moves the emojis char and text fields to the new fields directory,
and renames them to follow the new naming conventions.
X-original-commit: 92488725a608a2e14297228ebccddc5cc2ee5d6d
Part-of: odoo/odoo#101350
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except
if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
hovering the status text in control panel.
task id: 2822553
X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
This commit changes the layout of the form view to move the
control panel next to the chatter instead of being on top.
The chatter now takes all the place on the right side of the view.
task id: 2822553
X-original-commit: 7f36dd05b3238c3d27aab6e5af12233df27067e4
Part-of: odoo/odoo#101118
Some views still use them.
closesodoo/odoo#101081
X-original-commit: adb5508afd2749dbbfeb85803d707df43358b011
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Remove sorting rules arrays from the functions that wrap them as they
are unnecessary noise.
closesodoo/odoo#101039
X-original-commit: b37baf8996d65d639f0178651a7be0206d0679d0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
They tend to come in the way of very obvious things in the UI, repeat
the same stuff that the label, etc.
Titles attributes are not good for a11y, so if needed I prefer replacing
them with an aria-label which:
- doesn't mess up the UI
- works properly with screen readers
I've kept them on nodes that have no text (e.g. icons), otherwise
they're not needed - text needs not be labelled.
closesodoo/odoo#100990
X-original-commit: 1c52c649f99d831de98d349d1ffbc6abc95a93ae
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
After this commit, fields from models framework are stringified to
follow the presentation ModelName/fieldName.
Task-2992286
closesodoo/odoo#100845
X-original-commit: d645bf2c708f67ff27d004b79754926f3086c58b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Before this commit, when scrolling in the emoji grid and there's still
2 rows of emojis before a category section, this category was
mistakenly considered as active.
This commit fixes the issue, so that the category is considered active
only when the 1st visible row is in this category.
Task-2992589
closesodoo/odoo#100934
X-original-commit: 5eea0b5480f1e45b0b05bedc21689d35178490b7
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
The notification_alert component can now be registered as a view_widgets directly
closesodoo/odoo#100898
X-original-commit: 4f91758d1aefb6e459ccf02220bf4cf27f3a2ff2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit makes all sorts unconditional, which would allow us to get
rid of the functions that wrap the sorting rules and use arrays directly
instead.
This will allow us to lighten the syntax and to perform some
optimizations in subsequent PRs.
Task-2992581.
closesodoo/odoo#100895
X-original-commit: 4d15ca0f6883fb089e8d7514c4e639b86cedbd45
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
- Take them out of `legacy` codebase.
- Group them in a generic `static/src/scss` folder, as those files are
used in webclient but also in public livechat, portal...
X-original-commit: ca2e4fea92b5a26078a412072275a969508358c7
Part-of: odoo/odoo#100759
This commit normalizes the WebClient's layout allowing to simplify it
and reduce disparities between community and enterprise.
It also allows to remove the `webclient_extra.scss` replacement.
X-original-commit: d3d35397aeec18b54e342ef2d19749229d95c694
Part-of: odoo/odoo#100759
*: hr, im_livechat, snailmail, website_livechat
This commit introduces the public livechat bundle, which
contains the models that are specifically used in public livechat.
Doing so reduces the amount of model and data in frontend and
external lib, which makes the page load faster.
Task-2990182
Task-2990191
closesodoo/odoo#100768
Related: odoo/enterprise#31608
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes the offset that happened when clicking
on a category in the emoji picker
Task-2991668
closesodoo/odoo#100769
X-original-commit: 299e74b2510b94a4dea526080d48b7563190a097
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes a bug where, while in search mode,
clicking an emoji category would not scroll
to the specified category.
Task-2978040
X-original-commit: 2f6cd3b51d2e2c991ee610cc90bf1882bb3a114a
Part-of: odoo/odoo#100769
Those fields may be used in the new views.
Some of the legacy fields had to be kept because they are used
in some legacy views, more notably the gantt and activity views as well
as in the mrp work order tablet mode.
X-original-commit: 1c871ad9ea4a77468911ff6a5546688a26398a8b
Part-of: odoo/odoo#100764
Before this PR, the `_mockIrWebsocket__updatePresence` route of the
bus mock server could lead to errors when no im status ids were
provided. This commit fixes this issue by ensuring im status ids
were passed before calling `_mockIrWebsocket__getImStatus` method.
Moreover, old longpolling routes were still present on the bus mock
server. This commit removes these routes.
closesodoo/odoo#100583
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This handler was not properly guarded, and made
`.TestMailChannelExpand` fail on runbot.
closesodoo/odoo#100588
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Transform the /websocket/update_bus_presence route to type='json'
which makes more sense as a POST than a get, seeing it does things with
a parameter and doesn't return anything.
Also fixes the _update_bus_presence method that leads to access errors
when accessed from HTTP when the user is the public one (only portal/
internal users should update their presences).
Part-of: odoo/odoo#100416
*: bus, hr_holidays.
The `/bus/im_status` route polls the server every minute in order for
the user im_status to be up to date. This commit removes this poll
by sending the im_status on the bus when updating the current user
presence.
Moreover, before [1], the user bus presence was updated on each poll.
When the user didn't poll for 50 seconds, we assumed the user was
disconnected. Since [1], the bus presence is updated each 30 seconds
by the `im_status` service. This is too frequent: there is no need
to update the user presence so often.
In order not to overhelm the server with unnecessary requests, the update
presence interval as well as the delay to be considered disconnected
have been updated: the former from 30 to 60 seconds, the later from
55 to 65 seconds (assuming that a user that has missed an update
presence tick is disconnected).
[1]: odoo/odoo@a5623d2closesodoo/odoo#100249
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, scrolling in emoji picker grid had
an undesirable "snapping" behaviour, which kept the 1st
visible row in place.
This was caused by the computation of view block of virtual
scroller not taking into account small offset inside a row.
For example, in the following scenario:
```
distanceFromTop = 1000
rowHeight = 150
```
The 1st visible row was 6th one (Math.floor(1000 / 150) = 6),
which is correct.
However the row was fully visible, instead of partially cut
(1000 % 150 = 100 => 66% overflow).
This commit takes this in-row offset into account, so that
scroll position can now make a row partially visible.
Task-2985857
closesodoo/odoo#100521
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Fields param is actually not a kwargs. This cause a stack trace when opening a chat window (other than a chat with yourself) from a Kanban user avatar icon.
closesodoo/odoo#100315
X-original-commit: 95d3f4b0ea4dd5f1f9403b6e5ba97e1e2a510f65
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Following odoo/odoo@4636620004
`get_views` only pass the model fields included in the view architecture,
except for the main model when the search views is requested.
Because the search views requires all fields for the user to be able
to make advanced filters and advanced group by using any fields of the
model.
However, other views requires more field descriptions as well than
just the fields included in their architecture:
- the graph view requires all integer and float fields,
to automatically add suggestions of measures in the measures dropdown
menu. It's a bit like the search view, the user should be able
to choose any measure available in the model
(as long as this is integer or float fields)
- the pivot view requires all groupable fields,
so the user can group by any groupable fields of the model.
The JS MockServer `getViews` is adapted to include the changes added by the above
revision as well as the current revision,
for the qunit tests suite to be able to reflect these API changes
from the server side.
closesodoo/odoo#100376
Related: odoo/enterprise#31427
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
The Dialog is no more used in the call_view.
Just cleanup the code of the import
task-2783069
closesodoo/odoo#100352
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Introduce header actions so that emoji picker in knowledge
can have an action to remove emoji.
Task-2980528
closesodoo/odoo#100010
Related: odoo/enterprise#31231
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Website: the context install_filename='dummy' is used to prevent
arch_updated from becoming True while updating translations of
ir_ui_view.arch_db (if arch_update becomes True, test_inherit_specific
fails)
Fuzzy search for jsonb translated fields has been adapted in the case of
website. It may require some refactoring later.
Translated fields no longer use the model ir.translation. Instead they store
all their values as JSON, and store them into JSONB columns in the model's
table. The field's column value is either NULL or a JSON dict mapping language
codes to text (the field's value in the corresponding language), and must
contain an entry for key 'en_US' (as it is used as a fallback for all other
languages). Empty text is allowed in translation values, but not NULL.
Here are examples for a field with translate=True:
NULL
{"en_US": "Foo"}
{"en_US": "Foo", "fr_FR": "Bar", "nl_NL": "Baz"}
{"en_US": "Foo", "fr_FR": "", "nl_NL": "Baz"}
Like before, writing False to the field makes it NULL, i.e., False in all
languages. However, writing "" to the field makes its value empty in the
current language, but does not discard the values in the other languages.
Here are examples for a field with translate=xml_translate:
NULL
{"en_US": "<div>Foo<p>Bar</p></div>", "fr_FR": "<div>Fou<p>Barre</p></div>"}
Change for callable(translate) fields: one can now write any value in any
language on such a field. The new value will be adapted in all languages, based
on the mapping of terms between languages in the old values. Basically the
structure of the value must remain the same in all languages, like before.
Reading a translated field is now both simpler and faster than the former
implementation. We fetch the value of the field in the current language by
coalescing its value with the 'en_US' value of the field:
SELECT id, COALESCE(name->>'fr_FR', name->>'en_US') AS name ...
The raw cache of the field contains either None or a dict which is conceptually
a subset of the JSON value in database (except for missing languages). For the
sake of simplicity, most cache operations deal with the dict and return the text
value in the current language.
Trigram indexes have been adapted to the new storing strategy, and should enable
to search in any language. Before this change, only the source value of the
field ('en_US') could be indexed.
Computed stored translated fields are not supported by the framework, because of
the complexity of the computation itself: the field would need to be computed in
all active languages. We chose to not provide any hook to compute a field in
all languages at once, and the framework always invokes a compute method once to
recompute it.
Code translations are no longer stored into the database. They become static,
and are extracted from the PO files when needed. The worker simply uses a cache
with extracted code translations for performance. This is reasonable, since
fr_FR code translations for all modules takes around 2MB of memory, and the
cache can be shared among all registries in the worker. Changing code
translations requires to update the corresponding PO file and reloading the
worker(s).
Performance summary:
(+) reading 'model' translated fields is faster
(+) reading 'model_terms' translated fields is much faster (no need to inject
translations into the source value)
(+) searching translated fields with operator 'ilike' is much faster when the
field is indexed with 'trigram'
(+) updating translated fields requires less ORM flushing
(-) importing translations from PO files is 2x slower
Some extra fixes:
- make field 'name' of ir.actions.actions translated; because of the PG
inheritance, this is necessary to make the column definition consistent in
all models that inherit from ir.actions.actions.
- add some backend API for the web/website client for editing translations
- move methods get_field_string() to model ir.model.fields
- move _load_module_terms to model ir.module.module
- adapt tests in test_impex, test_new_api
- because env.lang is injected into SQL queries, its returned value is
now guaranteed to correspond to a valid active language or None
- remove wizard to insert missing translations (no longer makes sense)
task-id: 2081307
Co-authored-by: Fabien Pinckaers <fp@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Before this commit, the RtcSession fields were updated in the
`_willDelete` which could cause tracebacks.
closesodoo/odoo#99701
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When using the composer in mass mail mode, no explicit 'message_type' is given
to created 'mail.mail' records. By default those are set to 'email'.
In this commit we make it explicit, as it may change in a near future. This
type is not really 'notification', 'comment' or 'user_notification', so using
'email' is fine currently. It is used more for incoming emails but we don't
distinguish outgoing emails currently.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#100137
Purpose of this commit is to add some test about MailThread helpers built on
top of ``message_post`` / ``composer`` (log, post with view, ...). Some tests
about batch are also added.
Some performance tests are also added for those helpers.
Counters are updated. Note that they did not change, it is just an update
based on current master counters.
Task-2710804 (MailThread Api Cleaning)
closesodoo/odoo#100184
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* = im_livechat, snailmail
The model manager will now automatically add `isCausal: true` to inverse
of identifying fields. This commit implements the feature and removes
now unnecessary declarations of `isCausal: true` from the code.
Task-2741402.
closesodoo/odoo#100119
Related: odoo/enterprise#31290
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>