<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/website/static/src/js/menu/content.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] survey, web, web_editor, website, website_form: Prevent invalid date stock.picking</title>
<updated>2020-12-04T11:02:41+00:00</updated>
<author>
<name>Achraf (abz)</name>
<email>abz@odoo.com</email>
</author>
<published>2020-12-03T12:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b873bda1e560bc49ab707aa238fdc962f23bc1e4'/>
<id>b873bda1e560bc49ab707aa238fdc962f23bc1e4</id>
<content type='text'>
What are the steps to reproduce your issue?

1. Install "stock"
2. Go to Inventory/Inventory Overview/Internal Transfer
3. Create new record and set manually a date with year &lt; 1000 like "0008-10-10 18:35:00"
4. Save
What is currently happening?

An error arises when saving the record, and it is then no longer
possible to reopen the records or any view containing it.
This also prevents us from correcting the date to no longer have the error
Why is this happening?

The root cause is an inconsistency in `strftime` for years &lt; 1000 [1, 2]. To take it into
account, a zero-padding is needed in the DateTime parser.
How to fix the bug?

The missing padding is added.

However, such dates lead to problematic behaviors in Python:

```
DT_FORMAT = "%Y-%m-%d %H:%M:%S"
new_date = "0008-02-05 18:10:10"
datetime.strptime(
    datetime.strptime(
        new_date, DT_FORMAT
    ).strftime(DT_FORMAT),
    DT_FORMAT
)
```

This raises:
```
ValueError: time data '8-02-05 18:10:10' does not match format '%Y-%m-%d %H:%M:%S'
```

As of today there was no reported business cases where dates with year &lt; 1000 would be
necessary. Therefore, we limit the range to years &gt;= 1000.
[1] https://bugs.python.org/issue13305
[2] https://docs.python.org/dev/library/datetime.html#strftime-strptime-behavior

opw-2408260

closes odoo/odoo#62818

Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
What are the steps to reproduce your issue?

1. Install "stock"
2. Go to Inventory/Inventory Overview/Internal Transfer
3. Create new record and set manually a date with year &lt; 1000 like "0008-10-10 18:35:00"
4. Save
What is currently happening?

An error arises when saving the record, and it is then no longer
possible to reopen the records or any view containing it.
This also prevents us from correcting the date to no longer have the error
Why is this happening?

The root cause is an inconsistency in `strftime` for years &lt; 1000 [1, 2]. To take it into
account, a zero-padding is needed in the DateTime parser.
How to fix the bug?

The missing padding is added.

However, such dates lead to problematic behaviors in Python:

```
DT_FORMAT = "%Y-%m-%d %H:%M:%S"
new_date = "0008-02-05 18:10:10"
datetime.strptime(
    datetime.strptime(
        new_date, DT_FORMAT
    ).strftime(DT_FORMAT),
    DT_FORMAT
)
```

This raises:
```
ValueError: time data '8-02-05 18:10:10' does not match format '%Y-%m-%d %H:%M:%S'
```

As of today there was no reported business cases where dates with year &lt; 1000 would be
necessary. Therefore, we limit the range to years &gt;= 1000.
[1] https://bugs.python.org/issue13305
[2] https://docs.python.org/dev/library/datetime.html#strftime-strptime-behavior

opw-2408260

closes odoo/odoo#62818

Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: prevent crashes from tempusdominus</title>
<updated>2020-11-05T14:18:52+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2020-10-22T09:53:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bcfbc3ea11814931c5d1f8ce3c44b1756bbfc439'/>
<id>bcfbc3ea11814931c5d1f8ce3c44b1756bbfc439</id>
<content type='text'>
The BS4 tempusdominus lib has 2 issues within Odoo:
1. On wrong string formating (eg typing "33"), the lib would trigger its own
   error "datetimepicker.error" that would be catch in our crash manager making
   it display a modal error.
   This is generally handled by catching that event and preventing it to bubble
   to the crash manager, see:
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L128
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L43
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1646
2. If there is a valid date, and an user enter an unvalid date, the lib crashed
   by throwing `Cannot read property 'format' of undefined'`.
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L94 (fbbfa6ddca and 5481c429efb)
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L149
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1617

Note that the issue was reported at https://github.com/tempusdominus/bootstrap-4/issues/223

Those errors can be seen for instance in Page Properties dialog (publish date
field) and in the form builder snippet if you add a date(time) field.

task-2335403

closes odoo/odoo#60514

Signed-off-by: Romain Derie &lt;rdeodoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The BS4 tempusdominus lib has 2 issues within Odoo:
1. On wrong string formating (eg typing "33"), the lib would trigger its own
   error "datetimepicker.error" that would be catch in our crash manager making
   it display a modal error.
   This is generally handled by catching that event and preventing it to bubble
   to the crash manager, see:
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L128
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L43
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1646
2. If there is a valid date, and an user enter an unvalid date, the lib crashed
   by throwing `Cannot read property 'format' of undefined'`.
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L94 (fbbfa6ddca and 5481c429efb)
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L149
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1617

Note that the issue was reported at https://github.com/tempusdominus/bootstrap-4/issues/223

Those errors can be seen for instance in Page Properties dialog (publish date
field) and in the form builder snippet if you add a date(time) field.

task-2335403

closes odoo/odoo#60514

Signed-off-by: Romain Derie &lt;rdeodoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: remove min date limitation of year 1900</title>
<updated>2020-07-28T14:02:10+00:00</updated>
<author>
<name>Harpritsinh Sisodiya</name>
<email>hsi@odoo.com</email>
</author>
<published>2020-05-15T14:29:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6aa6c321a6cfc08e5490781c4fc7ee62beeebb15'/>
<id>6aa6c321a6cfc08e5490781c4fc7ee62beeebb15</id>
<content type='text'>
Before this commit, user could not selecta a date before year 1900.
This was an historical limitation due to python &lt; 3.2 that didn't
support dates before 1900.

After this commit, user can select any date, user can select any
date from 01/01/0001.

taskID: 2166761
Fixes #41788
Closes #43055

closes odoo/odoo#51406

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@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>
Before this commit, user could not selecta a date before year 1900.
This was an historical limitation due to python &lt; 3.2 that didn't
support dates before 1900.

After this commit, user can select any date, user can select any
date from 01/01/0001.

taskID: 2166761
Fixes #41788
Closes #43055

closes odoo/odoo#51406

Signed-off-by: Géry Debongnie (ged) &lt;ged@openerp.com&gt;
Co-authored-by: Mohammed Shekha &lt;msh@odoo.com&gt;
Co-authored-by: Aaron Bohy &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website, *: add the possibility to hide the footer, per page</title>
<updated>2020-06-30T14:19:16+00:00</updated>
<author>
<name>Benjamin Vray</name>
<email>bvr@odoo.com</email>
</author>
<published>2020-06-30T13:23:22+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b43546c091758ea2b527b9173d775474fbb8d150'/>
<id>b43546c091758ea2b527b9173d775474fbb8d150</id>
<content type='text'>
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website, *: add the possibility to hide the header</title>
<updated>2020-06-30T14:19:16+00:00</updated>
<author>
<name>Benjamin Vray</name>
<email>bvr@odoo.com</email>
</author>
<published>2020-06-30T13:23:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=db951aafbe78198961f0238d87c2436d63a6014b'/>
<id>db951aafbe78198961f0238d87c2436d63a6014b</id>
<content type='text'>
*: web_editor

General website option + page option

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*: web_editor

General website option + page option

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website: use groups_id for visibility</title>
<updated>2020-05-29T08:22:34+00:00</updated>
<author>
<name>fja-odoo</name>
<email>fja@odoo.com</email>
</author>
<published>2020-05-25T20:07:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ad828f40424192337017a899566d71992381b574'/>
<id>ad828f40424192337017a899566d71992381b574</id>
<content type='text'>
visibility_group was used for visibility, we now use the groups_id field.
groups_id is a M2M field while visibility_group was a M2O field resulting
in an issue to display the M2M field in the frontend. We decided to
allow editing the groups as a M2O in the frontend. If there is more
than one group the user will have to go through the backend to edit.

task-2264580

closes odoo/odoo#51846

Related: odoo/upgrade#1260
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
visibility_group was used for visibility, we now use the groups_id field.
groups_id is a M2M field while visibility_group was a M2O field resulting
in an issue to display the M2M field in the frontend. We decided to
allow editing the groups as a M2O in the frontend. If there is more
than one group the user will have to go through the backend to edit.

task-2264580

closes odoo/odoo#51846

Related: odoo/upgrade#1260
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_event: restore edit menu choice</title>
<updated>2020-03-26T16:44:32+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2020-03-18T11:30:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a3fa70fd5f78cbdf5689b605784c790eb7274442'/>
<id>a3fa70fd5f78cbdf5689b605784c790eb7274442</id>
<content type='text'>
Website has a behavior that will ask you which menu you want to edit if you
click on 'Edit Menu' in the topbar and there is more than one menu in the DOM.

This is typically the case for the event pages where the event has its own menu
on top of the website one.

This event menu was not triggering that behavior since 5b563549fa6 where is
was accidentally broken.

closes odoo/odoo#48459

X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Signed-off-by: Romain Derie &lt;rdeodoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Website has a behavior that will ask you which menu you want to edit if you
click on 'Edit Menu' in the topbar and there is more than one menu in the DOM.

This is typically the case for the event pages where the event has its own menu
on top of the website one.

This event menu was not triggering that behavior since 5b563549fa6 where is
was accidentally broken.

closes odoo/odoo#48459

X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Signed-off-by: Romain Derie &lt;rdeodoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website: make handle_visibility private</title>
<updated>2020-03-21T10:23:32+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-03-02T14:14:18+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=94f8f15036c3e5fec4aed9a7e50960bc7f190631'/>
<id>94f8f15036c3e5fec4aed9a7e50960bc7f190631</id>
<content type='text'>
This commit:
   - make handle_visibility a private function (even if not
     exploitable in rpc easily since it uses request.website)
   - encrypt the password in db (even if not critic, since this
     password could be shared on twitter, ... it doesn't cost anything
     to secure it a bit more)
   - remove useless sudo, since handle_visibility does a sudo itself.

In the future, this notion of visibility should be handled on controller layer,
and no more on the View layer (during rendering)

closes odoo/odoo#48145

X-original-commit: 06e0e48217f25f17dff23331111f5dcb98e8cecd
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit:
   - make handle_visibility a private function (even if not
     exploitable in rpc easily since it uses request.website)
   - encrypt the password in db (even if not critic, since this
     password could be shared on twitter, ... it doesn't cost anything
     to secure it a bit more)
   - remove useless sudo, since handle_visibility does a sudo itself.

In the future, this notion of visibility should be handled on controller layer,
and no more on the View layer (during rendering)

closes odoo/odoo#48145

X-original-commit: 06e0e48217f25f17dff23331111f5dcb98e8cecd
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website: improve code for duplicate and new page</title>
<updated>2020-02-11T15:30:10+00:00</updated>
<author>
<name>Bhavita Bhatt</name>
<email>bbh@odoo.com</email>
</author>
<published>2019-12-16T10:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4e340cc5f0c1fe9de17a2b852de4faf65a33926a'/>
<id>4e340cc5f0c1fe9de17a2b852de4faf65a33926a</id>
<content type='text'>
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.

task-2088546
closes #40085

Co-authored-by: jpr-odoo &lt;jpr@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.

task-2088546
closes #40085

Co-authored-by: jpr-odoo &lt;jpr@openerp.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[REV] web: reverts update to fontawesome 5.11.2</title>
<updated>2019-12-09T10:33:36+00:00</updated>
<author>
<name>Kevin Baptiste</name>
<email>kba@odoo.com</email>
</author>
<published>2019-12-05T07:18:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6cbe824871da51af27ac5b2feb7ecc9fcd6b18d0'/>
<id>6cbe824871da51af27ac5b2feb7ecc9fcd6b18d0</id>
<content type='text'>
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
