<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web_editor/models/ir_qweb.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] base, web_editor: don't crash on deleted records</title>
<updated>2021-02-11T18:32:15+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2021-02-11T13:12:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b358e67fae8d60e2e9935613d6fcdeff64121ad2'/>
<id>b358e67fae8d60e2e9935613d6fcdeff64121ad2</id>
<content type='text'>
task-2458109

closes odoo/odoo#66019

X-original-commit: 550043b6c36cf657e6cee229676a95ee6482e421
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
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>
task-2458109

closes odoo/odoo#66019

X-original-commit: 550043b6c36cf657e6cee229676a95ee6482e421
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] misc: Babel; handle 'kur' (kurdish) locale</title>
<updated>2021-01-10T18:26:33+00:00</updated>
<author>
<name>Nasreddin (bon)</name>
<email>bon@odoo.com</email>
</author>
<published>2021-01-06T16:17:24+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e6ccdb397792db62c3b08d96435b3c1667c1aa9d'/>
<id>e6ccdb397792db62c3b08d96435b3c1667c1aa9d</id>
<content type='text'>
Issue

	- add a new language with locale code KUR (for Kurdish)
	- print any report with a datetime on it (RFQ for example)

Cause

	Babel (version &lt; 2.7.0) does not handle locale "KUR".

Solution

	If wrong locale or not managed by Babel, try to fallback
	on server default locale.
	If still wrong locale or not managed, then fallback on "en_US" as locale.

opw-2416482

closes odoo/odoo#64301

X-original-commit: 0276c3ef20c79e7061ea5b92aafd6dea190c6a27
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: bon-odoo &lt;nboulif@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue

	- add a new language with locale code KUR (for Kurdish)
	- print any report with a datetime on it (RFQ for example)

Cause

	Babel (version &lt; 2.7.0) does not handle locale "KUR".

Solution

	If wrong locale or not managed by Babel, try to fallback
	on server default locale.
	If still wrong locale or not managed, then fallback on "en_US" as locale.

opw-2416482

closes odoo/odoo#64301

X-original-commit: 0276c3ef20c79e7061ea5b92aafd6dea190c6a27
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Signed-off-by: bon-odoo &lt;nboulif@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: make sure [data-snippet] is added on internal t-call</title>
<updated>2020-08-18T17:39:29+00:00</updated>
<author>
<name>qsm-odoo</name>
<email>qsm@odoo.com</email>
</author>
<published>2020-08-18T14:34:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=faf51a373b3f7d299a67604ea86bc3a852b15c1b'/>
<id>faf51a373b3f7d299a67604ea86bc3a852b15c1b</id>
<content type='text'>
Since [1], an attribute is added on all snippet contents, on the main
node, to be able to identify them and better support them. This is
added thanks to the t-snippet or the t-snippet-call instruction. The
problem was this was not working if the first node of the snippet
definition is also a t-call to another sub template. This now works.

[1]: https://github.com/odoo/odoo/commit/11c60739e4f4379a61581ed179bc7debbb5e91f9

task-2276740
PR #53175</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since [1], an attribute is added on all snippet contents, on the main
node, to be able to identify them and better support them. This is
added thanks to the t-snippet or the t-snippet-call instruction. The
problem was this was not working if the first node of the snippet
definition is also a t-call to another sub template. This now works.

[1]: https://github.com/odoo/odoo/commit/11c60739e4f4379a61581ed179bc7debbb5e91f9

task-2276740
PR #53175</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web_editor, *: add snippets search filter</title>
<updated>2020-08-13T14:29:20+00:00</updated>
<author>
<name>xO-Tx</name>
<email>mou@odoo.com</email>
</author>
<published>2020-08-03T16:29:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=41527531b7b6f727e25a5a68aedb49609fbb1d3a'/>
<id>41527531b7b6f727e25a5a68aedb49609fbb1d3a</id>
<content type='text'>
*: website

Add a search bar at the top of the "Blocks" tab to filter snippets.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832

closes odoo/odoo#55272

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*: website

Add a search bar at the top of the "Blocks" tab to filter snippets.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832

closes odoo/odoo#55272

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: add sudo when accessing views</title>
<updated>2020-05-14T11:59:10+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-02-06T14:03:00+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=56a8c9e4311d24c33b7ad08b8230e4be345a85b8'/>
<id>56a8c9e4311d24c33b7ad08b8230e4be345a85b8</id>
<content type='text'>
The method fields_view_get should be the only way to retrieve the view
content. This method is executed in a super-user context.

To avoid retrieving views for a model a user does not have access to
(as it may reveal some informations like name of fields), add a
verification of 'read' rights before retrieving the view content.

Execute _postprocess_access_rights with sudo(False) as this method is
used to evaluate which buttons should be displayed.
Remove the su flag to avoid misleading the user and displaying a
button they won't be able to use.

Retrieving the database id from an view key is not considered as a
sensitive information and get_view_id and viewref can be left as a
public methods.

Add missing sudo when needed

Change _handle_visibility in website to avoid increasing the query
count: Checking the visibility (to fail most of the time) to retry in
sudo was making unecessary queries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The method fields_view_get should be the only way to retrieve the view
content. This method is executed in a super-user context.

To avoid retrieving views for a model a user does not have access to
(as it may reveal some informations like name of fields), add a
verification of 'read' rights before retrieving the view content.

Execute _postprocess_access_rights with sudo(False) as this method is
used to evaluate which buttons should be displayed.
Remove the su flag to avoid misleading the user and displaying a
button they won't be able to use.

Retrieving the database id from an view key is not considered as a
sensitive information and get_view_id and viewref can be left as a
public methods.

Add missing sudo when needed

Change _handle_visibility in website to avoid increasing the query
count: Checking the visibility (to fail most of the time) to retry in
sudo was making unecessary queries.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website, *: warn user about outdated blocks</title>
<updated>2020-04-27T16:36:31+00:00</updated>
<author>
<name>fja-odoo</name>
<email>fja@odoo.com</email>
</author>
<published>2020-03-19T14:17:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=11c60739e4f4379a61581ed179bc7debbb5e91f9'/>
<id>11c60739e4f4379a61581ed179bc7debbb5e91f9</id>
<content type='text'>
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website: fix logo not supporting new image url format</title>
<updated>2020-04-02T18:49:03+00:00</updated>
<author>
<name>Samuel Degueldre</name>
<email>sad@odoo.com</email>
</author>
<published>2020-04-01T14:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bf9d864fb0a91e68dba36a901ebbe4d1bc1df4ee'/>
<id>bf9d864fb0a91e68dba36a901ebbe4d1bc1df4ee</id>
<content type='text'>
In a recent commit, we decided to change the image url format generated
by the media-dialog to leverage browser caching using unique.
Unfortunately, when saving an img tag to a binary field, the url parsing
did not support this new url format, causing a traceback when changing
the website logo and attempting to save.

closes odoo/odoo#48914

X-original-commit: 9c618c7f903f1a0b32e067cfd713cd39762250f9
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a recent commit, we decided to change the image url format generated
by the media-dialog to leverage browser caching using unique.
Unfortunately, when saving an img tag to a binary field, the url parsing
did not support this new url format, causing a traceback when changing
the website logo and attempting to save.

closes odoo/odoo#48914

X-original-commit: 9c618c7f903f1a0b32e067cfd713cd39762250f9
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: crash in date formatting if no langage set</title>
<updated>2020-02-27T20:04:06+00:00</updated>
<author>
<name>alt-odoo</name>
<email>alt@odoo.com</email>
</author>
<published>2020-02-26T16:46:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b0be65f2115f87acda45af477bcbd709c80c2ac3'/>
<id>b0be65f2115f87acda45af477bcbd709c80c2ac3</id>
<content type='text'>
This issue was introduced with commit 251b880de1caeeef1f27447d4ad69e1abeffde19 : in case current user has no langage,
we should have a fallback case by retrieving the first langage installed in the database.

closes odoo/odoo#46487

X-original-commit: 67cf1150507b8092c32bf745e4c8620409fdc238
Signed-off-by: Alex Tuyls &lt;alt-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This issue was introduced with commit 251b880de1caeeef1f27447d4ad69e1abeffde19 : in case current user has no langage,
we should have a fallback case by retrieving the first langage installed in the database.

closes odoo/odoo#46487

X-original-commit: 67cf1150507b8092c32bf745e4c8620409fdc238
Signed-off-by: Alex Tuyls &lt;alt-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor, website: handle date edition in all lang and format</title>
<updated>2020-02-21T18:57:59+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2020-02-14T16:49:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4eafd788470daac1ce3da827d2bd3e648914a265'/>
<id>4eafd788470daac1ce3da827d2bd3e648914a265</id>
<content type='text'>
Before d00c0e317, `Datetime` fields would be editable in frontend but would
have unexpected results, especially in non-English languages, for when the
english lang format had been changed.
It would also crash when saving non-English strings, such as `Lundi`.
For more details, see https://github.com/odoo/odoo/pull/44484#issuecomment-586850490

Since d00c0e317, only date displayed in lang format would be editable, which
case is Event page in Odoo 12.0. Everywhere else, the format is changed for a
nicer layout, either with `widget=XXX` or `t-options=YYY`, such as:
`&lt;time t-field="record.date" t-options='{"format": "MMM d, yyyy"}'/&gt;`
`&lt;time t-field="record.date" t-options="{'time_only': 'true', 'format': 'short'}"/&gt;`

When a date parsing crashes during editor save, the problem is not only that
the date can be saved, but the whole changes of the page are lost, as they
won't be saved either.

This commit attempts to fix every languages cases, regardless of the website
lang or user lang.
To do so, we store the date in the user lang format in a data attribute of
every date field in the DOM. Once the field is clicked (to edit probably),
that value will replace the one displayed according to the widget/options.
That way, dates will always be sent to the server in the user lang format,
avoiding any possible mismatch.

This whole fix apply to `Datetime` and `Date` fields.

opw-2183055
Closes #44484
Closes #45555
Fixes #44047

closes odoo/odoo#45725

closes odoo/odoo#45997

X-original-commit: c0db9bb8027ff926c619aebe6e0a5cdd05808232
Original-signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;
Co-authored-by: Jeremy Kersten &lt;jke@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before d00c0e317, `Datetime` fields would be editable in frontend but would
have unexpected results, especially in non-English languages, for when the
english lang format had been changed.
It would also crash when saving non-English strings, such as `Lundi`.
For more details, see https://github.com/odoo/odoo/pull/44484#issuecomment-586850490

Since d00c0e317, only date displayed in lang format would be editable, which
case is Event page in Odoo 12.0. Everywhere else, the format is changed for a
nicer layout, either with `widget=XXX` or `t-options=YYY`, such as:
`&lt;time t-field="record.date" t-options='{"format": "MMM d, yyyy"}'/&gt;`
`&lt;time t-field="record.date" t-options="{'time_only': 'true', 'format': 'short'}"/&gt;`

When a date parsing crashes during editor save, the problem is not only that
the date can be saved, but the whole changes of the page are lost, as they
won't be saved either.

This commit attempts to fix every languages cases, regardless of the website
lang or user lang.
To do so, we store the date in the user lang format in a data attribute of
every date field in the DOM. Once the field is clicked (to edit probably),
that value will replace the one displayed according to the widget/options.
That way, dates will always be sent to the server in the user lang format,
avoiding any possible mismatch.

This whole fix apply to `Datetime` and `Date` fields.

opw-2183055
Closes #44484
Closes #45555
Fixes #44047

closes odoo/odoo#45725

closes odoo/odoo#45997

X-original-commit: c0db9bb8027ff926c619aebe6e0a5cdd05808232
Original-signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
Co-authored-by: Romain Derie &lt;rde@odoo.com&gt;
Co-authored-by: Jeremy Kersten &lt;jke@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] web_editor, *: allow saving of snippets</title>
<updated>2020-01-16T14:29:04+00:00</updated>
<author>
<name>fja-odoo</name>
<email>fja@odoo.com</email>
</author>
<published>2019-11-15T16:13:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=218e1cad6152999a0f41f073b5efa3c9428da48d'/>
<id>218e1cad6152999a0f41f073b5efa3c9428da48d</id>
<content type='text'>
* website, mass_mailing, website_event, website_form,
  website_mass_mailing, website_sale

Now the user can save snippets to use them on other pages.

task-2120409

closes odoo/odoo#40408

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Co-authored-by: qsm-odoo &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* website, mass_mailing, website_event, website_form,
  website_mass_mailing, website_sale

Now the user can save snippets to use them on other pages.

task-2120409

closes odoo/odoo#40408

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