<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/fields/abstract_field.js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] web: correctly update input field after onchange</title>
<updated>2020-05-12T13:43:53+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-05-12T09:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=efe10976a4ae085e905487fdd3479e70788b653a'/>
<id>efe10976a4ae085e905487fdd3479e70788b653a</id>
<content type='text'>
In a form view, have an x2many list with two fields A and B (e.g.
A is a many2one, and B is a char). There is an onchange on the
x2many that is triggered when the user sets A, and that sets B.

In this scenario, let's assume that the user first writes something
in B, but directly deletes it. Then, he sets A. Before this commit,
in this situation, B wasn't updated with the value returned by the
onchange.

Indeed, B's field widget was still flagged as 'isDirty', because
the user interacted with it, but it didn't commit its value, as it
hasn't actually changed. Basically, it remained flagged as 'isDirty'
forever, and thus couldn't be updated with the value returned by
the onchange.

This commit ensures that the 'isDirty' status is correctly updated
when the change is actually undone.

Task 1958793

closes odoo/odoo#51085

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: pka-odoo &lt;pka@odoo.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a form view, have an x2many list with two fields A and B (e.g.
A is a many2one, and B is a char). There is an onchange on the
x2many that is triggered when the user sets A, and that sets B.

In this scenario, let's assume that the user first writes something
in B, but directly deletes it. Then, he sets A. Before this commit,
in this situation, B wasn't updated with the value returned by the
onchange.

Indeed, B's field widget was still flagged as 'isDirty', because
the user interacted with it, but it didn't commit its value, as it
hasn't actually changed. Basically, it remained flagged as 'isDirty'
forever, and thus couldn't be updated with the value returned by
the onchange.

This commit ensures that the 'isDirty' status is correctly updated
when the change is actually undone.

Task 1958793

closes odoo/odoo#51085

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Co-authored-by: pka-odoo &lt;pka@odoo.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: add 'label' attribute on AbstractField</title>
<updated>2020-05-05T10:05:12+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-04-29T07:21:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a0c7284b6667e2a9f57eed2b19c19fc07174b39d'/>
<id>a0c7284b6667e2a9f57eed2b19c19fc07174b39d</id>
<content type='text'>
If set, this value will be displayed as column name in list views.
This attribute could be used in the future in form view for the
same purpose.

Part of task 2195254</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If set, this value will be displayed as column name in list views.
This attribute could be used in the future in form view for the
same purpose.

Part of task 2195254</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: add RemainingDays field widget</title>
<updated>2020-05-05T08:48:34+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-04-29T07:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4f8860e5038711c0da5b26584c4b72663908ddbc'/>
<id>4f8860e5038711c0da5b26584c4b72663908ddbc</id>
<content type='text'>
This widget can be used on date and datetime fields. In readonly,
it displays the delta (in days) between the value of the field and
today. In edit, it behaves like a regular date(time) widget.

Part of task 2195254</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This widget can be used on date and datetime fields. In readonly,
it displays the delta (in days) between the value of the field and
today. In edit, it behaves like a regular date(time) widget.

Part of task 2195254</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web: field decoration</title>
<updated>2020-05-05T08:48:34+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-04-29T07:21:32+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=56787d587858760355e6703f1afce54a66f7800f'/>
<id>56787d587858760355e6703f1afce54a66f7800f</id>
<content type='text'>
This commit refactors the way the decoration-xxx attributes are
applied to field widgets/components, in a way that it can be
overridden in a given field or component to generate the approriate
className. By default, 'decoration-x' applies className 'text-x'.

This will be necessary for the new 'FieldBadge' component, which
needs to apply 'bg-x' classNames instead of 'text-x'.

Part of task 2195254</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit refactors the way the decoration-xxx attributes are
applied to field widgets/components, in a way that it can be
overridden in a given field or component to generate the approriate
className. By default, 'decoration-x' applies className 'text-x'.

This will be necessary for the new 'FieldBadge' component, which
needs to apply 'bg-x' classNames instead of 'text-x'.

Part of task 2195254</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: always display statusbar widget</title>
<updated>2020-01-27T09:01:19+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-01-16T13:48:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=23878ee11ab121bb2d753e64c1d631ba2b85f6e0'/>
<id>23878ee11ab121bb2d753e64c1d631ba2b85f6e0</id>
<content type='text'>
By default, in readonly, unset field widgets (and their labels) are
not displayed. However, we would like the statusbar widget to be
always displayed (even when it is not set).

This commit introduces a new method 'isEmpty' on AbstractField, and
uses it (instead of isSet) to determine whether or not a field should
be hidden. By default, it uses isSet, so that it doesn't change
anything for the other fields, and we override it in statusbar to
always return false.

There was a need to make the distinction with isSet, as this one is
used to determine if a record can be saved (if the field is required,
and isSet returns false, it can't be).

task-2172272

closes odoo/odoo#43419

Related: odoo/enterprise#7929
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By default, in readonly, unset field widgets (and their labels) are
not displayed. However, we would like the statusbar widget to be
always displayed (even when it is not set).

This commit introduces a new method 'isEmpty' on AbstractField, and
uses it (instead of isSet) to determine whether or not a field should
be hidden. By default, it uses isSet, so that it doesn't change
anything for the other fields, and we override it in statusbar to
always return false.

There was a need to make the distinction with isSet, as this one is
used to determine if a record can be saved (if the field is required,
and isSet returns false, it can't be).

task-2172272

closes odoo/odoo#43419

Related: odoo/enterprise#7929
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: correct typos in comments</title>
<updated>2019-11-14T07:05:33+00:00</updated>
<author>
<name>Alejandro Avilés</name>
<email>omegak@gmail.com</email>
</author>
<published>2019-10-31T14:28:38+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a23153a3d2ed9efbc7dd1e0ccf6c6c82aa3ce778'/>
<id>a23153a3d2ed9efbc7dd1e0ccf6c6c82aa3ce778</id>
<content type='text'>
closes odoo/odoo#39658

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#39658

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: prevent unwanted click on enter keypress</title>
<updated>2019-08-16T09:03:49+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2019-08-14T12:35:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3c372d1da8b29df79b0366de0177a933d0494291'/>
<id>3c372d1da8b29df79b0366de0177a933d0494291</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: fix typos in comments</title>
<updated>2019-08-07T10:28:33+00:00</updated>
<author>
<name>mreficent</name>
<email>miquel.raich@eficent.com</email>
</author>
<published>2019-08-02T11:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=355a5dfc365c419f3be2e1ccffe0cb38e1140d27'/>
<id>355a5dfc365c419f3be2e1ccffe0cb38e1140d27</id>
<content type='text'>
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: correctly display list column name</title>
<updated>2019-05-07T09:34:28+00:00</updated>
<author>
<name>Martin Geubelle</name>
<email>mge@odoo.com</email>
</author>
<published>2019-05-07T09:14:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=05d304851194ab1bbdd8af8e0d166091367b395d'/>
<id>05d304851194ab1bbdd8af8e0d166091367b395d</id>
<content type='text'>
Rev. odoo/odoo@5dc971b introduced a `description` attribute on AbstractField.

Sadly, the attribute was already used for something else (in `handle`
and a widget in asset, to hide the column name). So the widget new
description is now displayed in the list header (instead of the field
name).

A new attribute `noLabel` has been now added on AbstractField (currently
only used in list) to fill the same purpose as the previous `description`.

Task 1981757

closes odoo/odoo#33060

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rev. odoo/odoo@5dc971b introduced a `description` attribute on AbstractField.

Sadly, the attribute was already used for something else (in `handle`
and a widget in asset, to hide the column name). So the widget new
description is now displayed in the list header (instead of the field
name).

A new attribute `noLabel` has been now added on AbstractField (currently
only used in list) to fill the same purpose as the previous `description`.

Task 1981757

closes odoo/odoo#33060

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web, *: add a description to generic widgets</title>
<updated>2019-04-24T09:57:56+00:00</updated>
<author>
<name>Juhil Somaiya</name>
<email>jso@odoo.com</email>
</author>
<published>2019-01-04T13:20:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5dc971b1ae15a9f9e6e92914a3b0d98159c9a38f'/>
<id>5dc971b1ae15a9f9e6e92914a3b0d98159c9a38f</id>
<content type='text'>
A `description` key has been added on AbstractField and all generic
field widgets ; it is used to display a more user friendly name (both in
the webclient and in Studio).

Non-generic field widgets have an empty string as description.

Related task 1918327

closes odoo/odoo#30131

Signed-off-by: Martin Geubelle (mge) &lt;mge@openerp.com&gt;


Co-authored-by: Mohammed Shekha &lt;msh@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A `description` key has been added on AbstractField and all generic
field widgets ; it is used to display a more user friendly name (both in
the webclient and in Studio).

Non-generic field widgets have an empty string as description.

Related task 1918327

closes odoo/odoo#30131

Signed-off-by: Martin Geubelle (mge) &lt;mge@openerp.com&gt;


Co-authored-by: Mohammed Shekha &lt;msh@openerp.com&gt;</pre>
</div>
</content>
</entry>
</feed>
