Commit Graph
1692 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
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
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
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
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
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
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
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
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
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
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
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 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
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
Lucas Perais (lpe) fa283d3d4e [FIX] web: progress bar feature
The progress bar was pretty broken before this commit.

> It was not possible to input the value as text
> Moving the progress bar to modify value and saving crashed
> modifying the max value crashed
> The whole feature was ill-defined

With this commit, we fix the crashed. It is now possible to write the field
behind the progress bar by moving it in RO mode
or by typing the input in RW mode
*if it is the value we want to write on*

It it is the max value that the field targets, we can do it in RO and RW mode,
only with the input as text

Note that this works *only if* the editable option on the widget is set to true

OPW 2061846

closes odoo/odoo#36928

closes odoo/odoo#36970

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-16 15:28:25 +00:00
Lucas Perais (lpe) 0fdc914a67 [FIX] web: search panel handles archived parent category
Have a model with a parent field
Set his parents like

Parent 0
  |
  -- Parent 1
	|
	-- Parent 2

Now, put the Parent 1 as inactive
Open a view with a search panel, which will fetch the parent field as categories

Before this commit, it crashed, because the inner record memory
did not contain a reference to the parent of Parent 2

After this commit, it doesn't crash, and the search panel
just doesn't display parents categories that are archived, nor any children of those

OPW 2070266

closes odoo/odoo#36699

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-12 07:42:38 +00:00
Odoo's Mergebot f1aa96b0a8 [MERGE] web: Re-implement the XLS grouped export
Purpose
=======

The commit 2849b5c introduces a new export mechanism of grouped
list views to xls files.

The issue with this development is mainly that the displayed records
are exported, instead of all the records that match the search
parameters.

To export all the records we cannot rely on the data from the web
client. This implies to revert 2849b5c, and implement it in a better
way.

Functional Spec
===============

Add the support of grouped exports.
Allow the user to export all records in one click from
the listview, without having to go through the export modal,
taking into account the domain, groupbys, and visible fields.

Technical Spec
==============

When exporting (whether it is from the modal or from the shortcut),
any groupby(s) set on the listview should be taken into account (all unfolded)
- UNLESS the export is import-compatible
- each subgroup header has an indentation compared to its parent
- the 'group headers' in the exported file should contain the
  same info (label, field aggregates) as it has in the listview.

New secondary button on the tree view with label 'EXPORT' (to be confirmed...)
- the export shortcut disregard the selected records, it exports all records
  according to the domain.
- the button is visible even if there is no selected records.
- essentially the export shortcut does the same thing as the following:
    - select all records
    - hit 'action' then 'export'
    - hit 'export'

Define a boolean attribute on <tree> to specify whether or not the export
shortcut should be displayed

Task 2072910

closes odoo/odoo#37087

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20 17:13:47 +02:00
Lucas Lefèvre 5c4544fb29 [IMP] web: Export grouped list view in xls file
PURPOSE
=======

Add the support of grouped exports.
Allow the user to export all records in one click from
the listview, without having to go through the export modal,
taking into account the domain, groupbys, and visible fields.

SPECIFICATION
=============

When exporting (whether it is from the modal or from the shortcut),
any groupby(s) set on the listview should be taken into account (all unfolded)
- UNLESS the export is import-compatible
- each subgroup header has an indentation compared to its parent
- the 'group headers' in the exported file should contain the
  same info (label, field aggregates) as it has in the listview.

New secondary button on the tree view with label 'EXPORT' (to be confirmed...)
- the export shortcut disregard the selected records, it exports all records
  according to the domain.
- the button is visible even if there is no selected records.
- essentially the export shortcut does the same thing as the following:
    - select all records
    - hit 'action' then 'export'
    - hit 'export'

Define a boolean attribute on <tree> to specify whether or not the export shortcut should be displayed

Task 2072910
2019-09-20 16:18:35 +02:00
Lucas Lefèvre 2849b5cb39 Revert "[IMP] web: Export list view as XLS file"
This reverts commit ac00548b28.
2019-09-19 14:00:49 +02:00
Samuel Degueldre 16f23e8246 [FIX] web: fix m2mtags widget to be able to use 'SAVE & NEW'
PURPOSE

Previously when the 'SAVE & NEW' button was pressed in the 'create and
edit...' menu of the many2many_tags widget was pressed, the modal window
would close and the button would act exactly like the 'SAVE & CLOSE'
button. This was due to the fact that whenever a new record was created
and added to the field, it would reset the many2one field it uses for
display, which would destroy the edit modal.

This commit fixes that by not notifying the underlying many2one field of
any change until the modal is closed by the user. This has the
disadvantage that tags display, if visible behind the modal 'shade',
will not be updated until the modal is closed, but restores the
functionality of the save&new button. It also adds a test for this
behaviour

task-2070454

closes odoo/odoo#37114

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-19 08:48:41 +00:00
Mathieu Duckerts-Antoine 3e21daaf45 [IMP] web: ctrlKey option in dragAndDrop
The gantt view allows the dragged pill to be copied when
the key ctrl (or command) is pressed. In order to be
able to test that feature, we had to modify
testUtils.dragAndDrop. This is done in the present
commit.

closes odoo/odoo#37074

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-19 08:20:50 +00:00
Julien Mougenot fd3c382186 [FIX] web: field color: adapted for views
The FieldColor widget had been designed exclusively for the document
layout configurator. Because of this, the widget would not display/behave
correctly in other views.

Before this commit:
- in list views, the widget had a "white-space" attribute adapted for char fields,
which gave it much more space than it needed
- there was no handling of the widget in readonly state: it was always editable
- its size in list views was a bit too large

Now:
- all styling problems have been adjusted for list views (unchanged for forms)
- the widget is disabled when in readonly mode

Task 2072466

closes odoo/odoo#36949

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-20 07:28:17 +00:00
Julien Mougenot c49bd8dcdb [IMP] web: today as default filter for datetime
Changed the default value of datetime to "is between" with "today"
as the default value (same day 00:00:00 to 23:59:59).

Task 2068164
2019-09-18 12:05:33 +00:00
Aaron Bohy 7cb8f26726 [IMP] web: list: add test case
Thought there was a bug, but it's actually working fine, so no fix
needed, but the test is written (and it doesn't exist yet), so we
keep it.

Also fixes a selector to make an assert relevant in an existing
test.
2019-09-18 11:31:43 +00:00
Aaron Bohy 45eb9fca28 [FIX] web: MockServer: handle whitespaces in archs
Before this rev., the mocked fieldsViewGet treated whitespaces in
inline subviews as TextNodes, and processed them as subviews. As
a consequence, it crashed later on when the View tried to parse it.
2019-09-18 11:31:43 +00:00
Aaron Bohy 6c15557a87 [FIX] web: editable list: re-compute widths on window resize
This rev. adds a (debounced) handler to react on window resize
events in editable list views, in order to recompute the (fixed)
column widths.

Task 2067477
2019-09-18 11:31:43 +00:00
Julien Mougenot 8b6f3580d8 [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.

Task 2068280
2019-09-18 11:31:43 +00:00
Julien Mougenot 62452aad41 [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 11:31:43 +00:00