Commit Graph
10779 Commits
Author SHA1 Message Date
Julien Mougenot 652414ca4e [FIX] web: grouped list multi edit with m2m
Before this commit, m2m fields were not updated when multi editing
in a grouped list.

Now, the fields are updated no matter how many levels of groupBys
are applied to the list.

Part of task 2078807

closes odoo/odoo#37589

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-30 12:53:18 +00:00
Romeo Fragomeli 53bb1387b5 [FIX] web: control panel: error by clicking on padding on mobile
o_control_panel have this layout:
 +-------------------------------------+
 |  PADDING                            |
 |  +----------------------------------+
 |  |  breadcrumb      o_cp_searchview |
 |  |  o_cp_left       o_cp_right      |
 |  +----------------------------------+
 +-------------------------------------+
As you can see, there is a padding on the edge of the widget.

In Odoo 12.0, before the control panel refactoring (odoo/odoo@40dd121938)
the search view was a widget by itself (addons/web/static/src/js/views/search/search_view_mobile.js).
Note that in this case, once the following condition:
"ev.target === this.el" was reach the normal behavior
was executed.

But now the search view is embedded in the control panel.
There is a side effect: clicking on the padding of the control panel
triggers the "_onOpenMobileSearchView" and the condition is always true.
Therefore we try to open the search more even if it doesn't exist.
But anyway, the search view (full) shouldn't be opened when we click on
the control panel.

After this commit, the listener is scoped to o_toggle_searchview_full,
to avoid this side effect.

Steps to reproduce:
* Open any app with a control panel (e.g. accounting)
* Select a record (e.g. an invoice)
* Click on the padding of the control panel (BUG)

closes odoo/odoo#37587

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-30 12:27:57 +00:00
Vincent Schippefilt e06117bd85 [FIX] web: multi-hell-ditable list
only activate multi-edit on list with specific attribute.
When the attribute multi_edit="1" is set on the tree view the user
can select a/some records and it will activate the multi-edit
with confirmation dialog (even for a single record).
Also, on-change are not applied when using multi-edit

closes odoo/odoo#37525

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-30 08:57:23 +00:00
Priyanka KakadiyaandMohammed Shekha 9b57bfb6a2 [FIX] web, *: button special not working to close dialog
*: event_sale
   mail
   sale_product_connfigurator
   stock

Before this commit: if we open dialog from acitivity view and try to
discard it (i.e. close it), it throws traceback.

Issue arises from following commits:
https://github.com/odoo/odoo/commit/d3d576cf8ec9e5b5f6ae5f9d8845cf384435f12d
https://github.com/odoo/odoo/commit/3210f108272be89f1a7b01f4e1816b7f04ae0a3b

Previously, special attribute was passed directly, but now `on_close`
gets action info as an object.

After this commit, it passes special key as an object for `on_close`,
also changed special action based logic in other modules.

Task-Id 2072181

closes odoo/odoo#37078

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-09-27 14:45:51 +00:00
Aaron Bohy 48b76921be [FIX] web: display action title in breadcrumb
Create a simple subclass of AbstractAction (a client action), with
property hasControlPanel set to true. By default, the name of the
action should be displayed in the breadcrumb. Before this rev.,
it wasn't the case, as it displayed 'Unnamed' instead.

Bug spotted when doing an exercice for the JS smartclass.

closes odoo/odoo#37465

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-25 20:00:16 +00:00
Priyanka KakadiyaandMohammed Shekha c536b369d3 [FIX] web: visible studio hooks in listview
Before this commit, there are no hooks when dragging a field over an
editable listview. This was caused by wrong computation of column
width in studio mode.

This commit isolate the computation of column width, so that studio
can override it and make the correct computation.

Task-Id 2057829

closes odoo/odoo#36959

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-09-25 14:43:55 +00:00
5d82725f62 [FIX] web: stop defaulting on empty kanbans when you should not
1/ Write a form view with a o2m field that has its own inline tree view
(no other view exist in db for the target model)
2/ Open that view in a mobile environment
3/ Instead of having a list view, you get a kanban view. No luck for
you, since the default kanban generated by `models.py` is an empty one,
your records are *invisible* \o/

From what I can tell, the previous condition made no sense:
```
if (there is a list view and a kanban view)  <-- this seems absurd
  then (use the list mode)
elif (there is no list view but a kanban view)
 then (use the kanban mode)
else (use both modes)
```

The first condition seems absurd: it *actively* ignores a kanban view
if there is one. Even better, the list view whose existence it checks
is never there: it checks for a `tree` when it should be checking for a
`list`. In short, the first condition was *never* met, and you ended up
either with exclusive kanban mode or with both modes - even if you had
no existing kanban view for the target model...

This commit moves the normalization of `tree` into `list` before
attempting to process the x2many field's subviews. It clarify the usage
of `tree` vs `list` (cf. only use `list`) which  prevents weird edge
cases like described above.

closes odoo/odoo#36237

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>
2019-09-25 12:50:59 +00:00
Christophe Simonis f1c0b08504 [MERGE] forward port branch saas-12.4 up to bef26222b8 2019-09-25 16:53:26 +02:00
Christophe Simonis 257a382b5c [MERGE] forward port branch saas-12.3 up to dd627b9698 2019-09-25 13:43:26 +02:00
Aaron Bohy 1787ff0b52 [FIX] web: don't allow to aggregate date(time)
Go to Accounting > Accounting > General ledger. The view is grouped
by account. There is a layout issue as the first column (date) is
positionned after the group names, leaving a large blank space.
This is because the date field is considered as an aggregated field
(for sorting purpose, in python), but the JS can't (and we don't
want to) display it. This rev. ensures that such field types are
completely ignored by the JS, s.t. they do not impact the layout.

closes odoo/odoo#37113

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-25 07:20:36 +00:00
Julien Mougenot 3147e5fada [IMP] web,*: editable readonly list views
*:board,hr_skills

Hold on tight, this is a tricky one.

Allows *any* readonly list view (only plain lists, not x2manies) to
become partially editable when checking records.

This means that once checked, a record line acts just like it was
in an editable list. You can click on it, edit any of its values as long as
they're not constrained by readonly modifiers, and save them on the fly.

Clicking on an unchecked record will have the same effect as before:
it will open the record, regardless of the other selected records.

You can also check multiple records and edit them all at once by
changing the value of one selected record (just like standard multi edition).

Keyboard navigation is also allowed between selected records (TAB and SHIFT+TAB
to navigate and ENTER to save).

/!\ If a list is only made of records having all of their fields locked by
readonly modifiers, checking a record and clicking on it will do absolutely
nothing. This is to keep consistency with the rest of the specs.

Task 1967602
2019-09-25 07:20:36 +00:00
Aaron Bohy 3023cd24af [FIX] web: more precise textarea autoresize
Setting 'overflow: hidden' on the (hidden) textarea used to compute
the (visible) textarea height ensures that there is no vertical
scrollbar, which would lead to a not so precise computation of the
height. The bug could be observed in sale.order form view, in the
order line x2many (description field), and had been introduced by
ef46378cd3.
2019-09-25 07:20:36 +00:00
Julien Mougenot f328b9ca8c [IMP] web: list multi edition confirmation modal
Changed the information dipslayed by the confirmation modal in multi edition
in list views.

Before this commit, the modal simply showed a one-line message with the amount of valid records.

Now, there are 3 elements:
- If all of the fields cannot be changed, a first line warns the amount of valid records.
- A second (or first if all fields can be updated) line ensuring that the user is aware of
the occuring changes.
- A table displaying the affected field and the updated value (readonly widget with the new value).

Part of task 1967602
2019-09-25 07:20:36 +00:00
Aaron Bohy e6d2175577 [FIX] web: list: horizontal scrollbar bottom of page
... instead of at the bottom of the table (which may be several
scrolls down).
2019-09-25 06:16:55 +00:00
Julien MougenotandAaron Bohy 0ebacff465 [FIX] web: list: prevent tables from overflowing
In an editable list, select a very long value in a many2one...

Before this commit, the table stretched as much as it needed to to
display all of the columns content.

Now, the largest columns are trimmed in order to keep the table
as wide as the list container (meaning it won't overflow anymore
unless there is a huge load of columns).

Also ensured that values trimmed by this feature are followed
by an ellipsis.

Task 2068261

Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-09-25 06:16:54 +00:00
Julien Mougenot d99e80f92a [FIX] web: column resize trying to freeze the list
Before this commit, resizing a column would cause the
list to develop a mind of its own and to grow/shrink random
columns according to its own will.

Now, resizing a column does not "freeze" the list anymore and simply
gives a static width to the resized column.
2019-09-25 06:16:54 +00:00
Julien Mougenot d2f024d254 [FIX] web: allow line return in textareas
Before this commit, textareas in x2many would not allow line return
when pressing enter.

Now, it does.
2019-09-25 06:16:54 +00:00
Aaron Bohy 104a86f1c8 [FIX] web: limit autocomplete dropdowns width
When the content of an autocomplete dropdown (e.g. many2one field)
was long, the dropdown could overflow the page. For instance, this
was the case of the intrastat_id many2one.

Task 2068261
2019-09-25 06:16:54 +00:00
Aaron Bohy be222b795e [FIX] web: list: keep widths when editing records
Let's assume an editable list view with at least two rows. Before
this rev., the column widths were re-computed and frozen each time
a record was switched into 'edit' mode. As a consequence, if the
user clicked on a row, and then on another one, column widths might
slightly change.

Task 2068261
2019-09-25 06:16:54 +00:00
Aaron Bohy 22d43f1540 [FIX] web: list: increase width of boolean columns
Task 2068261
2019-09-25 06:16:53 +00:00
Aaron Bohy 7e72471552 [FIX] web: correctly handle 'oe_read|edit_only' in lists
ClassNames 'oe_read_only' (resp. 'oe_edit_only') can be used in
x2many lists to hide columns in 'edit' (resp. 'readonly') modes.

However, before this rev., there were two issues:
 1) Having such a className on a <button> tag didn't work well as
    the 'display: none' rule didn't apply on the body cell (it only
    applied on the button). Same could be observed on <widget>
    nodes.
 2) Having more than one invisible column (with those classNames)
    didn't work either, because the footer cells weren't hidden.
    We didn't notice it with one invisible column, because the
    footer contained one cell less than the header and the body.

Those two issues could be observed on the mrp.bom form view.

Task 2068261
2019-09-25 06:16:53 +00:00
a7a60f7c61 [FIX] web: avoid multiple displays of the "same" discard warning
Before this commit, editing a record e.g. in a form
view and toggling the home menu would cause the discard
warning to be displayed twice when going to the home
menu (in enterprise) and then once again when going to
an other app. This is now fixed.

Task ID: 2043027

closes odoo/odoo#37301

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: aab-odoo <aab@odoo.com>
2019-09-24 08:34:43 +00:00
qsm-odoo 87b05cf224 [REF] website, *: improve use of unicode support font
* web, theme_bootswatch

Improvement of https://github.com/odoo/odoo/commit/02a321cffb2da60a86b960e75c445e37094567b4

- Clarify the name of the support font (to distinguish it from standard
  and google fonts and avoid confusion with Noto Sans and Noto Serif).

- Make sure the support font is added and can be added for all font
  definitions in odoo scss files thanks to a scss function.

Could be backported in 12.0 if judged necessary.

Part of https://github.com/odoo/odoo/pull/37293
2019-09-24 08:44:28 +00:00
Christophe Simonis ac4fc6e7c7 [MERGE] forward port branch saas-12.3 up to bd3e510edb
closes odoo/odoo#37314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 09:44:56 +00:00
RomainLibert 57a24dacaa [FIX] web: avoid passing buttons as export field
The new export feature forgot to filter out the action buttons that can
be displayed in the list view. (see odoo/odoo@5c4544f)
This lead to javascript trying to get fields on the model like
`action_validate` which obviously doesn't exist.

closes odoo/odoo#37261

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-23 14:41:54 +00:00
Sébastien Theys d0c852f50e [FIX] web: introduce format for many2one_reference
The format of `many2one_reference` was not introduced when the new field type
was created, which leads to errors when the web client is trying to display the
value of such fields.

Since the value of this field is an ID, it is decided to display it like an
integer, which is consistent with previous behavior: the fields that are now
`many2one_reference` are still stored as integer and they were already displayed
as integer before.

closes odoo/odoo#37216

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-23 20:55:39 +00:00
Martin Trigaux 2471ee506f [FIX] web: translate html fields
This commit fixes:
- body of a email.template in a small field
- translation of website_description of a product does not show the
  source of the translation
- translation of website_description of a product shows the full
  content for the current language

HTML fields are typically fields with longer of content.
If the field is an HTML field, it should be displayed in a textarea,
like the text fields.

Most of HTML fields are split in meaningful chunks of content (using
xml_translate or html_translate method).
For these fields, the source must be displayed.

Also sort the entries on the source to have a consistent order

closes odoo/odoo#37215

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 15:52:55 +00:00
Pierre ParidansandRomeo Fragomeli 442f74ff39 [FIX] web: crash when resizing on tablet
When having a long systray (icons from different apps, mode debug,
multi-company...) the resize of the window can trigger a crash for apps
that have not too much top-level menus (e.g. Contacts).

This also happens when loading those apps.

Steps to reproduce (on an iPad, portrait):

* use a Runbot with all modules installed (12.0+)
* activate "debug mode"
* ensure that the menu/systray bar is quite full
* open the "Contacts" app
=> traceback with a "cannot call getBoundingClientRect of undefined"
error

The reason is that the resize's callback iterate over the systray/menu
items to find which one should be folded behind a "more" ("+") menu
item.

Sadly in some cases (combination of screen width, systray size, app's
number of menus) it can lead to a traceback.

This commit ensures that when looping for menu items, we don't try to
reach an non-existing item.

closes odoo/odoo#37245

X-original-commit: d7bae0329990171710acf2d9c0d4d9579cba2c0e
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2019-09-23 09:10:05 +00:00
Christophe Simonis d67b2483e5 [MERGE] forward port branch saas-12.4 up to 9ed4872ea0
closes odoo/odoo#37372

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 17:45:37 +00:00
Andrea Grazioso (agr-odoo) 3ee3f7d497 [FIX] web: digits option not applied in list view
From the settings activate:

- Multiple Sales Prices per Product
-- Prices computed from formulas
- Discounts

Create a pricelist with discount policy "Show public price & discount to
the customer", set the price calculation formula:
- Rounding: 10
- Price discount: 10%

Modify the sale order xml list view adding 'digits="[3, 2]"' to the
discount shown in the sale order line.

Create a sale order with such pricelist and on the so line put a
product with quantity 1 and sale price 4190 (VAT 19% included in the price).

The discount will not display the requested number of decimal digits (2)
in list view, but it will when editing the field.

The cell formatting is done calling the appropriate function (formatFloat),
which search the digits option from the 'options' parameter or from the field
definition. The latter stores the default digits coming from
the DecimalAccuracy settings, which, as side effect, alter the behavior
of the discount calculation.
https://www.odoo.com/web#view_type=form&model=project.task&id=2069939&active_id=2069939

When passing into edit mode the field is created as widget, parsing its options
which have 'digits', instead when coming back in list mode it is "just a
float field" rendered directly from the list_renderer which no options,
so the formatFloat will look at the field definition
https://github.com/odoo/odoo/blob/12.0/addons/web/static/src/js/fields/field_utils.js#L172

Adding the correct parameter to the dictionary passed to formatFloat
during the list rendering is a possible solution, because it is the
"closest" point in which parsing the parameter is possible without
touching higher level code or forcing the creation of a widget (adding
widget='float' as xml parameter).

closes odoo/odoo#37167

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-20 05:37:56 +00:00
Hugo Adan 7592d609b8 [FIX] web: incompatible blockquote css
- Add the following in a PDF report:
```html
<p>
    <blockquote>
        <ol class="loweralpha simple">
            <li>Item that explain terms</li>
            <li>Another item that explain something else</li>
        </ol>
    </blockquote>
</p>
```
- Print the report

Wkhtmltopdf crashes with the error:

Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum
file number of subprocess reached. Message : b''.

This is a known issue:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4115

Actually, since this CSS is only used for Wkhtmltopdf reports, we can
simply remove the CSS rule causing the problem.

Closes #37034
Fixes #37033

opw-2073195

closes odoo/odoo#37155

X-original-commit: 8d08893172ae8c0f3ad1f1af6ab9514aa30bf843
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-19 14:08:07 +00:00
Jorge Pinna Puissant f629cd9672 [FIX] web: write date without separator
Since fbbfa6d it's not longer possible
to write a date without separator (e.g., 0102 for 01/02/2019; 121298 for
12/12/1998;  02042018 for 02/04/2018), or a date without year (e.g.,
01/02 for 01/02/2019) in the datepicker widget.

In this commit we have decided to be as permissive as tempus dominus
that call moment.js with strict false. This allows moment.js to deduct a
date from a string in a more versatile way. This also allows a more
versatile autocomplete in the search views.

opw-2070464
opw-2070931

closes odoo/odoo#37095

Forward-port-of: odoo/odoo#36821
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-19 07:07:03 +00:00
Julien Mougenot 31ec900bb0 [FIX] web: list selectors synchronisation
Changed the way the header selector behave when the selection changes.

Before this commit, the header selector was only checked when clicked and
was unchecked as soon as any other record was unchecked.

Now, the header selector reflects the current visible selection:
if all of the other visible selectors are checked, it will be checked.

Folded records are not considered visible, thus only records from active groups
and from the current pager will be taken into account.

closes odoo/odoo#36522

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-18 08:24:32 +00:00
Julien Mougenot ca4e158a8e [FIX] web: handling of invalid formats in list views
Added handling of invalid format types in multiple edition in list views.

Before this commit, in multiple edition, a field that was edited with an invalid value format
(e.g. a numeric field receiving a string value) didn't trigger a field_changed and no prompt
was shown; the record was simply idle with an dirty value.

Now, the list controller also listents for set_dirty events and automatically triggers
an error modal + discards all changes when receiving one.
2019-09-18 08:24:32 +00:00
Julien Mougenot d261d42d9b [FIX] web: list: m2o doesn't trigger fieldChange when empty
Gives time to the user to enter an actual value in m2o in list views.

Before this commit, emptying a many2one field (selecting all > BACKSPACE or DELETE)
triggered instantly a field_change. This was an issue in multi edition as a field
changed triggered instantly a save on selected records without giving time to the
user to enter a new value.

Now, many2ones only trigger a fieldChange when selecting a new valid value.
2019-09-18 08:24:28 +00:00
Aaron Bohy bb85f963b5 [FIX] web: list: multi edit boolean with ENTER
This rev. solves the similar issue as 801c603218, but with boolean
fields.

Scenario: select several records, select a boolean cell, press
enter to change the boolean value.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 3b4cc84c1c [FIX] web: list: multi edition: disable onchanges
Onchanges make no sense in multi edition as they would be computed
on the 'reference' record (the one use to edit), but applied on all
selected records. This rev. simply disables them in that case.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot a7782cadbe [FIX] web: lists: focus last edited cell
Gave back focus to the last edited cell to increase usability with key nav.

Before this commit, after saving several records with multi edition in a list,
focus was lost (given to the body).

Now, last edited cell is given back the focus after multi editing.
2019-09-18 08:24:13 +00:00
Aaron Bohy af65475a4c [FIX] web: list: multi edit input of date(time) fields
The Date(Time)Fields listen to 'input' and 'change' events (like
all InputFields) to keep track of changes. However, the datepicker
already listens to the 'change' event. As a consequence, in multi
edition in a list view, if the user changed the value of a
date(time) field by directly editing the input, the fieldChanged
event was triggered twice, and there were 2 dialogs asking the user
if he wanted to save the change.

This rev. makes the Date(Time)Fields stop listening themselves to
'input' and 'change' events, and instead completely rely on the
datepicker widget.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy ac85176ce8 [FIX] web: date(time) fields: trigger fieldChanged once
Before this rev., the 'fieldChanged' event was triggered each time
the user selected a value (a day, an hour, a minute or a second) in
the datepicker. This means that if there was an onchange on the
field, a lot of RPCs could have been done when a user set a
datetime. In addition, in a list view with multi edition, the user
was asked to save the changes at each step of the datetime
selection, making the feature unusable.

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 90fe1bbe33 [FIX] web: list: disable record selectors when editing
Having those inputs enabled can lead to weird situations where a
record has been modified but can't be saved anymore (because the
user clicked on one of those record selectors to focusout the edited
row). Also we don't want the user to start multi-editing a field,
then change the selection, and then validate the changes.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot 9371721fcb [FIX] web: list: multi edition only between selected records
Before this commit, if a record was selected and another one was edited,
it was considered as multi edition.

Now, the multi edition only works if the edited record is included in the
selection; else it will be the only edited record (single edition).

Task 2068280
2019-09-18 08:24:13 +00:00
Aaron Bohy 3c68347c15 [FIX] web: list: multi edit: do not create new row
...when validating last row by pressing ENTER.

In single edition, we automatically add a new row when the user
edits the last one and presses ENTER. This is something we don't
want in multi edition.

Task 2068280
2019-09-18 08:24:13 +00:00
Julien Mougenot 01d7077bdd [FIX] web: readonly many2one in list views
Fixes the way many2one fields are rendered in editable list views.

Before this commit, many2ones in readonly mode would render as links
and their widget would be considered as active even though you couldn't
edit it.

Now, they are rendered as plain text and act the same way as readonly char fields.
2019-09-18 08:24:02 +00:00
Julien Mougenot 8c6de8c452 [FIX] web: list: clicking discard doesn't trigger an onFieldChange
Fixes the way records are discarded in list views

Before this commit, clicking the "Discard changes" button in a list view
after editing a record triggered both the "field changed" and the "discard changes"
methods (resulting in 2 modals opening).

Now, all fieldChanges are prevented when trying to click "Discard changes",
and are re-applied if the click was unsuccessful (lifted left mouse button somewhere else).

Task 2068280
2019-09-18 06:11:03 +00:00
Aaron Bohy fc52cae034 [FIX] web: list: multi edition: force write same value
Let's assume an editable list view with a many2one field and 2
records: the first one has value 1, the second value 2. The user
selects all records and wants to set their many2one to value 1. It
edits the first one, sets 1 and validates the confirm dialog.

Before this rev., it didn't save anything because the 'reference'
record (the one used to edit), didn't actually changed, as we reset
the same value.

This rev. forces the write the new value on all selected records in
that case.

Task 2068280
2019-09-18 06:11:03 +00:00
Julien Mougenot c3ac181665 [FIX] web: no selected records after multi edition
Backport of 4b7ba864d0

After editing multiple record, we want don't want any
record selected. This commit ensures that.
2019-09-18 06:11:03 +00:00
Julien Mougenot e00121d500 [FIX] web: multi edition in editable listviews error handling
Backport of 10eaf74230

Fixed crashes/incorrect behaviours in multi edition in the list views.
The solution to these problems was mainly to refactor the function
used to save multiple records.

Before this commit:
- Cancelling the confirmation dialog in multi edition caused
the edited record to be editable but disabled
- Saving an empty field in multi edition triggered a JS error
- Static confirmation message ("saving 0 valid records")

After this commit:
- Ability to cancel confirmation
- Proper error display when trying to save empty fields
- Message consistent with the situation
2019-09-18 06:11:03 +00:00
Julien Mougenot 69dfa4ad87 [FIX] web: fixed crash in editable grouped lists
Backport of 1f2c64013

Adding a line in grouped listviews caused a crash in some cases.

Steps to reproduce:
- go in any grouped editable list view
- click on any "Add a line" cell, but not on the link itself
- press ENTER

Before this commit:
A crash occured. Unable to add a new line. Needed to refresh the page.

After this commit:
Line addition functionnality properly working even when selecting the outer cell
2019-09-18 06:11:03 +00:00
Julien Mougenot d201802abe [FIX] web: prevent unwanted click on enter keypress
Backport of 801c603218

Pressing ENTER on a button element triggers an additionnal 'click' event.
Since this 'unwanted' click caused some issues in a few cases, we prevent it.
Moreover, there isn't currently any known case in which this event is useful.

Before this commit:
No modification of the initial behaviour on ENTER key

After this commit:
ENTER key pressed in abstract fields has its default behaviour suppressed
2019-09-18 06:11:03 +00:00