<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/addons/test_testing_utilities/menu.xml, 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] core: add UPDATE as valid many2many command in SSF</title>
<updated>2020-10-14T07:07:12+00:00</updated>
<author>
<name>Xavier ALT</name>
<email>xal@odoo.com</email>
</author>
<published>2020-09-21T13:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a29837f01a567e09ea389ad4adaf96943448c43d'/>
<id>a29837f01a567e09ea389ad4adaf96943448c43d</id>
<content type='text'>
This commit fix the "Unsupported M2M command 1" raised `Form` helper.

The `onchange()` method will in fact emit UPDATE command for many2many
fields when the value submitted an the one in database has changed
(this is the case for example for nested m2m in form views)

OPW-2044631

closes odoo/odoo#59937

X-original-commit: 76bd8208a416cefab6becff9f2d7204c7d196201
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
Signed-off-by: Xavier ALT &lt;xavieralt@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fix the "Unsupported M2M command 1" raised `Form` helper.

The `onchange()` method will in fact emit UPDATE command for many2many
fields when the value submitted an the one in database has changed
(this is the case for example for nested m2m in form views)

OPW-2044631

closes odoo/odoo#59937

X-original-commit: 76bd8208a416cefab6becff9f2d7204c7d196201
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
Signed-off-by: Xavier ALT &lt;xavieralt@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] tests: Handle attrs containing numbers instead of bool</title>
<updated>2020-08-26T15:13:18+00:00</updated>
<author>
<name>Luis González</name>
<email>lgonzalez@vauxoo.com</email>
</author>
<published>2020-08-06T21:58:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c0295f4b0211bb29133428b8a803c1ed2b1d22c6'/>
<id>c0295f4b0211bb29133428b8a803c1ed2b1d22c6</id>
<content type='text'>
The Form class already handles cases for attrs that contain boolean
values, e.g.:
`attrs="{'readonly': True}"`

But it doesnt for integers, e.g.:
`attrs="{'readonly': 1}"`

This commit changes the expected non-domain value from boolean to
integer, because both are valid cases and the former is a subset of the
latter.

[1] https://github.com/odoo/odoo/blob/b3d4938ba6b1/addons/repair/views/repair_views.xml#L54

closes odoo/odoo#56609

X-original-commit: 782534a429f10e7b114c838687d38aa4080a920c
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
Signed-off-by: Luis González [Vauxoo] &lt;luisg123v@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Form class already handles cases for attrs that contain boolean
values, e.g.:
`attrs="{'readonly': True}"`

But it doesnt for integers, e.g.:
`attrs="{'readonly': 1}"`

This commit changes the expected non-domain value from boolean to
integer, because both are valid cases and the former is a subset of the
latter.

[1] https://github.com/odoo/odoo/blob/b3d4938ba6b1/addons/repair/views/repair_views.xml#L54

closes odoo/odoo#56609

X-original-commit: 782534a429f10e7b114c838687d38aa4080a920c
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
Signed-off-by: Luis González [Vauxoo] &lt;luisg123v@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] SSF: modifier based on m2m value</title>
<updated>2019-10-28T16:03:39+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-10-25T11:02:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a480398bf3917b40922eae1732238fce0b8111c5'/>
<id>a480398bf3917b40922eae1732238fce0b8111c5</id>
<content type='text'>
m2ms are internally represented as "6" commands, however in domains
it's possible to compare an m2m value to a list of ids (to
investigate: whether this is an artifact of internal webclient repr or
part of the real contract).

Add a workaround in SSF modifier computation to convert the m2m
command storage to a simple ids list.

A better fix would probably have been to represent the m2m as a list
of ids internally (and only convert on load / save) however it not
completely trivial as it has to be done recursively in order to
properly handle an m2m inside an o2m. So it's a complete change of the
internal data model (which should probably go alongide more
fundamental changes e.g. properly handling parent refs, etc...)

Also add very minor support for widgets (mostly so it's possible to
set widget=many2many on an o2m field).

closes odoo/odoo#39467

X-original-commit: 927979beff9e5d4f6c88078862779eaa88f4e07d
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
m2ms are internally represented as "6" commands, however in domains
it's possible to compare an m2m value to a list of ids (to
investigate: whether this is an artifact of internal webclient repr or
part of the real contract).

Add a workaround in SSF modifier computation to convert the m2m
command storage to a simple ids list.

A better fix would probably have been to represent the m2m as a list
of ids internally (and only convert on load / save) however it not
completely trivial as it has to be done recursively in order to
properly handle an m2m inside an o2m. So it's a complete change of the
internal data model (which should probably go alongide more
fundamental changes e.g. properly handling parent refs, etc...)

Also add very minor support for widgets (mostly so it's possible to
set widget=many2many on an o2m field).

closes odoo/odoo#39467

X-original-commit: 927979beff9e5d4f6c88078862779eaa88f4e07d
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: o2m modifiers in the SSF</title>
<updated>2019-09-25T16:37:19+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-09-24T13:22:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=77099c54b602eb1a71c2a176eeebcceefaf7aec6'/>
<id>77099c54b602eb1a71c2a176eeebcceefaf7aec6</id>
<content type='text'>
Because the sub-record values would not necessarily get fetched
ever (whether default or stored), the computation of modifiers might
blow up if it relied on one of the un-fetched un-specified fields.

One such situation is trying to create a partner with child partners
if base_address_city is installed: the module adds a readonly attr
predicated upon the parent_id, without explicitly providing such the
field would be missing from the O2M record's values.

Closes #37176

closes odoo/odoo#37452

X-original-commit: 184d1b69eac2b78c72228c81c5c6cf8cc4a56eb4
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because the sub-record values would not necessarily get fetched
ever (whether default or stored), the computation of modifiers might
blow up if it relied on one of the un-fetched un-specified fields.

One such situation is trying to create a partner with child partners
if base_address_city is installed: the module adds a readonly attr
predicated upon the parent_id, without explicitly providing such the
field would be missing from the O2M record's values.

Closes #37176

closes odoo/odoo#37452

X-original-commit: 184d1b69eac2b78c72228c81c5c6cf8cc4a56eb4
Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web, *: remove `one2many_list` widget</title>
<updated>2019-04-24T08:04:39+00:00</updated>
<author>
<name>Martin Geubelle</name>
<email>mge@odoo.com</email>
</author>
<published>2019-04-23T10:41:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0aa4906843ff0565e4d9f9c212c4ff03bdfb7ff5'/>
<id>0aa4906843ff0565e4d9f9c212c4ff03bdfb7ff5</id>
<content type='text'>
This widget was exactly the same as a `one2many` and was kept for backward
compatibility reasons. It can be safely removed in master.

Related to task 1918327</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This widget was exactly the same as a `one2many` and was kept for backward
compatibility reasons. It can be safely removed in master.

Related to task 1918327</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: infinite recursion in SSF on self-recursive models</title>
<updated>2019-04-03T08:44:21+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-03-22T12:43:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=922d77a29100453d831f61df9411715b383605df'/>
<id>922d77a29100453d831f61df9411715b383605df</id>
<content type='text'>
The extra setup probably affects any o2m whose edition view itself
contains an o2m, but most likely to blow up entirely on models with
some sort of tree structure (parent/child relationship): the SSF
eagerly loads and setups the o2m's view, and the o2m's o2m's, ... ad
infinitam.

A better / cleaner fix would be to set up the subview on-demand (and
possibly cache it), but the rest of the o2m stuff is unlikely to work
correctly recursively so just don't recurse the o2m view setup at all
for now.

fixes #31458</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The extra setup probably affects any o2m whose edition view itself
contains an o2m, but most likely to blow up entirely on models with
some sort of tree structure (parent/child relationship): the SSF
eagerly loads and setups the o2m's view, and the o2m's o2m's, ... ad
infinitam.

A better / cleaner fix would be to set up the subview on-demand (and
possibly cache it), but the rest of the o2m stuff is unlikely to work
correctly recursively so just don't recurse the o2m view setup at all
for now.

fixes #31458</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: handling of o2m record deletion in SSF</title>
<updated>2019-02-26T13:18:57+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-02-21T10:20:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e36ad5b0b01aca802e835b82e1fbb79a0d40e659'/>
<id>e36ad5b0b01aca802e835b82e1fbb79a0d40e659</id>
<content type='text'>
The SSF would properly mark its own records as deleted, but it would
not properly handle deletion requests coming from an onchange, and it
would not necessarily convert DELETE_ALL commands (5) into the proper
sequence of individual (2)s matching existing records.

closes odoo/odoo#31431</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SSF would properly mark its own records as deleted, but it would
not properly handle deletion requests coming from an onchange, and it
would not necessarily convert DELETE_ALL commands (5) into the proper
sequence of individual (2)s matching existing records.

closes odoo/odoo#31431</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: various issues &amp; deviations from client's behaviour in Form</title>
<updated>2019-02-15T10:54:44+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-02-13T12:16:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bb7b121206ef9af8f7c365552500b1c51f96638e'/>
<id>bb7b121206ef9af8f7c365552500b1c51f96638e</id>
<content type='text'>
* Form would entirely mis-interpret the server's response to some
  results: for unmodified o2m records the server sends a (4), which was
  un-interpreted by Form, leading to the o2m record being lost entirely
  (as it rebuilds the entire o2m on setting)
* on record creation, every field (except id) is considered modified not
  just the fields set by default_get
* Form diverged from actual client in that it would send (1, id, {}) for
  unmodified o2m records, actual client sends (4, id, False)
* datetimes should be sent stringified
* onchange should not be triggered when none of the modified fields is
  flagged as an onchange trigger
* the default value for numerical fields is 0 not False
* convert m2m onchange results to (6, False, ids) instead of (6, 0, ids)
  for ease of diffing with actual client's data

There are still a few odd divergences in the actual invocation of
onchange when attempted on an SO, but they look to be of low relevance
/ risk.

Note: making integer fields "required" has pretty much no effect
      anymore. This is in line with (my understanding of) the client's
      behaviour, but required the alteration of test models as the
      specific test on required... was using an integer field.

closes odoo/odoo#31064</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Form would entirely mis-interpret the server's response to some
  results: for unmodified o2m records the server sends a (4), which was
  un-interpreted by Form, leading to the o2m record being lost entirely
  (as it rebuilds the entire o2m on setting)
* on record creation, every field (except id) is considered modified not
  just the fields set by default_get
* Form diverged from actual client in that it would send (1, id, {}) for
  unmodified o2m records, actual client sends (4, id, False)
* datetimes should be sent stringified
* onchange should not be triggered when none of the modified fields is
  flagged as an onchange trigger
* the default value for numerical fields is 0 not False
* convert m2m onchange results to (6, False, ids) instead of (6, 0, ids)
  for ease of diffing with actual client's data

There are still a few odd divergences in the actual invocation of
onchange when attempted on an SO, but they look to be of low relevance
/ risk.

Note: making integer fields "required" has pretty much no effect
      anymore. This is in line with (my understanding of) the client's
      behaviour, but required the alteration of test models as the
      specific test on required... was using an integer field.

closes odoo/odoo#31064</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core: add force_save support to server-side form</title>
<updated>2019-01-22T11:12:39+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2019-01-22T11:12:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a313f342d380a4046a765b708dddb06c46a20ef2'/>
<id>a313f342d380a4046a765b708dddb06c46a20ef2</id>
<content type='text'>
Cf 3b3f6f04af79d7dcc4461262e14e05096d76180b for basic feature
description.

Task 1931580

closes odoo/odoo#30428</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cf 3b3f6f04af79d7dcc4461262e14e05096d76180b for basic feature
description.

Task 1931580

closes odoo/odoo#30428</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] testing utilities: o2m should not strip readonly fields</title>
<updated>2018-04-03T13:46:04+00:00</updated>
<author>
<name>Laurent Smet</name>
<email>las@openerp.com</email>
</author>
<published>2018-04-03T13:46:04+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=34c7fe2e77e67243e690acb9dd867436f7ca2625'/>
<id>34c7fe2e77e67243e690acb9dd867436f7ca2625</id>
<content type='text'>
In the normal course of saving-action, readonly fields are stripped
out when sending data to the server. The SSF would reuse the same code
when "saving" O2M lines to the parent record however that is not
correct and would lead to misbehaving views as readonly (non-stored)
fields used as "transients" (storing data within the extent of a
record's edition session) would not behave properly.

Fix by overriding the O2M Form's save so that readonly fields are
kept and stored in the parent record.

Closes #23620</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the normal course of saving-action, readonly fields are stripped
out when sending data to the server. The SSF would reuse the same code
when "saving" O2M lines to the parent record however that is not
correct and would lead to misbehaving views as readonly (non-stored)
fields used as "transients" (storing data within the extent of a
record's edition session) would not behave properly.

Fix by overriding the O2M Form's save so that readonly fields are
kept and stored in the parent record.

Closes #23620</pre>
</div>
</content>
</entry>
</feed>
