With the discuss refactoring, two memory leaks were introduced:
- the activity service opens a broadcast channel for cross-tab
communication. Because services have no destruction mechanism, the
broadcast channel is never closed, and since most tests create their own
test environment with services, each test would leak an instance of the
activity service as it is captured by the bound onmessage function. The
activity service holds a reference to the mail store which results in a
large leak
- the RelativeTime component creates a timeout so that it can update its
time every minute or every hour depending on how old the message is,
this timeout is cleared when the component is destroyed. This component
tries to initialize the value of its timeout to `null`, but it does so
*after* calling the method that actually sets the timeout, causing the
timeout to be overriden with null and never cleared
The BroadcastChannel problem has been solved by adding BroadcastChannel
to the browser object, and patching it in the test setup code of web, as
it's a generic problem with BroadcastChannels. The timeout problem has
been fixed by simply reordering the lines so that we don't override the
timeout and it gets correctly cleared when the component is destroyed.
closesodoo/odoo#128768
X-original-commit: bd25f14d7a746fe48e09edea7ebb4aaa4634fbdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.
The nested checkboxes were growing too much on smaller screens
making the content overflow.
This commit adapts these checkboxes settings to make them more readable
and consistent.
It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.
In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.
Task-3113372
closesodoo/odoo#126347
X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
before this commit, in the database manager page, on
clicking the Neutralize label in the db duplicate
and restore page is not check/uncheck the neutralize
checkbox.
after this commit, on clicking the label Neutralize
the field can be checked and unchecked as other field
in the same form.
closesodoo/odoo#128671
X-original-commit: 64e3d52591db49a4a441f170e216f0e3aca4fa23
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
This commit reorganizes the theme options to make them easier to find.
It also adds the following options:
- 'Font size' for each of the six headings
- 'Font (family)' for each of the six headings
- 'Margins' (top & bottom) for paragraph & the 6 headings
- 'Line Height' for paragraph & the 6 headings
- Harmonize buttons options with the custom button ones
task-3140991
Part-of: odoo/odoo#111621
Commit [1] inadvertently broke the handling of the "class"
attribute on a <widget> node, in the view compilers. When set,
the value of the "class" attribute was given in props to the
Widget component as "name", instead of "className".
[1] https://github.com/odoo/odoo/commit/0b574df2599da3dae66b9785198420d707a280a3closesodoo/odoo#128646
X-original-commit: 3024f2121848ec414d596ef9c3eb0a1bd7e6cfd2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prior this commit, non perfectly squared `.o_avatar` images were
not correctly fitted in the their boxes
task-3419159
part of task-3326263
closesodoo/odoo#128526
X-original-commit: cbe665eb2929a01e12714ae8e3fe66610780e7b9
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
On smaller screens, `.o_status_bar_buttons` are displayed in a dropdown.
This commits reset the styles of these buttons when they are displayed
in the dropdown, so they look like regular dropdown items
task-3414462
part of task-3326263
closesodoo/odoo#128462
X-original-commit: 071d92b3926f6a062ca3b0b0c9c70d8567bb6899
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit removes the displayName variable of the calendar controller
since it wasn't used anymore and the extension of the displayName is now
updated in the ProjectCalendarController instead. This fixes an issue in
project where the extension of the displayName in the project calendar
controller ( - Tasks by Deadline) would not be shown in the view.
opw-3410987
closesodoo/odoo#128461
X-original-commit: 120ab2513b487d0c117e5c67ed76e6d154d0243f
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
The library used to generate PDFs does not support the WEBP image
format. For those images to be included in reports, they need to be
converted. For security reasons, this conversion cannot be done on the
server, therefore it was decided to keep an already converted copy of
such images.
This commit converts uploaded WEBP images to JPEG and uploads them both
so that the report generation can use the JPEG instead.
This commit also pre-generates the resized version of images - and JPEG
versions of each of them.
task-2774352
Part-of: odoo/odoo#85494
*: mail, mrp, test_website, web, web_editor
Before this commit '.webp' images could not be used in odoo.
After this commit '.webp' images can be uploaded to odoo.
- can be used in image field
- can be used in HTML field image
- can be used in mails and website
- can be transformed (shape mask, filter effect, crop, rotate, resize,
adjust quality)
task-2774352
Part-of: odoo/odoo#85494
Be consistent with the terminology used in all views,
'None' doesn't add value and makes the private task stage user-friendly.
Add filter "Private Tasks" to search private tasks easily.
task-3300649
Part-of: odoo/odoo#120668
*: im_livechat, website_event, website_event_track_live,
website_livechat
The goal of this commit is to ease the removal of web.Widget while
keeping web.public.widget.
The reason we want to keep the public widget is because it is not
currently possible to hook OWL components to existing DOM elements,
which is mostly what is done in the frontend.
To remove the inheritance, most of the code from web.Widget was
duplicated into web.public.widget.
This commit also adapts a few widgets which were using web.Widget as
frontend widgets.
However, there are still legacy widgets used both in the backend and the
frontend. Those were not adapted.
This commit adapts the following widgets:
- website_event: EventRegistrationForm
- website_event_track_live: WebsiteEventReplaySuggestion
- website_event_track_live: WebsiteEventTrackSuggestion
The modules that still use web.Widget but were not adapted can be listed
by using: `odoo.__DEBUG__.getDependents("web.Widget");`
Following this commit, any new frontend widgets should exclusively use
web.public.widget. They should have done so before, but in the near
future, widgets using web.Widget will no longer work.
task-3249625
closesodoo/odoo#117210
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In the next commit, the PublicWidget class will be made independent of
the legacy Widget class.
Therefore, the RootWidget cannot be defined before the PublicWidget as
it will extend the PublicWidget rather than the legacy Widget.
This commit moves its definition after the PublicWidget definition.
task-3249625
Part-of: odoo/odoo#117210
*: mail
This commit fixes the href used by the PhoneField. Following the
specs of a phone uri, spaces must be removed from the phone number
when using the href attribute.
A test has been added to verify that any spaces are removed from
a given phone number.
In mail, the SMS button href has been edited for the same purpose.
task-3371999
closesodoo/odoo#128383
X-original-commit: 9ff0270c8acf9596ebd404627c4f5b1a98b37c59
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.
task-3391739
closesodoo/odoo#127406
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
We make the elements of the path description be a bit above the bottom
line in the model field selector.
closesodoo/odoo#121688
Related: odoo/enterprise#41660
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
We add the class o_input to the root node of the DomainSelectorAutocomplete
component in order to get a line below the tags and the input value.
Part-of: odoo/odoo#121688
For the relational fields and the operators =,!=,in,not in, we allow
the user to use autocompletion as in a many2one or a x2many field.
Task ID: 3291990
Part-of: odoo/odoo#121688
We improve the facet descriptions of the domain created via the domain
selector. We do this in several ways like it was done for the readonly
mode of the domain selector:
- instead of displaying ids for relational fields, we display the
associated names.
- instead of displaying values for selection fields, we display the
associated labels.
- quotes around strings are not displayed by default. They are if
there is some ambiguity: the presence of a value of another type
like 0, false or an expression makes necessary to put them.
Task ID: 3291990
Part-of: odoo/odoo#121688
We improve the readonly mode in several ways:
- instead of displaying ids for relational fields, we display the
associated names.
- instead of displaying values for selection fields, we display the
associated labels.
- quotes around strings are not displayed by default. They are if
there is some ambiguity: the presence of a value of another type
like 0, false or an expression makes necessary to put them.
Task ID: 3291990
Part-of: odoo/odoo#121688
Before that commit, we could get two operators with the same key to
display at the same time. In that case, an error would be thrown by OWL:
Got duplicate key in t-foreach... . We fix that problem.
Part-of: odoo/odoo#121688
Purpose:
--------
Rename the label "view in kanban" to "display in cards" in the properties
definition popover. The rationale is that the related enterprise PR allows
to display the `article_properties` in the popover of the `item calendar`,
using the kanban properties widget.
Therefore, checking the now called "display in cards" checkbox now allows
to show the property in the kanban cards and in the calendar popovers.
Task-3239985
Part-of: odoo/odoo#121608
This commit allows to define a `onWillStartModel` method in the calendar
controller that will be used as `onWillStart` option of the calendar
model.
Purpose:
--------
The related enterprise PR introduces a new "item calendar" feature in
Knowledge that allows to embed calendar views using article properties
to display these articles in the calendar.
To do so, one needs to modify the fields mapping before the model is
loaded for the first time, so that the records are fetched using the
properties in the search domain.
The `onWillStart` option of the `useModel` function is perfectly suited
for this.
Task-3239985
Part-of: odoo/odoo#121608
Even with a limit of 1, the domain validation done in the domain selector
dialog at confirmation can be too costly (see PR message). Since we do
not have (yet) the tools to validate quickly domains server side, we
simply drop the validation server side.
closesodoo/odoo#127832
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
On confirmation of a domain created in the domain selector dialog, a
validation check involving the server is done. That validation based on
a search_count can be rather/too costly (see PR message). Since the
search_count is done in silent mode and the confirmation button is not
disabled on click, if the validation takes too much time, the user is
lead to think that the first click did not work and clicks again, and so
on...
Here we disable the button on appropriate time to avoid that situation.
Part-of: odoo/odoo#127832
https://github.com/odoo/odoo/pull/114827 added a new attribute in the calendar
view that allowed passing a form view id that is used in the calendar module to
show a different form view when trying to quick create an event. This new
attribute, however, was only used in the calendar module. With this in mind, it
made sense to allow using this attribute in other modules. This commit
implements this, however, the approach used was different. It was decided to
merge quick_create_form_view_id with quick_add as both are related to the
same feature: quick creation of a record in the calendar view. Now, quick_add
receives either a boolean (original behavior) or a number representing the form
view id to be shown when quick creating a record.
task-3286969
closesodoo/odoo#122923
Related: odoo/documentation#4707
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit, in readonly daterange fields in list views, if one
of the dates was set, it was unclear which of the 2 fields it was (it
simply diplays the formatted value of the field which is set).
Now, the arrow icon appears on the right or left side to clearly reflect
whether the value is the start date or the end date (list views only).
closesodoo/odoo#127734
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
Before this commit, the way focus was handled by the DateTime feature
hook was inconsistent. This caused the date/datetime/daterange fields to
not be able to open the picker when clicking on the "Add start/end date"
button, and effectively lose the value set on the field on save.
This commit introduces a more consistent focus handling as well as a
helper returned by the hook to open the picker on command.
Part-of: odoo/odoo#127734
Before this commit, the "Apply" button in date pickers (not datetime)
would overflow from its popover in desktop view since its position is
set to absolute, and since there are no time pickers to extend the
height of the picker it simply overflows.
This commit ensures that the buttons are correctly displayed when there
are no time pickers.
Part-of: odoo/odoo#127734
Before this commit, there were some uses of illegal CSS selectors such
as `:not(.classA, .classB)`. The proper way to use multiple `:not`
statements is to chain them. This commit takes care of that.
Part-of: odoo/odoo#127734
From commit 2ecfed335d, clicking on the arrow of a m2o opens the
record in form view and passes it the context of the current view.
After this commit, only the context defined on the <field> is passed.
Problem:
An example of a problem, is the use of an incorrect active_id in the
second view that is passed through the first form view to the second.
Previously, the active_id of a form view was always the id of the record
and not that of the previous view. This behaviour is debatable, but it
leads to major changes. We therefore prefer to revert to the old behaviour
and no longer pass the entire context in order to avoid this problem.
How to reproduce:
- Go to a form view with a m2o
- Click on the arrow of the m2o
Before this commit:
The view context contains all the context from the first form
view and the second.
After this commit:
The view context contains the context of the m2o field and the second view.
closesodoo/odoo#127538
Taskid: 3394945
X-original-commit: a9bec1fec3ff08461732ef2717457524339eb716
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose:
--------
Currently, the calendar common popover has an incorrect color class if
the value of the field used to color the records in the calendar is not
a number. Therefore the popover header remains grey although the event
is colored, and the header content is misaligned.
This commit fixes this behavior by using the `getColor` method to obtain
the class name to use in the popover, which is the method currently used
to obtain the class name to use in the event. If this method does not
return a number, the default color class (o_calendar_color_0) is used.
Task-3239985
closesodoo/odoo#128169
X-original-commit: b159a98e0f0c89fab91b706895bbc1884a8cbd4e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the report action's context was not passed to the download route.
This was problematic as some crucial keys may be forgotten when downloading the pdf.
After this commit, we do pass the full context to the download route, ensuring consistency of the context
across calls.
closesodoo/odoo#126963
Related: odoo/enterprise#43441
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Before this commit, it was not possible to customize the way an item
in the selectMenu was displayed.
After this commit, with the help of a subtemplate, it is now possible
to subclass the SelectMenu and customize how an item is displayed
Part-of: odoo/odoo#126963
The new CodeEditor dismissed the notion of ace EditSession.
This serves to split the ace internals (history, values etc...) according
to the logical unit of a session.
After this commit, from the CodeEditor point of view for each edited resource (a view mostly)
corresponds one session.
Part-of: odoo/odoo#126963
Before this commit, the confirm button of the confirmation dialog
was always btn-primary.
After this commit, it can take a props to modify that.
Part-of: odoo/odoo#126963
In sign, we don't want to show the view all option when choosing sign options
for a sign item in a template. This commit adds the noViewAll prop to the
many2many_tags_field component.
task-3233643
closesodoo/odoo#122157
Related: odoo/enterprise#39787
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Since [1], the DOM of the studio icon has changed, and no longer
matches the selector of the clickbot menu. As a consequence, it
no longer entered Studio. This commit fixes the selector.
[1] odoo/enterprise#9da0c9fab6c066aa97bc8cb99eb0e54b5a76a08f
closesodoo/odoo#128040
X-original-commit: aba563c58ec890bbf33d4a7d3cc34e9b2a4012a0
Related: odoo/enterprise#43910
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This is reproducible in lots of ways, here's one:
- Inventory -> Products -> Any storable product
- Click on Update Quantity
- Click on the cell where the 'History' and 'Set' button are
This raises a traceback as the `cell` assigned right before is null at
that point. Indeed, since those cells from a special kind of column made
of buttons (o_list_buttons), those don't have a `name` attribute to
find, hence the traceback.
closesodoo/odoo#128014
X-original-commit: 222dc64be51cc8e711278cff96392e755ba39fd4
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
=== ISSUE ===
If you open the calendar module with an event with attendees, the status
button showing if the user accepted the invitation or not is missing a
left margin.
=== AFTER ===
We add a `ms-1` class to the buttons to space them correctly.
task-3389679
part of task-3326263
closesodoo/odoo#127976
X-original-commit: 86595f718ec5824d53f49ae7495677dd31551d57
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit simply restricts the clickable with of any checkbox component
to be restricted to the checkbox (or toggle) itself so that the user can
no longer toggle it from possibly a long range.
opw-3378955
closesodoo/odoo#127118
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit reduces the vertical padding of `.o_kanban_header` to
display more kanban cards at a time in the view vertically
part of task-3326263
closesodoo/odoo#127827
X-original-commit: dc5f4f7cef67b256eb50cb15e1ae1f22aa124966
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit makes use of the useAutoFocus hook to focus the input
when the SelectMenu opens. This usage of the hook can replace the
manual focus that was applied when the dropdown opened.
The feature can hardly be tested with newer tests, since the behavior
is identical, and the focus on the input was already tested.
closesodoo/odoo#127864
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Steps to reproduce the bug:
- Go to Apps, and install the Knowledge App.
- Go to Knowledge and create an article, and a child article.
- Inside the child article, go to Properties tab and add a property.
- Go to edit the property, and inside the popover,click on the
delete button, atleast 2 times.
- Now we got more than 1 popover to confirm the delete of the
property, click delete on all of them.
Issue:
Once the first popover is confirmed, we properly delete the property
but now we are going to get an error because the property is already
deleted and we won't be able to find the property to delete.
Solution:
We need to check if we can find the property we want to delete
before doing any further actions.
opw-3371753
closesodoo/odoo#127584
X-original-commit: 7f5aed12fb143928cc82eeeea712363cb79b1171
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
This commit forces the video element to take all the space available.
Steps to reproduce:
* Open the barcode APP (on iOS device)
* Click on "Tap to scan"
* On iOS the video element doesn't take all space => BUG
closesodoo/odoo#127763
X-original-commit: 29e677ed84c0b7324488cfebf2d44b9247716c54
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Before this fix, a condition like "Foo is not set" created via the domain
selector would be badly described in the facet as "Foo is set".
We fix that problem and add a test that covers that situation and similar
ones.
closesodoo/odoo#127447
X-original-commit: a6b7de5d62906e5508585e0b994bf95544d10476
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit fixes the filtering of choices when the choices or the groups
props values are updated. Before this commit, the filter was only triggered
when the length of choices or groups differ.
Instead, it is prefered to apply the filter of choices whenever those props
are updated (in a dedicated useEffect).
A test has been added, updating the choices props, while having an object with
the same number of choices, while having different values. Before this fix, the
filtering wouldn't be applied correctly, since the filter wouldn't be triggered
because the object has the same number of values in it.
closesodoo/odoo#127733
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
This commit changes the behavior of the "Search More..." option in
Many2XAutocomplete and analytic distribution by making it available
as long as there's at least one record in the search results and by
renaming it to "View all".
task-3258625
closesodoo/odoo#126041
Related: odoo/enterprise#43660
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>