Commit Graph
13058 Commits
Author SHA1 Message Date
jbm-odoo 3fbd67f265 [IMP] web: Add support to display unusual days in green
Purpose
=======

Allow to add an attribute ``show_unusual_days="True"`` to display
some days in green, according to a linked method ``get_unusual_days``
that should be defined on the related model to return all the
concerned days for a given period.
2019-11-06 10:48:52 +00:00
Aaron Bohy c4a339e839 [FIX] web,sale_product_matrix: allow to open matrix
Before this rev, it crashed when opening the (sale or purchase)
product matrix (e.g. on runbot, go to quotations, create, add a
line, select 'My Company tshirt').

This was due to a recent override of _applyChanges (see 4bf98b47),
which didn't return the value returned by super.

OPW 2116083

closes odoo/odoo#39747

X-original-commit: 49626acbacb87a6f5d37bea22d0b51a506121914
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-04 13:39:07 +00:00
jvm-odoo 53902e8d76 [FIX] web: fix form view dropdown's buttons shifted on Edge
In form views, there are stat buttons.

When the window size is too small, some buttons are packed into
a "More" dropdown.

Before this commit:

    - The form view dropdown's buttons are shifted on Microsoft Edge
      and IE 11.

After this commit:

    - The form view dropdown's buttons are not shifted anymore on
      Microsoft Edge and IE 11.

There was a fixed line-height on the button's icon. On Edge and IE 11,
it makes the icon moving down and this causes the offsetting.

The purpose of the line-height was to fix the button height to 44 pixels

So, I set up the button's height and centered the content.

Also, I removed a useless border-left because there was already one
border on the dropdown container.

OPW-2079694

closes odoo/odoo#39635

X-original-commit: a7d9f2a5a94662602a34f7e68e5cd0c4cd07c7f3
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-10-31 11:06:51 +00:00
fw-bot d019c002a7 [FIX] web: fix form view "More" button
In form views, when the window size is too small, a "More" button
appears and it should contain the overflow buttons.

On all browsers, the "More" dropdown doesn't contain the expected
amount of buttons, so it is shifted on the second line.

Before this commit:

    - The "More" dropdown doesn't contain the expected amount of
      buttons, so it is shifted on the second line.

After this commit:

    - The "More" dropdown contains the expected amount of buttons
      and it is not shifted on the second line anymore.

OPW-2079694

X-original-commit: 2bda8230fba07a229fcda77a1528694a0e317917
2019-10-31 11:06:51 +00:00
Lucas Perais (lpe) c40e06fd39 [FIX] web: dropdowns can't be in a relative-positioned element
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

https://github.com/twbs/bootstrap/issues/26512
https://github.com/twbs/bootstrap/issues/28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at https://github.com/odoo/odoo/pull/37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121938

closes odoo/odoo#39541

closes odoo/odoo#39636

Original-signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
X-original-commit: 7f72b837473f68a1dcd6a303ac1bf355dddcc2b1
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-31 11:07:12 +00:00
Lucas Perais (lpe) 18765dde73 [FIX] web: dropdown in modal in RTL mode
Be in Right to left

Open a m2o search more, to get onto the list modal
toggle the filters menu

Before this commit, the filters dropdown was almost invisble
and too much on the right anyway

This was because the RTL was not taken into account

After this commit, we anchor the dropdown on the right
(both as in good and as in side) side of its trigger button

Also, when modifying the dropdown, by developping the Custom Filter
we force the repositioning of the dropdown, to take those new elements
into account

It is expected though that after this commit, in RTL, the
dropdown in a modal that has a scrollbar (which is on the left)
will be slightly pushed to the right. It is usable and visible though
Some kind of plumbing using $el.data('offset', fn) from popper.js
is possible, but has been deemed not robust enough

Docs
https://getbootstrap.com/docs/4.0/components/dropdowns/#methods

OPW 2088934

X-original-commit: 105b4affd65ea23e1aa65b53f4595c174c9984ef
2019-10-31 11:07:12 +00:00
Lucas Perais (lpe) 9d2e3fcd61 [FIX] web: list: optional field dropdown expands toward the list
Be in RTL mode, on a list view
Click on the button to set up optional fields

Before this commit, the dropdown expanded to the right, and was partly invisible

After this commit, we dynamically set to which direction the dropdown should expand
depending on RTL/LTR
Consequently the dropdown is fully visible in either mode, and expands to the list
rather than away from it

closes #39402

closes odoo/odoo#39628

X-original-commit: fb914d176de5a4711f11de32945ebaec0164f62e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-31 10:17:57 +00:00
Christophe Monniez 8d5da6e4be [IMP] tests: log a warning when HttpCase test in at_install
When loading a page on an existing starting database, registry is not
fully loaded causing potential error when trying to access model
existing in database (views, menitem, ...) since model added in last
loaded module does not exist in registry.

Thus, executing browser js test may lead to errors when executed during
an update on a database with other modules installed.

HTTPCase should be executed post_install to ensure that registry is
fully loaded to avoid this problem.

Since HTTPCase are slower than other test, it is also a good idea to
execute them at the end, in order to prioritize fast fail.

With this commit, a warning is isued if such a test class is tagged to
run at install time.

While at it, remove deprecated at_install and post_install helpers and
remove the deprecated phantom_js alias.

closes odoo/odoo#39462

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-30 12:35:23 +00:00
Lucas Perais (lpe) 0562940f2c [FIX] mail: dicuss can save favorite filters
In discuss, make a search with some stuff, and try to save
that filter as favorite

Before this commit, there was a crash, because the Discuss action
did not implement what the controllers do to save favorites.

After this commit, it is possible to save a filter as favorite

OPW 2087258

closes odoo/odoo#39519

X-original-commit: 5514a414324675bf5c2cc0360e429a7d2548b16f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-29 15:16:17 +00:00
Lucas Perais (lpe) 1d40e94011 [FIX] web: calendar: fetch records in right timezone
Before this commit, the calendar searched records on the wrong time ranges
which did not take into account the timezone of the user
It obviously resulted in some records not being there

After this commit, all the relevant records are fetched according to the right
time range in UTC, corresponding to start/end of the week/month/day of the calendar

OPW 2076114

closes odoo/odoo#39466

X-original-commit: 0f10927efe490bd82e7c23e0fc646dd6c8de2d27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-28 15:49:14 +00:00
Lucas Perais (lpe) bbbfca2d97 [FIX] web, tools: static inheritance supports replace in debug mode
Have a parent template
Have a child, in extension inherit mode of the parent
The child has a xpath like
`<xpath expr="." position="replace" />`

Before this commit, there was a crash.
That was because the Comment
(which indicates which templates modified the parent)
was taken as the replacer node
instead of the actual content of the xpath

After this commit, there is no crash, and it works as expected

closes odoo/odoo#39453

X-original-commit: 02d790e1d21b78395e489f57bf30c82f728cbee6
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-28 14:15:53 +00:00
jvm-odoo e2176749f6 [FIX] web: fix relational field slow connection multi-edit
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

closes odoo/odoo#39435

X-original-commit: 2acb76ffbb2f1ca2a6af0e316da15ce605f2273a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-28 11:54:10 +00:00
svs-odoo c5fbb9cc23 [IMP] web: add widget signature
Adding a new widget to display a sign button in the form view.

task-1878607
2019-10-28 10:46:06 +00:00
svs-odoo 49b5f30202 [MOV] web: signature_dialog
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
2019-10-28 10:46:06 +00:00
Xavier-Do bf7386f181 [FIX] web: use BaseCase instead of TestCase after saas-12.5
closes odoo/odoo#39329

X-original-commit: e2d7cf7898704c82f25556b0b0edb87c05ec5903
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-24 11:22:25 +00:00
Julien Mougenot e8d300723f [FIX] web: list: recompute default values for columns when visible
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
2019-10-24 06:39:46 +00:00
Julien Mougenot 337fd81157 [FIX] web,mrp_subcontracting: list: remove width attribute for button
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
2019-10-24 06:39:45 +00:00
Julien Castiaux 6c37759a48 [FIX] web: nightly clickall timeouts
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.

closes odoo/odoo#39190

X-original-commit: 228e57d980839bd2b4e9123bf26f8a64de2ae6ab
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-22 14:08:06 +00:00
Jeremy Kersten 2cab9a8341 [FIX] website: clean sitemap
followup of 8a0fc6476c70a4126043de3b3efbd1096e41f968

task-2065018

closes odoo/odoo#39211

X-original-commit: bfa239b59c4d02c2b03ab8a84b52bc8f77704e41
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-22 16:36:37 +00:00
fw-bot 715d270c45 [FIX] web: not able to scroll in long grouped kanban
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

closes odoo/odoo#39168

X-original-commit: 023941e25cae34e60eaabcc54841b3d908a59414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-10-22 11:12:01 +00:00
Lucas Perais (lpe) 52f67d87d1 [FIX] web: web_client o_content is scrollable, not action manager
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

closes odoo/odoo#39120

X-original-commit: c0d48878c452b256859f067186567c126d8de27e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-21 12:26:12 +00:00
Romeo Fragomeli 56b91ccdc0 [FIX] web: virtual keyboard is always showing during navigation
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
2019-10-18 12:59:48 +00:00
Romeo Fragomeli 78b9dad560 [REF] web,barcodes: simplify mobile device detection
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
2019-10-18 12:59:08 +00:00
Romeo Fragomeli 9831ed08fe [IMP] web: force desktop mode on mobile
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
2019-10-18 12:41:39 +00:00
jbm-odoo d669654895 [FIX] web pivot: Fix open position of selection
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

closes odoo/odoo#39034

X-original-commit: 989df08fd8bbfa4a1f05784b599b1657a9b28fe5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:19:50 +00:00
Julien Mougenot 33c406e3b1 [FIX] web: filter menu styling
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

closes odoo/odoo#39026

X-original-commit: 87a91c78fb15ee941e72023e02e539de64f0486d
Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
2019-10-18 11:03:56 +00:00
Victor Feyens e92d302d2f [FIX] web: kanban archive / unarchive all
Since https://github.com/odoo/odoo/commit/f896afcc8a54eae3efcdf034e3fd256942f7fa78,
(un)archive all triggered toggle_active on all records, which doesn't consider
whether we want to archive/unarchive and on which records...

Closes #38903

closes odoo/odoo#39022

X-original-commit: 2c89cb0c92fc593e2e323e322c9228de268f64cf
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-18 10:25:58 +00:00
Xavier-Do d65fcfecb6 [FIX] web: avoid expensive 404 during js tests
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
2019-10-17 17:10:06 +00:00
Lucas Perais (lpe) 1f6a7debf2 [FIX] web: custom filter on date[time] with changing the operator
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

closes odoo/odoo#38705

closes odoo/odoo#38869

closes odoo/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>
2019-10-17 10:50:03 +00:00
Lucas Perais (lpe) a4910628b3 [FIX] web: date[time] custom filter format
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
2019-10-17 10:50:03 +00:00
Debauche Stéphane e981e3312d [IMP] web: many2many_binary, binary, image, add the option `accepted_file_extensions`
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 #2082815

closes odoo/odoo#38351

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-16 13:57:49 +00:00
Lucas Lefèvre 2bc060d13b [FIX] web: Avoid variable name confusion
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
2019-10-16 15:49:49 +00:00
Lucas Lefèvre 645ae69bb9 [FIX] web: Correctly aggregate values in exported parent groups
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
2019-10-16 15:49:49 +00:00
jbm-odoo e76c65e8b4 [FIX] web: Manage False in groupby title
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
2019-10-16 15:49:49 +00:00
jbm-odoo c0bbd2fc24 [FIX] web: Kanban height with few element and searchpanel
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 #38556

closes odoo/odoo#38871

X-original-commit: a95cbbd631a2fa9be62eb42cba43e853fdf4b789
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2019-10-16 11:51:46 +00:00
Géry Debongnie 258a04664a [IMP] web: increase file limit from 25mo to 64mo
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.

closes odoo/odoo#38856

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-16 09:25:09 +00:00
Quentin Nicolay d59b67a915 [FIX] web: add 'no_edit_color' option to many2many_tags
This option, if set to True, prevents the user from modifying the
color of the tags.

Part of task 2070454

closes odoo/odoo#38848

X-original-commit: a62b65a8f9114493064d4efae92825814a880c04
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-16 08:26:10 +00:00
Arnaud Joset 92c26dff56 [IMP] web: CopyClipboardCharLong widget for long strings
- 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
2019-10-11 12:44:47 +00:00
Romeo Fragomeli 547d2d87fc [FIX] web: not possible to show a notification via client action
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
2019-10-14 12:11:23 +00:00
Romeo Fragomeli 3e5cc15d16 [FIX] web: warn is show when a client action is a function
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
2019-10-14 12:11:22 +00:00
jbm-odoo 3fa123d69f [FIX] web: List editable top select last row
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.

closes odoo/odoo#38471

X-original-commit: 996f77b03eaf6dd646b1816e7f70209d5ee6f8df
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2019-10-11 09:15:09 +00:00
svs-odoo 88cd1f1c12 [FIX] web: rename test files correctly
Rename `signature.js` to `signature_tests.js`.
Rename `special_fields.js` to `special_fields_tests.js`.

closes odoo/odoo#29501

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-11 08:05:07 +00:00
fw-bot bc4b7c5036 [FIX] web: can't edit subscription with end date beyond 200 years in the future
-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.

closes odoo/odoo#38527

Opw: 2079696
X-original-commit: 32b6131c04fef7a542a0ccbdb924d177627bfe38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-11 16:12:34 +00:00
fw-bot 3a2c69edbf [FIX] web: use language week_start in datepickers
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 #36450
Closes #36532

closes odoo/odoo#38472

X-original-commit: eeb518316f25d652bea3ec6d387db6ad93284fb2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-11 09:15:43 +00:00
jbm-odoo 6a2179fafc [IMP] web calendar: Keep width box while drag or resize
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.

closes odoo/odoo#38384

X-original-commit: 405294602070590083a2b438f631615f72000292
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-10 11:58:07 +00:00
Romain Derie 9bbf57f915 [REM] web: remove unused controller /apps/<app>
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.

closes odoo/odoo#38355

X-original-commit: a5c4e262449fef03d05d5250e4523832db5fbf00
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-10 08:56:22 +00:00
Sébastien Theys 9fc948f963 [FIX] base: fix company logo placeholder
- 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 #38001

closes odoo/odoo#38319

X-original-commit: 1210cb70bec421936c9d332b1347797bc83845cf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-10 06:28:03 +00:00
fw-bot 126788ec14 [FIX] web: list many2one quick-create
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

closes odoo/odoo#38289

X-original-commit: c00f84eb0a176b8d23927080078eb02dc2e5d806
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-09 13:42:59 +00:00
Mathieu Duckerts-Antoine 64293fbdb0 [FIX] web: prevent browsers inputs autofill
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

closes odoo/odoo#38039

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-07 08:40:53 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00