<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/views/pivot/pivot_model.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: pivot non-persistant on null value</title>
<updated>2020-08-14T12:31:50+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2020-07-29T12:41:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7cf8f6f40e5769d2f22620ac425208c4ad9ae80b'/>
<id>7cf8f6f40e5769d2f22620ac425208c4ad9ae80b</id>
<content type='text'>
In pivot view, a cell data is determined by his row/column key which
are the value chain of field values to get to that row/column.

If you had a grouping with value in a cell and then close the grouping,
you could somehow get the old value back wrongly on next grouping
operations.

This happened because:

- the key was computed based on the value (eg. for relational field the
  record ID) but without the field name.

- succeeding read_group only fill existing values.

eg. If on pivot view we had a salesperson with same ID as product
category, if we closed salesperson grouping then opened product
category grouping, we could possibly get the cell value to the product
category that has the same ID as the salesperson.

With this changeset, we clear the cell data corresponding to a grouping
that has been closed.

Added test without the fix would fail by displaying data of a previous
read_group that should have been cleared inbetween.

opw-2262306
closes #55129

closes odoo/odoo#55936

X-original-commit: f1df73adca4955561814d4b8e90a62d7d50c1c33
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In pivot view, a cell data is determined by his row/column key which
are the value chain of field values to get to that row/column.

If you had a grouping with value in a cell and then close the grouping,
you could somehow get the old value back wrongly on next grouping
operations.

This happened because:

- the key was computed based on the value (eg. for relational field the
  record ID) but without the field name.

- succeeding read_group only fill existing values.

eg. If on pivot view we had a salesperson with same ID as product
category, if we closed salesperson grouping then opened product
category grouping, we could possibly get the cell value to the product
category that has the same ID as the salesperson.

With this changeset, we clear the cell data corresponding to a grouping
that has been closed.

Added test without the fix would fail by displaying data of a previous
read_group that should have been cleared inbetween.

opw-2262306
closes #55129

closes odoo/odoo#55936

X-original-commit: f1df73adca4955561814d4b8e90a62d7d50c1c33
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: sample data in pivot view</title>
<updated>2020-08-12T08:52:20+00:00</updated>
<author>
<name>Aaron Bohy</name>
<email>aab@odoo.com</email>
</author>
<published>2020-07-31T15:43:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e219aac56ad9687687187ffe099af2d797b6922c'/>
<id>e219aac56ad9687687187ffe099af2d797b6922c</id>
<content type='text'>
A previous commit has paved the way for displaying sample data in the
reporting views. The present commit brings the required changes to have
sample data in pivot views.

Task ID: 2282196

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A previous commit has paved the way for displaying sample data in the
reporting views. The present commit brings the required changes to have
sample data in pivot views.

Task ID: 2282196

Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: display comparison period first in pivot</title>
<updated>2020-06-25T08:23:32+00:00</updated>
<author>
<name>Priyanka Kakadiya</name>
<email>pka@odoo.com</email>
</author>
<published>2020-06-09T11:30:32+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3da19d2e744a0f859b322fff5cdb0b9aeb5407ba'/>
<id>3da19d2e744a0f859b322fff5cdb0b9aeb5407ba</id>
<content type='text'>
When comparing time ranges in pivot, it makes more sense to display the
previous period before the one being compared. This commit allows that.

Task ID: 2269770

closes odoo/odoo#52746

Signed-off-by: Mathieu Duckerts-Antoine &lt;Polymorphe57@users.noreply.github.com&gt;
Co-authored-by: Priyanka Kakadiya &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>
When comparing time ranges in pivot, it makes more sense to display the
previous period before the one being compared. This commit allows that.

Task ID: 2269770

closes odoo/odoo#52746

Signed-off-by: Mathieu Duckerts-Antoine &lt;Polymorphe57@users.noreply.github.com&gt;
Co-authored-by: Priyanka Kakadiya &lt;pka@odoo.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: add support of "sample" attribute in views</title>
<updated>2020-06-22T13:04:01+00:00</updated>
<author>
<name>Jérémy Hennecart</name>
<email>jeh@odoo.com</email>
</author>
<published>2020-06-19T07:06:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c7964657ecbbad278cec73cf231d7eef55b44347'/>
<id>c7964657ecbbad278cec73cf231d7eef55b44347</id>
<content type='text'>
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.

Task 2232801

X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: Jérémy Hennecart &lt;jeh@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.

Task 2232801

X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;
Co-authored-by: Jérémy Hennecart &lt;jeh@odoo.com&gt;
Co-authored-by: Julien Mougenot &lt;jum@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: expose pivot variables</title>
<updated>2020-06-11T05:35:53+00:00</updated>
<author>
<name>Pierre Rousseau</name>
<email>pro@odoo.com</email>
</author>
<published>2020-03-26T07:20:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8878cf45a849b54fdc769e5db06e7cbb77bca3ce'/>
<id>8878cf45a849b54fdc769e5db06e7cbb77bca3ce</id>
<content type='text'>
This is useful for integration with spreadsheet.

closes odoo/odoo#52582

Task-id: 2168016
Signed-off-by: Pierre Rousseau (pro) &lt;pro@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful for integration with spreadsheet.

closes odoo/odoo#52582

Task-id: 2168016
Signed-off-by: Pierre Rousseau (pro) &lt;pro@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: Standardize FALSE and TRUE leaves/domains</title>
<updated>2020-05-05T19:23:20+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-04-29T09:14:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d21c4129852484860572accbb28c5691ae98a634'/>
<id>d21c4129852484860572accbb28c5691ae98a634</id>
<content type='text'>
Add four static properties on the Domain.js class: (TRUE|FALSE)_(LEAF|DOMAIN).
This increases consistency for domains using these concepts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add four static properties on the Domain.js class: (TRUE|FALSE)_(LEAF|DOMAIN).
This increases consistency for domains using these concepts.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: keep server group order in pivot</title>
<updated>2020-05-04T09:36:01+00:00</updated>
<author>
<name>Mathieu Duckerts-Antoine</name>
<email>dam@odoo.com</email>
</author>
<published>2020-04-23T10:03:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d57e50008141881dcf3bf7b40033767ac6a9655a'/>
<id>d57e50008141881dcf3bf7b40033767ac6a9655a</id>
<content type='text'>
In the pivot view, groups comming from many read_group are assemble
to create the header hierarchies and the table.

Groups returned by the read_group may be already sorted by the server
using the order set on the model for instance and that order should
be reflected in the header hierarchies (and in the table).
It is important to keep that order since it might not be possible
to recreate it in the interface. Even if possible it might not be a
good idea for performance reasons.

Before this commit:
The groups are added in a JS object, whose keys are the group ids
(when grouping on a many2one at least). Then, to generate the table,
we iterate over the keys of that object, but those keys are sorted
according to the numerical order (not the insertion order),
because keys are kind of numeric.
See https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order.

After this commit:
Instead of a JS object, we use a Map for which the insertion order
is used (official spec).

Task ID: 2243416

closes odoo/odoo#50551

X-original-commit: 1a9a85c8b8d0f47c3c6f3878cd6d9401ddc3ad75
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the pivot view, groups comming from many read_group are assemble
to create the header hierarchies and the table.

Groups returned by the read_group may be already sorted by the server
using the order set on the model for instance and that order should
be reflected in the header hierarchies (and in the table).
It is important to keep that order since it might not be possible
to recreate it in the interface. Even if possible it might not be a
good idea for performance reasons.

Before this commit:
The groups are added in a JS object, whose keys are the group ids
(when grouping on a many2one at least). Then, to generate the table,
we iterate over the keys of that object, but those keys are sorted
according to the numerical order (not the insertion order),
because keys are kind of numeric.
See https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order.

After this commit:
Instead of a JS object, we use a Map for which the insertion order
is used (official spec).

Task ID: 2243416

closes odoo/odoo#50551

X-original-commit: 1a9a85c8b8d0f47c3c6f3878cd6d9401ddc3ad75
Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web: Adapt views/actions to new control panel</title>
<updated>2020-03-13T14:08:33+00:00</updated>
<author>
<name>Julien Mougenot</name>
<email>jum@odoo.com</email>
</author>
<published>2020-03-11T09:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=18e5416636b19b0953b1e6e26bfaeab1ebecce4c'/>
<id>18e5416636b19b0953b1e6e26bfaeab1ebecce4c</id>
<content type='text'>
Some web actions/controllers/viewsl have been adapted to properly instantiate the
newly refactored control panel and update it accordingly. We needed to adapt the
starting mechanism of actions and controllers to ensure that the control panel
instantiation did not delay the loading of any widget.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some web actions/controllers/viewsl have been adapted to properly instantiate the
newly refactored control panel and update it accordingly. We needed to adapt the
starting mechanism of actions and controllers to ensure that the control panel
instantiation did not delay the loading of any widget.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine &lt;dam@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: show measure row in xlsx file</title>
<updated>2020-01-28T09:00:35+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2019-11-26T06:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e5aa3109f5212185b0a927566c5501044896d4c0'/>
<id>e5aa3109f5212185b0a927566c5501044896d4c0</id>
<content type='text'>
before this commit: if only one measure is enabled then measure row not
displayed in downloaded xlsx file

after this commit: downloaded xlsx file will always have measure row
either single measure enabled or multiple measure enabled

task-2127388

closes odoo/odoo#40769

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
before this commit: if only one measure is enabled then measure row not
displayed in downloaded xlsx file

after this commit: downloaded xlsx file will always have measure row
either single measure enabled or multiple measure enabled

task-2127388

closes odoo/odoo#40769

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web: rewrite pivot view renderer with OWL</title>
<updated>2019-12-09T12:53:24+00:00</updated>
<author>
<name>Pierre Rousseau</name>
<email>pro@odoo.com</email>
</author>
<published>2019-12-03T09:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=46cf65d68e9c13193dff4b563b9b0bbb2199dfc1'/>
<id>46cf65d68e9c13193dff4b563b9b0bbb2199dfc1</id>
<content type='text'>
Because the webclient and other higher level components such as the
actionManager are not yet rewritten in OWL, we cannot make a complete
migration of the controller and the model to a more OWL-ish code.

We have rewritten the renderer completely in OWL, it uses more
extensively a template and manages its own state and its sub-components.

We did not rewrite the controller, however we have made it inherit from
`web.ControllerAdapter` which is a thin compatibility layer used when a
odoo controller uses a OWL renderer.

In the tests, the only changes are that all the events triggered by the
test and handled by OWL must be triggered on DOM nodes directly and not
on JQuery elements.

closes odoo/odoo#39491

Related: odoo/enterprise#7135
Signed-off-by: VincentSchippefilt &lt;VincentSchippefilt@users.noreply.github.com&gt;
Co-authored-by: VincentSchippefilt &lt;vsc@odoo.com&gt;
Co-authored-by: pro-odoo &lt;pro@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because the webclient and other higher level components such as the
actionManager are not yet rewritten in OWL, we cannot make a complete
migration of the controller and the model to a more OWL-ish code.

We have rewritten the renderer completely in OWL, it uses more
extensively a template and manages its own state and its sub-components.

We did not rewrite the controller, however we have made it inherit from
`web.ControllerAdapter` which is a thin compatibility layer used when a
odoo controller uses a OWL renderer.

In the tests, the only changes are that all the events triggered by the
test and handled by OWL must be triggered on DOM nodes directly and not
on JQuery elements.

closes odoo/odoo#39491

Related: odoo/enterprise#7135
Signed-off-by: VincentSchippefilt &lt;VincentSchippefilt@users.noreply.github.com&gt;
Co-authored-by: VincentSchippefilt &lt;vsc@odoo.com&gt;
Co-authored-by: pro-odoo &lt;pro@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
