Aaron Bohy
7d26d244a4
[FIX] web: BasicModel: trigger onchange when x2m is valid
...
When a record is added in an x2many field with an onchange, the
onchange is only triggered once the new record is valid (i.e. when
all its required fields have a correct value).
However, there was an issue in the code checking the validity of
a record, as it checked, for each required field, that its value
wasn't falsy (!value). This is incorrect for several type of
fields:
- numerical: a value of 0 is correct
- boolean: should be always considered as correct
- x2m: their value is a dataPoint, so it is never falsy, what
should be check is the number of records inside the dataPoint.
This was an issue for example in the sale.order form view, as the
onchange wasn't triggered when an order line was added (with a set
product), so the total amount wasn't updated correctly.
2017-05-04 12:39:07 +02:00
..
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-02 18:53:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-03 15:41:05 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-03 15:41:05 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-03 13:56:44 +02:00
2017-05-03 13:41:07 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-02 18:53:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-03 10:15:27 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-04 12:07:30 +02:00
2017-05-03 10:15:27 +02:00
2017-05-04 12:07:30 +02:00
2017-05-04 12:07:30 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-05-02 10:12:04 +02:00
2017-05-01 02:40:51 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 00:29:03 +02:00
2017-05-01 02:40:51 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-05-03 16:59:01 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-04-25 13:04:54 +02:00
2017-05-01 02:40:51 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-28 09:06:53 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 09:58:04 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-03 10:15:27 +02:00
2017-05-02 11:40:48 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-03 10:13:24 +02:00
2017-05-04 12:07:30 +02:00
2017-05-04 12:07:30 +02:00
2017-04-28 09:06:53 +02:00
2017-05-03 15:41:05 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:39:07 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 12:07:30 +02:00
2017-05-04 12:07:30 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-03 20:48:25 +02:00
2017-04-30 07:12:44 +02:00
2017-05-02 18:53:44 +02:00
2017-05-01 02:40:51 +02:00
2017-05-01 02:40:51 +02:00
2017-04-28 09:06:53 +02:00
2017-05-02 18:53:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-28 09:06:53 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-04 11:46:53 +02:00
2017-04-28 09:06:53 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-05-01 02:40:51 +02:00
2017-04-30 07:12:44 +02:00
2017-04-28 09:06:53 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00
2017-04-30 07:12:44 +02:00