<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/src/js/services, 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 the RedirectWarningHandler dialog not closing</title>
<updated>2021-01-08T17:35:37+00:00</updated>
<author>
<name>Damien Abeloos</name>
<email>abd@odoo.com</email>
</author>
<published>2021-01-08T16:56:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=892598cb0335926ece12789d81673f5b6370a1fd'/>
<id>892598cb0335926ece12789d81673f5b6370a1fd</id>
<content type='text'>
Impacted versions :
- 14.0 and higher

Steps to reproduce :
```
1. generate an odoo.exceptions.RedirectWarning
2. click on the primary button
```

Current behavior :
```
1. the action (argument of the RedirectWarning) is properly executed
2. the WarningDialog is not closed
```

Expected behavior :
```
1. the action should still be properly executed
2. the WarningDialog should be closed
```

Tests :
Added a test to ensure this behavior will not be overwritten in the future.
The test is for the CrashManager service, and evaluates the following sequence :
```
Entry: CrashManager receives a odoo.exceptions.RedirectWarning (code 200) via rpc_error
Asserts:
	- The RedirectWarning modal (WarningDialog) should be opened
	 	* Upon clicking on the primary button :
	- The modal should be closed
	- The action passed as an argument of the odoo.exceptions.RedirectWarning should be executed
```

Origin :
the incorrect behavior was introduced with :
https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976

Task ID: 2430100

closes odoo/odoo#64290

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 :
- 14.0 and higher

Steps to reproduce :
```
1. generate an odoo.exceptions.RedirectWarning
2. click on the primary button
```

Current behavior :
```
1. the action (argument of the RedirectWarning) is properly executed
2. the WarningDialog is not closed
```

Expected behavior :
```
1. the action should still be properly executed
2. the WarningDialog should be closed
```

Tests :
Added a test to ensure this behavior will not be overwritten in the future.
The test is for the CrashManager service, and evaluates the following sequence :
```
Entry: CrashManager receives a odoo.exceptions.RedirectWarning (code 200) via rpc_error
Asserts:
	- The RedirectWarning modal (WarningDialog) should be opened
	 	* Upon clicking on the primary button :
	- The modal should be closed
	- The action passed as an argument of the odoo.exceptions.RedirectWarning should be executed
```

Origin :
the incorrect behavior was introduced with :
https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976

Task ID: 2430100

closes odoo/odoo#64290

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: show warning on create onchange</title>
<updated>2020-12-15T16:41:34+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2020-11-13T16:29:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ff61ab121e3fb3c0c9b269c0dc9a65b3f1c8e664'/>
<id>ff61ab121e3fb3c0c9b269c0dc9a65b3f1c8e664</id>
<content type='text'>
When you create a new record, you will have in this order:

- default_get
- onchange (can trigger a warning)
- _pushController =&gt; close all dialogs since ea2207afeab8c

This is an issue since the possible warning is directly hidden to the
user.

Without the change, the added test failed with:

 Warning modal should be opened
 "executing a window action with onchange warning do not hide it":
 Found 0 elements to click on, instead of 1

opw-2342273
opw-2374051
closes #61732

closes odoo/odoo#63270

X-original-commit: 0784d9ab562379f31558fa44f9b9540c36a03760
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you create a new record, you will have in this order:

- default_get
- onchange (can trigger a warning)
- _pushController =&gt; close all dialogs since ea2207afeab8c

This is an issue since the possible warning is directly hidden to the
user.

Without the change, the added test failed with:

 Warning modal should be opened
 "executing a window action with onchange warning do not hide it":
 Found 0 elements to click on, instead of 1

opw-2342273
opw-2374051
closes #61732

closes odoo/odoo#63270

X-original-commit: 0784d9ab562379f31558fa44f9b9540c36a03760
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: handle mail delivery exception</title>
<updated>2020-11-17T06:49:39+00:00</updated>
<author>
<name>Hiral Bhavsar</name>
<email>hbh@odoo.com</email>
</author>
<published>2020-10-29T05:11:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3aadcf1ad42e704c369910628a1549d1e777c959'/>
<id>3aadcf1ad42e704c369910628a1549d1e777c959</id>
<content type='text'>
Before this commit:

When trying to send the notification for the user form, it shows a traceback.
This is happening after https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e

After this commit:

Send the notification without any traceback as handle
the MailDeliveryException inside CrashManager

Task-2333121

closes odoo/odoo#60938

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit:

When trying to send the notification for the user form, it shows a traceback.
This is happening after https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e

After this commit:

Send the notification without any traceback as handle
the MailDeliveryException inside CrashManager

Task-2333121

closes odoo/odoo#60938

Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: raise Warning triggers a traceback</title>
<updated>2020-10-19T10:38:08+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2020-10-19T10:23:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7058e338a980268df1c502b8b2860bdd8be9f727'/>
<id>7058e338a980268df1c502b8b2860bdd8be9f727</id>
<content type='text'>
Create a Server Action with the following code: `raise Warning("")`,
when the SA is executed it opens the crash manager with a traceback
instead of the user error modal.

The `odooExceptionTitleMap` data structure lists all Odoo exceptions
that descend from UserError, this structure is used within the
`rpc_error` function to filter pure Python exceptions from custom Odoo
ones.

opw-2365689

closes odoo/odoo#60248

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a Server Action with the following code: `raise Warning("")`,
when the SA is executed it opens the crash manager with a traceback
instead of the user error modal.

The `odooExceptionTitleMap` data structure lists all Odoo exceptions
that descend from UserError, this structure is used within the
`rpc_error` function to filter pure Python exceptions from custom Odoo
ones.

opw-2365689

closes odoo/odoo#60248

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: crash_manager uses BrowserDetection</title>
<updated>2020-08-24T06:26:48+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2020-08-24T06:18:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=59e0dbab98466a23792af4a10003142614bda676'/>
<id>59e0dbab98466a23792af4a10003142614bda676</id>
<content type='text'>
Before this commit, the crash manager used a copy of the browser detection isBrowserChrome method
because it was not possible to to register the proper dependency in stable version

This commit makes the crash manager use the module BrowserDetection for that purpose, with the proper
registered dependency before hand

closes odoo/odoo#56360

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, the crash manager used a copy of the browser detection isBrowserChrome method
because it was not possible to to register the proper dependency in stable version

This commit makes the crash manager use the module BrowserDetection for that purpose, with the proper
registered dependency before hand

closes odoo/odoo#56360

Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: crash manager correctly formats error message in Firefox</title>
<updated>2020-08-21T14:33:45+00:00</updated>
<author>
<name>Mohammed Shekha</name>
<email>msh@odoo.com</email>
</author>
<published>2020-08-21T09:46:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1ca3a590f7399f1379eea02c83eaa6046856a795'/>
<id>1ca3a590f7399f1379eea02c83eaa6046856a795</id>
<content type='text'>
Have a piece of code that throws an Error

In browsers not powered by V8, the stack trace won't be formatted and the Error
type won't appear in the crash manager modal report.

This happens because Error.prototype.stack is non-standard, although most
browsers have an implementation of it. Chrome for example automatically formats
the Error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://v8.dev/docs/stack-trace-api\#compatibility

After this commit, the Error is formatted in the crash manager report, the same
way as Chrome does it.

task-2191727

closes odoo/odoo#56318

X-original-commit: dbf670f2e0ec797aeaf998aa28b32afbdd2c3b4c
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
Co-authored-by: Lucas Perais &lt;lpe@odoo.com&gt;
Co-authored-by: Hardik Prajapati &lt;hap@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have a piece of code that throws an Error

In browsers not powered by V8, the stack trace won't be formatted and the Error
type won't appear in the crash manager modal report.

This happens because Error.prototype.stack is non-standard, although most
browsers have an implementation of it. Chrome for example automatically formats
the Error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://v8.dev/docs/stack-trace-api\#compatibility

After this commit, the Error is formatted in the crash manager report, the same
way as Chrome does it.

task-2191727

closes odoo/odoo#56318

X-original-commit: dbf670f2e0ec797aeaf998aa28b32afbdd2c3b4c
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
Co-authored-by: Lucas Perais &lt;lpe@odoo.com&gt;
Co-authored-by: Hardik Prajapati &lt;hap@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web: add a size_changed bus event</title>
<updated>2020-08-18T17:40:16+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-08-18T14:15:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8fb2ac4e6518842ac2a9f85b7710953c0089b8e3'/>
<id>8fb2ac4e6518842ac2a9f85b7710953c0089b8e3</id>
<content type='text'>
This commit will add a bus in the web.config config that allows
to trigger events.

The first use case is the trigger of the size_changed event that
is triggered each time the size of the screen changed of bootstrap
breakpoint.

task-2276740
PR #53175</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit will add a bus in the web.config config that allows
to trigger events.

The first use case is the trigger of the size_changed event that
is triggered each time the size of the screen changed of bootstrap
breakpoint.

task-2276740
PR #53175</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base : improve messages text in access_error pop-ups</title>
<updated>2020-06-30T13:59:23+00:00</updated>
<author>
<name>Sébastien Geelen (sge)</name>
<email>sge@odoo.com</email>
</author>
<published>2020-05-11T08:44:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6d93c725649c8f511c9ce5bc3a1abc1503d2ebd2'/>
<id>6d93c725649c8f511c9ce5bc3a1abc1503d2ebd2</id>
<content type='text'>
 * Improve layout of access error messages from group restriction
 * Improve layout of access error messages from security records rules
 * Use the error title in the js crash manager when possible
 * adapt unit tests

closes odoo/odoo#50369

Taskid: 2206787
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * Improve layout of access error messages from group restriction
 * Improve layout of access error messages from security records rules
 * Use the error title in the js crash manager when possible
 * adapt unit tests

closes odoo/odoo#50369

Taskid: 2206787
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web: force refresh on expired session popup button click</title>
<updated>2020-05-29T08:00:01+00:00</updated>
<author>
<name>Dhruv Patel</name>
<email>dhp@odoo.com</email>
</author>
<published>2020-05-05T12:35:29+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bf9890f98cbd9adceb369a25ddbcae4fbebeda9a'/>
<id>bf9890f98cbd9adceb369a25ddbcae4fbebeda9a</id>
<content type='text'>
Currently, when the session expired then it generates the popup that
"Your odoo session expired. Please refresh the current page."
Now once you click on the "Ok" button only close the popup and user have to
manually do refresh the page.

with this commit, we have changed the text of the popup to
"Your odoo session expired. The current page is about to be refreshed." and
when user click on "Ok" button forcefully refresh the page.

Task : 2241744

closes odoo/odoo#50710

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, when the session expired then it generates the popup that
"Your odoo session expired. Please refresh the current page."
Now once you click on the "Ok" button only close the popup and user have to
manually do refresh the page.

with this commit, we have changed the text of the popup to
"Your odoo session expired. The current page is about to be refreshed." and
when user click on "Ok" button forcefully refresh the page.

Task : 2241744

closes odoo/odoo#50710

Signed-off-by: Aaron Bohy (aab) &lt;aab@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web, web_editor: allow editor instantiation from public user</title>
<updated>2020-04-10T11:54:03+00:00</updated>
<author>
<name>qsm-odoo</name>
<email>qsm@odoo.com</email>
</author>
<published>2020-04-03T15:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e4a710351758e94a0743160050e50320546e6b07'/>
<id>e4a710351758e94a0743160050e50320546e6b07</id>
<content type='text'>
If for some reason someone wanted to develop a textarea using the
editor which is supposed to work as a public user (like we are trying
to do on Odoo.com), it was not possible. The code was "designed" to
allow it but there was one problem: the lazy loading of the editor
assets required a `render_template` call to the server... which cannot
be done from a public user.

This commit solves the issues by allowing the lazy loading of assets
to use a custom route if required. That route is then used by the editor
"root". That route performs the render_template as a superuser provided
that the view's xmlid is whitelisted.

Note: there was another unauthorized call for public user: the
colorpicker. This was solved by disabling the colorpicker template rpc
for public user, they will still get the default summernote one.

Part of https://github.com/odoo/odoo/pull/48981

closes odoo/odoo#48981

closes odoo/odoo#49398

X-original-commit: e84a0bfdc99c21406861b88c02b11c925d92f927
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If for some reason someone wanted to develop a textarea using the
editor which is supposed to work as a public user (like we are trying
to do on Odoo.com), it was not possible. The code was "designed" to
allow it but there was one problem: the lazy loading of the editor
assets required a `render_template` call to the server... which cannot
be done from a public user.

This commit solves the issues by allowing the lazy loading of assets
to use a custom route if required. That route is then used by the editor
"root". That route performs the render_template as a superuser provided
that the view's xmlid is whitelisted.

Note: there was another unauthorized call for public user: the
colorpicker. This was solved by disabling the colorpicker template rpc
for public user, they will still get the default summernote one.

Part of https://github.com/odoo/odoo/pull/48981

closes odoo/odoo#48981

closes odoo/odoo#49398

X-original-commit: e84a0bfdc99c21406861b88c02b11c925d92f927
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
