To reproduce the issue, go in the settings of the employee app,
simulate a slow 3G connection, modify the working hours:
* Select the first one, modify it but don't save it,
* Click on some others working hours consecutively
They will be all editable
* Edit them quickly
Before this commit:
- You get an error
After this commit:
- You get no error and the behavior is the same than in V12:
the working hours are updated consecutively
Note: when you stress the relational field quickly, there is a moment
where this.$el is undefined. This is the reason why the error is raised.
OPW-2088558
closesodoo/odoo#39435
X-original-commit: 2acb76ffbb2f1ca2a6af0e316da15ce605f2273a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Remove SignatureDialog from `signature.js` to put it in its own file,
`signature_dialog.js`. The purpose of this change is to be able to
require SignatureDialog in any other file and to separate dialog and
field business.
task-1878607
Before this commit, all the computation of the default widths for column
headers was done before the list was attached to the DOM, meaning that no
column was actually visible. This was a problem since columns that are
meant to stay unseen were taken into account in the calculation of relative
column widths.
Now, the same algorithm runs once the columns are visible so that invisible
columns can be properly excluded.
fixes#38744
Task 2076721
X-original-commit: 4bf98b47898b075049975dfe597f0fb92c7c14d1
Before this commit, the `width` attribute was interpreted by a jQuery node generator
function as a `style="width"` property and gave an incorrect width value to the affected node.
Now, the `width` attribute is automatically plucked in the list renderer in the
specific function used to render buttons.
Task 2076721
X-original-commit: c67b36c00ca263f51e0dd49d6e38702c4d614289
The nightly clickall runbot fail due to a crash of the underlying chrome
browser used to run the test suite. The problem is related to the
resources the browser is using. We leverage the problem by starting one
dedicated browser per app.
closesodoo/odoo#39190
X-original-commit: 228e57d980839bd2b4e9123bf26f8a64de2ae6ab
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Due to commit odoo/odoo@f4031c62f9
it was not more possible to scroll in a grouped kanban.
Steps to reproduce:
* Go to project app
* Select a project with a few numbers of task
* Create as need new task to have more task than visible on the screen
* Try to scroll (BUG)
Note: we also fix the swipe in empty column
opw-2080491
closesodoo/odoo#39168
X-original-commit: 023941e25cae34e60eaabcc54841b3d908a59414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Go on a kanban view with a scroll bar
scroll all the way down
Open a record in form view
Use the breadcrumb to go back to the kanban
Before this commit, the kanban was re-opened
but the position were we were before opening the record was lost
This was due to 40dd121938
which refactors the dom, puting the action manager on top of controllers
After this commit, when re-opening the kanban, we end up at the same position
we left it at
OPW 2074077
closesodoo/odoo#39120
X-original-commit: c0d48878c452b256859f067186567c126d8de27e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the search bar auto focus was already disable
on mobile based on media queries.
But "isMobile" equals false since we force the desktop mode.
To fix this, we use isMobileDevice which doesn't depend on the
resolution.
Task ID: 2090202
In this commit, we introduce "isMobileDevice".
Do not confuse with isMobile.
isMobile:
A frequent use case is to have a different render in 'mobile' mode,
meaning when the screen is small. This flag (boolean) is true when
the size is XS/VSM/SM. It is also updated dynamically.
isMobileDevice:
Mobile device detection using userAgent.
This flag doesn't depend on the size/resolution of the screen.
It targets mobile devices which suggests that there is a virtual keyboard.
Task ID: 2090202
Before this commit, some views appeared broken on mobile.
We don't consider this as a bug because Odoo is not supposed
to be responsive in Community edition. This feature is only
available on Enterprise.
This commit aims at clarifying this situation by clearly moving
the base requirements to support browsers' responsive to the
Enterprise edition and stating that the Community edition only
targets desktop.
It's important to note that, for technical reasons, some
responsive-related JS/CSS code may still be present in the
Community codebase but they are not meant to provide any
explicit or implicit support for responsive/mobile devices.
Technically speaking, this commit removes the viewport meta tag.
This change will then force the "desktop-like" rendering even on
small screens for the Community edition and will keep the current
behavior (scaling/zooming on small screens) for the Enterprise edition.
By doing this we do not let the users think that something is broken
and must be fixed.
So,
in Community edition, desktop is always displayed;
In Enterprise edition, Responsive Web Design is available.
We also had to adapt a test to be able to apply XPath adding
viewport meta tag in enterprise.
Task ID: 2090202
Description of the issue/feature this PR addresses:
In pivot, when we click on '+', it must open the selection box at
the point where we click.
Current behavior before PR:
The box opens at the top of the page
Desired behavior after PR is merged:
The box opens at the point where we click
id=2066675
closesodoo/odoo#39034
X-original-commit: 989df08fd8bbfa4a1f05784b599b1657a9b28fe5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the trash icons and "OR" indicator of each filter
was too far and couldn't be seen
Now, both of them are closer to the filter and can be seen in any circumstance.
Task 2073707
closesodoo/odoo#39026
X-original-commit: 87a91c78fb15ee941e72023e02e539de64f0486d
Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
A 404 will take 3 to 5 seconds to be resolved and execute +- 1900 query, to return
a rendered page which is quite expensive, especially when multiple missing images
are rendered in a view.
Catching static route and marking them as not frontend will help to avoid to handle miss
on static resources. In this case server returns a standard 404.
This commit also fix a iframe src in order to avoid a 404 on
/web/(test )/report/html/some_report (thx to aab-odoo)
X-original-commit: 818d0cb59fbae78d0edf06318082981f318e4db7
On a list view, Add a custom filter on a date
Change the operator to "in between"
Change it back to "equal"
Apply the search
Before this commit, the label of the filter still was in between
Whereas it should have been "equal to ..."
After this commit, the label of the filter is correct
OPW 2085951
closesodoo/odoo#38705closesodoo/odoo#38869closesodoo/odoo#38936
Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
X-original-commit: bb775152b79f1212258ff47daac387eaf11f64e2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
In a list view, create a custom filter involving a date or datetime field
Before this commit, the domain that was sent to the server
contained the date or datetime as the pure string
representation that Moment.js constructs
that is a ISO compliant one, containing info on timezone
After this commit, the format is the one of the server, in UTC
and NOT ISO compliant. Also, the format for date is dealt with
OPW 2085936
X-original-commit: 1f1fa173c38dae105637edeb3a1e856e9748a14f
Purpose
=======
We want to add an option on the widgets
- many2many_binary,
- binary,
- image
This option specifies what file extensions the user can pick from the file input dialog box.
Examples
========
```xml
<field widget="many2many_binary" options="{'accepted_file_extensions': 'image/*'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': 'application/pdf'}"/>
<field widget="image" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="binary" options="{'accepted_file_extensions': '.pdf,.svg'}"/>
```
How
===
Add an option (accepted_file_extensions) in the template ``HiddenInputFile`` (the widget many2many_binary is using this template)
So, we can also use this new option in others widgets using ``HiddenInputFile``
In the many2many_binary, read the ``nodeOptions`` and set the widget attribute ``accepted_file_extensions``
We also have to fix some other widget, because an property ``image_only`` was already existing in the template ``HiddenInputFile``
(we just need to replace ``image_only=True`` to ``accepted_file_extensions='image/*'``
The widget ``FieldPdfViewer`` (pdf_viewer) now use the new option to filtrate PDF
(instead of removing the <input/> and adding <input accept='.pdf'/>).
Tests
=====
We also test if the option is correctly set on the <input/>
- binary
- image
- many2many_binary
Impacted widgets
===============
- many2many_binary
- image: this widget use ``options="{accepted_file_extensions='image/*'}"`` instead of ``image_only=True``
- tablet_image: same as ``image``
Task #2082815closesodoo/odoo#38351
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
The attribute `self._fields` is not well named. This is not a list of instances
of the Field class.
It is a list of field names to export.
e.g. 'journal_id', 'account_id/name'
X-original-commit: 6225ce60082d5d2b5fec0e678fe2a1f3f9b93668
When exporting a grouped list view with some nested groups, the aggregate value
of parent groups are not correct. It always sums aggregated values of children
whether the group operator is 'sum' or not (could be 'max', 'avg', ...).
This behavior is wrong and can even lead to a crash if the aggregated field is a
date field (e.g. with group_operator='max'). (Try two sum two dates...)
The quick fix 85cf47f was merged just before OXP to avoid any crash. This fix
limited the support of aggregates to only int and float fields.
This commit remove this limitation.
This commit correclty implements the aggregation for parent group for all
field types and all group_operator.
This commit also improves the export feature tests.
X-original-commit: 5e7e4fa98698967e3c4fd0903f4aa8e91981a6cd
Before this commit, when we export a list with a groupby on
boolean, the groupby title 'False' is replaced by 'Undefined'
in xls document.
After this commit, with an export and groupby on a boolean, we
will have correct title: True and False.
X-original-commit: 7e2c7bc35f2a5b3bc22e0e6c9d3b38279cda9367
Before this commit:
When there few elements in kanban and a search panel, all kanban
cards try to take a maximum of height and become deformed.
After this commit:
The behaviour of dimensions of kanban cards must be the same with
or without searchpanel.
closes#38556closesodoo/odoo#38871
X-original-commit: a95cbbd631a2fa9be62eb42cba43e853fdf4b789
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
The fieldbinary widget has an internal max upload limit set to 25mo.
This was set a long time ago, probably more than 5 years ago. Since
then, a lot of things have changed and it may be more frequent for users
to hit the limit. And it happens for some users, we had to increase
locally their limit.
Also, nginx is configured to accept files up to 64 mo, so it makes sense
that the web client also uses that same limit.
closesodoo/odoo#38856
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This option, if set to True, prevents the user from modifying the
color of the tags.
Part of task 2070454
closesodoo/odoo#38848
X-original-commit: a62b65a8f9114493064d4efae92825814a880c04
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- The copy CopyClipboardChar widget is not nicely rendered for very long strings (e.g. URL).
- This commit modify the behavior of the CopyClipboardChar widget to display it nicely win such cases.
TaskID: 2059972
Before this commit, it was not possible to show a message using a client
action. (e.g. show a success message only with core in Python)
Now, it's possible using a client action. This client action call
displayNotification and so we can use the same options also.
A test is added to be sure that this action do not change the current action
Note: in the future a custom registry may be created in a refactoring
to specific function action registry.
X-original-commit: 8775fd670b6b3ec19a77fc0eab72d2223baa36c8
Before this commit, if we use some client action like: reload, logout, ...
in the console a warning is show, because the action are function and not
AbstractAction.
After this commit, if the client action is not an function and not
a AbstractAction the warning is show.
X-original-commit: 122b76594aeb2c5d923d13c040c2da2048133aac
Before this commit, when we have a list (editable top) in a form
with some mandatory fields and some existing rows. If we click on
'add a line', a new empty line appear on the top, then we click on
the last row, the empty row will disappear and we will have a
traceback.
After this commit, if we repeat this scenario, we click on the last
row, we will be able to edit this last row.
closesodoo/odoo#38471
X-original-commit: 996f77b03eaf6dd646b1816e7f70209d5ee6f8df
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
-Import a subscription with end date beyond 200 in the future (ex: 2500-01-01).
-Open the subscription and click the Edit button.
Before this commit:
A stacktrace appears indicating that a date is not valid. It's not possible to
edit the subscription.
After this commit:
The maxDate of the date picker has been increased to 31/12/9999, allowing the
user to edit subscriptions whose end date is that far in the future.
A test `toggle datepicker far in the future` for this case has been created.
closesodoo/odoo#38527
Opw: 2079696
X-original-commit: 32b6131c04fef7a542a0ccbdb924d177627bfe38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this rev., if the week_start param (the first day of week)
of the user language was changed, it wasn't reflected on datepickers
(however, it worked fine in the calendar view). This rev. makes this
work by updating the moment locale with the corresponding param.
Fixes#36450Closes#36532closesodoo/odoo#38472
X-original-commit: eeb518316f25d652bea3ec6d387db6ad93284fb2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When there are many events at the same moment in a calendar,
events are thin and on mouse hover the event take all the width.
Before this commit, when we drag or we resize a event in calendar,
the event returns to the state thin.
After this commit, the width event stay width during resizing and
draging.
closesodoo/odoo#38384
X-original-commit: 405294602070590083a2b438f631615f72000292
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This controller never really worked in the last 3 versions.
It was fixed in 11.3 with e9350993ca but broken with refactoring in 12.0 at a
higher level with 19eacf7d23.
It was even worse in 13.0 as it was leading to a traceback: `view_type` field
got removed with 3cd7ed07a2 but this controller was still reading that
field.
closesodoo/odoo#38355
X-original-commit: a5c4e262449fef03d05d5250e4523832db5fbf00
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- fix condition to correctly display company logo placeholder
- use avatar_grey on the "Contacts & Addresses" as white on white is not visible
- use `cover` to avoid excessive zoom on mobile
closes#38001closesodoo/odoo#38319
X-original-commit: 1210cb70bec421936c9d332b1347797bc83845cf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Allows the quick create on m2o in list views
Before this commit, when entering a new value in a many2one in a list and
exiting the cell through a click, the quick-create modal appeared for the
duration of the mousedown.
Now, the modal remains and allow to edit the new many2one value
Task 2076380
closesodoo/odoo#38289
X-original-commit: c00f84eb0a176b8d23927080078eb02dc2e5d806
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We don't want the browser to fill inputs in the backend.
Most of the time this is useless but sometimes it is
even problematic. For example, focusing an input in a
modal can trigger autofill not only in the modal but
also in the whole page. If there is an input outside
the modal and it is recognized by the browser as a
candidate to fill, bad things occur.
For that reason, we set the attribute autocomplete to
"none" by default for input elements.
Note that "off" does not work all the time because
the browsers sometimes decide to ignore it.
Task ID: 2076730
closesodoo/odoo#38039
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This reverts commit 08108486d5.
+ Fix the url that add a useless ending / and so a useless redirection.
There are no problem of mixed content or anything else, if you configure nginx
and launch your server in proxy-mode as specified into the documentation.
closesodoo/odoo#38196
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit adds a test case for the recently introduced 'records_draggable' option in the kanban
view.
Initial test was not written because of social app rush before 13.0 release.
'records_draggable' feature introduced by 869a5b83a5
Task#2082068
closesodoo/odoo#38166
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The feature that allows res.lang's first day of week parameter
to be the reference point of web calendar
has been introduced at 27b30daea5
A few other came on top of it to fix a few things
Before this current commit though, only Fullcalendar was
rendered using that initial value, nothing was done
to actually fetch the right data
After this current commit, we fetch data from the server
according to the range displayed by the calendar
OPW 2072872
closesodoo/odoo#38131
X-original-commit: 0bd82ef6489f3ea1da26fb6ee337b15e3f13d4e5
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Since bb37077610 (apparently), trying to regenerate the assets through the
crash manager result in a traceback.
Indeed, utils was not defined.
closesodoo/odoo#38129
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Take the following QWeb snippet:
```
<div t-field="product.image" itemprop="image" t-options="{'widget': 'image'}"/>
```
When the image is rendered, the `itemprop="image"` remains on the
`<div>` tag, it is not set on the `<img>` tag.
We add the support of the `itemprop` option, so it can be added to the
`<img>` tag:
```
<div t-field="product.image" t-options="{'widget': 'image', 'itemprop': 'image'}"/>
```
opw-2076934
Before this commit, invisible filters were rendered by
QWeb but hidden in the filter menu. This used to break
the keyboard navigation in the filter menu.
Now we don't render at all those filters since they were
completely useless anyway. This fixes the original
problem.
Task ID: 2057012
closesodoo/odoo#37567
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Backport of 64f6e50d0c, with a test!
Closes#27109
Purpose
=======
If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.
Specification
=============
By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.
closesodoo/odoo#38109
X-original-commit: b5b992d9c4e85c224ded795ff9ce14d1608b3ed6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Open a search view modal ("search more" on a m2o)
Select a filter that will make records fall to zero
The modal will shrink
Trigger the opening of a dropdown (Filters), and make sure
that there are many many menu items there (many filters)
Before this commit, the dropdown was bigger than the modal
which had a scroll bar,
however, the dropdown itself was not scrollable properly
So, clicking in it to select a menu item will fail when scrolled
all the way down, because elements did not actually followed the scroll
After this commit, the dropdown follows the scroll, and it is possible
to use it even way down
We use a behavior of bootstrap 4 itself:
FIX: https://github.com/twbs/bootstrap/pull/24976
ISSUE: https://github.com/twbs/bootstrap/issues/24251
OPW 2076337
closesodoo/odoo#38080
X-original-commit: c3273b7a1c0c09aeef23df4ba4be8d68fd46a6f3
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>