<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/tests/__init__.py, 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: fix kanban view progressbars related to records in another group (groupby:week)</title>
<updated>2021-05-06T09:19:07+00:00</updated>
<author>
<name>abd-msyukyu-odoo</name>
<email>abd@odoo.com</email>
</author>
<published>2021-04-27T14:43:13+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=665e9538005832b557f30f7a6663b25cf3e7c169'/>
<id>665e9538005832b557f30f7a6663b25cf3e7c169</id>
<content type='text'>
* IMPACTED VERSIONS

  12.0+

* HOW TO REPRODUCE

locale :  Locale is en_US (or other SUNDAY based)
view:     CRM - My Pipeline - Kanban view
groupBy:  date_deadline:week (Expected closing)
records:  one record with a planned activity, on date_deadline = 2021-05-02 (SUNDAY)
          one record with no planned activity, on date_deadline = 2021-05-09 (SUNDAY)
remark:   don't keep any other record in MAY for better visibility

* PROBLEM

The progressbar of the week containing 2021-05-09 displays information about the record
from the week containing 2021-05-02

* CAUSE

1. PostgreSQL `date_trunc` function follows ISO8601 which essentially means that
  the start of a WEEK is always MONDAY. There is no argument to change this.

2. _read_group_format_result
  https://github.com/odoo/odoo/blob/27da86a138089c1838e4b94f8a6976995b9c1fff/odoo/models.py#L2210-L2219

  - Computes a label for a group of records.
  - Follows the locale for the label of the week, based on a date which is
    always a MONDAY because of `date_trunc`.

3. read_progress_bar
  https://github.com/odoo/odoo/blob/88957afca09662af7eaa19df1e40b3699e45e79e/addons/web/models/models.py#L167-L175

  - Associates a group label to a record.
  - Follows the locale for the label of the week, based on the date of a record
    which can be any day of the week. If the record is related to a SUNDAY and
    SUNDAY is the first day of the week, it would have been in a group with a
    different label in (2.) than in (3.) prior to this change.

* FIX

In 3., before associating a label to a record, we truncate the date to the
ISO start of the period, so that the label is determined for a record in the
same conditions than in 2. The locale is still used to get language-dependent
outputs with babel, but the grouping will always follows ISO8601 (date_trunc).

* TEST

Added a test for this problem case

TASK-ID : 2517848

closes odoo/odoo#70453

X-original-commit: c08f6e3e9a084944ea711d33b2421f845c560d3f
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* IMPACTED VERSIONS

  12.0+

* HOW TO REPRODUCE

locale :  Locale is en_US (or other SUNDAY based)
view:     CRM - My Pipeline - Kanban view
groupBy:  date_deadline:week (Expected closing)
records:  one record with a planned activity, on date_deadline = 2021-05-02 (SUNDAY)
          one record with no planned activity, on date_deadline = 2021-05-09 (SUNDAY)
remark:   don't keep any other record in MAY for better visibility

* PROBLEM

The progressbar of the week containing 2021-05-09 displays information about the record
from the week containing 2021-05-02

* CAUSE

1. PostgreSQL `date_trunc` function follows ISO8601 which essentially means that
  the start of a WEEK is always MONDAY. There is no argument to change this.

2. _read_group_format_result
  https://github.com/odoo/odoo/blob/27da86a138089c1838e4b94f8a6976995b9c1fff/odoo/models.py#L2210-L2219

  - Computes a label for a group of records.
  - Follows the locale for the label of the week, based on a date which is
    always a MONDAY because of `date_trunc`.

3. read_progress_bar
  https://github.com/odoo/odoo/blob/88957afca09662af7eaa19df1e40b3699e45e79e/addons/web/models/models.py#L167-L175

  - Associates a group label to a record.
  - Follows the locale for the label of the week, based on the date of a record
    which can be any day of the week. If the record is related to a SUNDAY and
    SUNDAY is the first day of the week, it would have been in a group with a
    different label in (2.) than in (3.) prior to this change.

* FIX

In 3., before associating a label to a record, we truncate the date to the
ISO start of the period, so that the label is determined for a record in the
same conditions than in 2. The locale is still used to get language-dependent
outputs with babel, but the grouping will always follows ISO8601 (date_trunc).

* TEST

Added a test for this problem case

TASK-ID : 2517848

closes odoo/odoo#70453

X-original-commit: c08f6e3e9a084944ea711d33b2421f845c560d3f
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: Document layout preview improvements</title>
<updated>2020-09-01T08:58:40+00:00</updated>
<author>
<name>Simon Genin (ges)</name>
<email>ges@odoo.com</email>
</author>
<published>2020-07-30T20:21:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c121a246f16899735306266a3a12b526e08e7620'/>
<id>c121a246f16899735306266a3a12b526e08e7620</id>
<content type='text'>
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.

The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.

The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.

Refactor all this from base to web.

Task ID 2304177

closes odoo/odoo#56415

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The document layout preview is a complete defferent simplified template
with its own css that replicates at best the different styles.
It does not have the external layout features and lack of fidelity.

The new preview actually use the real documents templates and put the
result in an iframe. It now has a high fidelity, though not perfect.

The goal is for a better onboarding, where clients see easely how
documents will look if they had an app to generate them. Of course, the
data on the document is a false invoice.

Refactor all this from base to web.

Task ID 2304177

closes odoo/odoo#56415

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: Correctly aggregate values in exported parent groups</title>
<updated>2019-10-16T15:49:49+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2019-10-10T09:08:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=645ae69bb94bb810c7afc031d9eee9e89784a3df'/>
<id>645ae69bb94bb810c7afc031d9eee9e89784a3df</id>
<content type='text'>
When exporting a grouped list view with some nested groups, the aggregate value
of parent groups are not correct. It always sums aggregated values of children
whether the group operator is 'sum' or not (could be 'max', 'avg', ...).

This behavior is wrong and can even lead to a crash if the aggregated field is a
date field (e.g. with group_operator='max'). (Try two sum two dates...)

The quick fix 85cf47f was merged just before OXP to avoid any crash. This fix
limited the support of aggregates to only int and float fields.
This commit remove this limitation.

This commit correclty implements the aggregation for parent group for all
field types and all group_operator.

This commit also improves the export feature tests.

X-original-commit: 5e7e4fa98698967e3c4fd0903f4aa8e91981a6cd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When exporting a grouped list view with some nested groups, the aggregate value
of parent groups are not correct. It always sums aggregated values of children
whether the group operator is 'sum' or not (could be 'max', 'avg', ...).

This behavior is wrong and can even lead to a crash if the aggregated field is a
date field (e.g. with group_operator='max'). (Try two sum two dates...)

The quick fix 85cf47f was merged just before OXP to avoid any crash. This fix
limited the support of aggregates to only int and float fields.
This commit remove this limitation.

This commit correclty implements the aggregation for parent group for all
field types and all group_operator.

This commit also improves the export feature tests.

X-original-commit: 5e7e4fa98698967e3c4fd0903f4aa8e91981a6cd
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: Export grouped list view in xls file</title>
<updated>2019-09-20T14:18:35+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2019-09-18T10:06:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5c4544fb2943e63fc1e0f5ae1e7e250a5a2b2cf1'/>
<id>5c4544fb2943e63fc1e0f5ae1e7e250a5a2b2cf1</id>
<content type='text'>
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 &lt;tree&gt; to specify whether or not the export shortcut should be displayed

Task 2072910
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;tree&gt; to specify whether or not the export shortcut should be displayed

Task 2072910
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[IMP] web: Export list view as XLS file"</title>
<updated>2019-09-19T12:00:49+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2019-09-18T10:08:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2849b5cb395175c286ddebc269c7b16e7f97e9e6'/>
<id>2849b5cb395175c286ddebc269c7b16e7f97e9e6</id>
<content type='text'>
This reverts commit ac00548b28c0c384b5b1423f65405e4918101872.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ac00548b28c0c384b5b1423f65405e4918101872.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: Export list view as XLS file</title>
<updated>2019-09-16T13:57:40+00:00</updated>
<author>
<name>Lucas Lefèvre</name>
<email>lul@odoo.com</email>
</author>
<published>2019-09-12T13:16:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ac00548b28c0c384b5b1423f65405e4918101872'/>
<id>ac00548b28c0c384b5b1423f65405e4918101872</id>
<content type='text'>
Purpose
=======

Have a quick export feature.

The current export wizard is quite complex.
We want to be able to quickly export a tree view,
with the group by correctly represented, depending on the fields
visible in the list view.

Specification
=============

Add an "EXPORT (XLS)" button in the list view (a little download icon)
- export only columns visible in list view
- export all the records
- while respecting the group by

This should be a generic feature but should be applied to all
the account.move.lines list views.
account.view_move_line_tree_grouped_sales_purchases
account.view_move_line_tree_grouped_bank_cash
account.view_move_line_tree_grouped_misc

Task 2031835

closes odoo/odoo#36943

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======

Have a quick export feature.

The current export wizard is quite complex.
We want to be able to quickly export a tree view,
with the group by correctly represented, depending on the fields
visible in the list view.

Specification
=============

Add an "EXPORT (XLS)" button in the list view (a little download icon)
- export only columns visible in list view
- export all the records
- while respecting the group by

This should be a generic feature but should be applied to all
the account.move.lines list views.
account.view_move_line_tree_grouped_sales_purchases
account.view_move_line_tree_grouped_bank_cash
account.view_move_line_tree_grouped_misc

Task 2031835

closes odoo/odoo#36943

Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: bar chart no crazy with 2 group by</title>
<updated>2019-01-24T16:18:19+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2019-01-24T15:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ce6e66cef930a30d9a62988a16f9f8319cb9f25c'/>
<id>ce6e66cef930a30d9a62988a16f9f8319cb9f25c</id>
<content type='text'>
In 3d2ca8104e4 some change were introduced to the graph view.

But part of it had no sense when displaying data over 2 group by.

eg. if the first level has 2 groups (2018, 2019) and each second level 2
    groups (Done,Cancelled), we could have:
     2018/Done: 0
     2018/Cancelled: 5
     2019/Done: 8
     2019/Cancelled: 9
    this gives us two main groups [2018: 5] / [2019: 17], the code
    remove the 2018 because [2018/Done] is 0 so we have something odd
    with columns not in order, and in stacked bar chart some part of
    a bar at the wrong offset

opw-1932517
closes #30529</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 3d2ca8104e4 some change were introduced to the graph view.

But part of it had no sense when displaying data over 2 group by.

eg. if the first level has 2 groups (2018, 2019) and each second level 2
    groups (Done,Cancelled), we could have:
     2018/Done: 0
     2018/Cancelled: 5
     2019/Done: 8
     2019/Cancelled: 9
    this gives us two main groups [2018: 5] / [2019: 17], the code
    remove the 2018 because [2018/Done] is 0 so we have something odd
    with columns not in order, and in stacked bar chart some part of
    a bar at the wrong offset

opw-1932517
closes #30529</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: New test to test Odoo menus</title>
<updated>2018-08-29T14:57:27+00:00</updated>
<author>
<name>Christophe Monniez</name>
<email>moc@odoo.com</email>
</author>
<published>2018-07-04T14:32:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3f0ebca1924afb538c6f7960a42aba725654c643'/>
<id>3f0ebca1924afb538c6f7960a42aba725654c643</id>
<content type='text'>
This commit adds a new js test in web that enters each app and click on
each view switcher, each menu and each search filter.

This test is tagged '-standard' and 'click_all' as it could last a long
time, that way it's not executed by default.

It could also be started from the browser console with
'clickEverywhere();'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new js test in web that enters each app and click on
each view switcher, each menu and each search filter.

This test is tagged '-standard' and 'click_all' as it could last a long
time, that way it's not executed by default.

It could also be started from the browser console with
'clickEverywhere();'.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] Various P3-related import changes</title>
<updated>2017-04-28T07:06:53+00:00</updated>
<author>
<name>xmo-odoo</name>
<email>xmo@odoo.com</email>
</author>
<published>2017-04-28T07:06:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b4429c2a91889bf60b56e0c7909c844d357363f7'/>
<id>b4429c2a91889bf60b56e0c7909c844d357363f7</id>
<content type='text'>
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&amp;keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&amp;keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: remove void file, replace openerp tags, add license, clean imports</title>
<updated>2016-08-03T11:42:00+00:00</updated>
<author>
<name>fwi-odoo</name>
<email>fwi@odoo.com</email>
</author>
<published>2016-07-20T13:00:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7d487c00a679980b96409e261322f93ba3e340f2'/>
<id>7d487c00a679980b96409e261322f93ba3e340f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
