<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/website_slides/models/slide_slide.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] slides: Verifying the returned value of re.search before accessing the capture groups.</title>
<updated>2021-05-12T12:32:22+00:00</updated>
<author>
<name>Julien Banken</name>
<email>jbn@odoo.com</email>
</author>
<published>2021-05-10T07:36:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9572e2ab46962149372af45efb35b91f6e64f268'/>
<id>9572e2ab46962149372af45efb35b91f6e64f268</id>
<content type='text'>
The `search` function of the `re` package can return `None` if the
provided string does not match with the provided pattern
(https://docs.python.org/3/library/re.html#re.Pattern.search).

On the `_parse_youtube_document` function of the `slide.slide` model,
we are directly accessing the capture groups from the returned value
of the `search` function without checking that the returned value is
actually a 'match' object. As a result, an exception can be throw if
there is no match as, in that case, the `search` function will return
`None` and the `group` function will not be defined on `None`.

To avoid throwing an exception, we will check that the returned value
of the `search` function is not `None` before accessing the capture
groups via the `group` function.

LINKS

Task id: 2525007

closes odoo/odoo#70743

X-original-commit: 575a524474fe8866cc71b3befc6bbbde8d73075e
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `search` function of the `re` package can return `None` if the
provided string does not match with the provided pattern
(https://docs.python.org/3/library/re.html#re.Pattern.search).

On the `_parse_youtube_document` function of the `slide.slide` model,
we are directly accessing the capture groups from the returned value
of the `search` function without checking that the returned value is
actually a 'match' object. As a result, an exception can be throw if
there is no match as, in that case, the `search` function will return
`None` and the `group` function will not be defined on `None`.

To avoid throwing an exception, we will check that the returned value
of the `search` function is not `None` before accessing the capture
groups via the `group` function.

LINKS

Task id: 2525007

closes odoo/odoo#70743

X-original-commit: 575a524474fe8866cc71b3befc6bbbde8d73075e
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_slides: correctly shows 0 XP on completed unpublished quiz</title>
<updated>2021-05-04T13:14:40+00:00</updated>
<author>
<name>Philémon van Helden</name>
<email>pvh@odoo.com</email>
</author>
<published>2021-05-03T11:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4c9d1882ca249cae8babdff1ed0f4ca13943b484'/>
<id>4c9d1882ca249cae8babdff1ed0f4ca13943b484</id>
<content type='text'>
In 13.0 and above, when looking at a quiz that was completed while not published, it would incorrectly show 2 XP awarded, when 0 XP should be awarded.
With this commit, we show instead the correct 0 XP awarded.
opw-2480343

closes odoo/odoo#70333

X-original-commit: 26f047633b919bd8f2a260305bfd80e15bf259b6
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 13.0 and above, when looking at a quiz that was completed while not published, it would incorrectly show 2 XP awarded, when 0 XP should be awarded.
With this commit, we show instead the correct 0 XP awarded.
opw-2480343

closes odoo/odoo#70333

X-original-commit: 26f047633b919bd8f2a260305bfd80e15bf259b6
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: send notification mail with right access link when using mail.thread</title>
<updated>2021-01-06T17:03:53+00:00</updated>
<author>
<name>Achraf (abz)</name>
<email>abz@odoo.com</email>
</author>
<published>2020-10-23T06:47:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=79f27f640ccdd14f285a9dd9fc0ae770c992376f'/>
<id>79f27f640ccdd14f285a9dd9fc0ae770c992376f</id>
<content type='text'>
PURPOSE

Notification may be sent using a generic mail.thread record, notably when
sending user notifications. In that case links to view document are
incorrect.

HOW TO REPRODUCE

Issue

    - Install "Approvals"
    - Submit new approval with you as "Request Owner"
    - Click on "View Approval Request" in your mailbox

    The link redirects to a 505 error

Cause

    The model is not the correct one and the res_id is undefined

Solution

    Specify the model and the res_id to _notify_get_action_link
    when creating the link with kwargs

SPECIFICATIONS

Propagate message value through various notification sub methods. That way
we can rely on them if model seems void.

Also limit values given as URL parameters to some white listed values.

LINKS

opw-2358846
Task ID-2379766
Followup of odoo/odoo#60998
Followup of odoo/odoo#61545
Closes odoo/odoo#63292
Closes odoo/enterprise#15585

closes odoo/odoo#64170

X-original-commit: 2b6d2b71f6c60bcf64db440473c88d1dc335acbf
Related: odoo/enterprise#15588
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
Co-authored-by: Achraf Ben Azzouz &lt;abz@odoo.com&gt;
Co-authored-by: Thibault Delavallée &lt;tde@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Notification may be sent using a generic mail.thread record, notably when
sending user notifications. In that case links to view document are
incorrect.

HOW TO REPRODUCE

Issue

    - Install "Approvals"
    - Submit new approval with you as "Request Owner"
    - Click on "View Approval Request" in your mailbox

    The link redirects to a 505 error

Cause

    The model is not the correct one and the res_id is undefined

Solution

    Specify the model and the res_id to _notify_get_action_link
    when creating the link with kwargs

SPECIFICATIONS

Propagate message value through various notification sub methods. That way
we can rely on them if model seems void.

Also limit values given as URL parameters to some white listed values.

LINKS

opw-2358846
Task ID-2379766
Followup of odoo/odoo#60998
Followup of odoo/odoo#61545
Closes odoo/odoo#63292
Closes odoo/enterprise#15585

closes odoo/odoo#64170

X-original-commit: 2b6d2b71f6c60bcf64db440473c88d1dc335acbf
Related: odoo/enterprise#15588
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
Co-authored-by: Achraf Ben Azzouz &lt;abz@odoo.com&gt;
Co-authored-by: Thibault Delavallée &lt;tde@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_slides: fix quiz karma won</title>
<updated>2020-11-27T07:02:45+00:00</updated>
<author>
<name>Anh Thao Pham (pta)</name>
<email>pta@odoo.com</email>
</author>
<published>2020-11-26T14:30:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d8254c130d4b04a0f1ff80990fe28e795bf9ad51'/>
<id>d8254c130d4b04a0f1ff80990fe28e795bf9ad51</id>
<content type='text'>
- Install website_slides
- Connect with an user (i.e. Mitchell Admin)
- Go to Website and open a Course quiz for the first time
(i.e. "Test Yourself" from "Basics of Furniture Creation" Course)
- Answer correctly
The number of won karma is the one from the last attempt reward and is not saved
in user's total xp.

When submitting the quiz, quiz_attempts_count is incremented via a SQL query,
but its value is not updated in cache directly.
When the karma gain is computed from the attempts count, the value used is the
old one in cache.

opw-2389969

closes odoo/odoo#62421

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>
- Install website_slides
- Connect with an user (i.e. Mitchell Admin)
- Go to Website and open a Course quiz for the first time
(i.e. "Test Yourself" from "Basics of Furniture Creation" Course)
- Answer correctly
The number of won karma is the one from the last attempt reward and is not saved
in user's total xp.

When submitting the quiz, quiz_attempts_count is incremented via a SQL query,
but its value is not updated in cache directly.
When the karma gain is computed from the attempts count, the value used is the
old one in cache.

opw-2389969

closes odoo/odoo#62421

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_slides: embed YouTube videos without cookies</title>
<updated>2020-11-17T09:30:15+00:00</updated>
<author>
<name>Jairo Llopis</name>
<email>jairo.llopis@tecnativa.com</email>
</author>
<published>2020-11-10T12:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bf4683632dd47f5114224f3e40b4afecd276e801'/>
<id>bf4683632dd47f5114224f3e40b4afecd276e801</id>
<content type='text'>
Due to recent legal changes in EU, you cannot install tracking cookies in a user's browser without explicit consent.

Before this patch, Odoo embedded youtube videos were violating that law (AFAIK &amp; IANAL).

With this simple patch, you benefit from YouTube's offering to embed videos without cookies. The UI remains the same, but no tracking is done.

@Tecnativa TT26153

closes odoo/odoo#61824

X-original-commit: a1a1169f28233b69cd70d01621d605b36517ac73
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to recent legal changes in EU, you cannot install tracking cookies in a user's browser without explicit consent.

Before this patch, Odoo embedded youtube videos were violating that law (AFAIK &amp; IANAL).

With this simple patch, you benefit from YouTube's offering to embed videos without cookies. The UI remains the same, but no tracking is done.

@Tecnativa TT26153

closes odoo/odoo#61824

X-original-commit: a1a1169f28233b69cd70d01621d605b36517ac73
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: correct typos and bad English</title>
<updated>2020-10-29T18:07:49+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-10-29T15:51:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=62a18bdb372e234107fd2099a2df5f9e3a442c96'/>
<id>62a18bdb372e234107fd2099a2df5f9e3a442c96</id>
<content type='text'>
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61002

Related: odoo/enterprise#14485
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61002

Related: odoo/enterprise#14485
Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] tools.sql, website_*: increment counter with skip lock</title>
<updated>2020-09-28T13:38:28+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-09-25T15:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d92e61e89f468c2db2fbd68b2f0d6b36c77f1065'/>
<id>d92e61e89f468c2db2fbd68b2f0d6b36c77f1065</id>
<content type='text'>
*blog, forum, slides

Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion

Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.

The method return boolean if at least 1 record has been incremented.

closes odoo/odoo#58534

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>
*blog, forum, slides

Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion

Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.

The method return boolean if at least 1 record has been incremented.

closes odoo/odoo#58534

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_{slides,forum}: enable slide content and forum creation</title>
<updated>2020-08-26T10:09:45+00:00</updated>
<author>
<name>Dharmraj Jhala</name>
<email>dja@odoo.com</email>
</author>
<published>2020-08-26T10:00:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a677859a03c86bf6ac791c31f52ce8609bcba594'/>
<id>a677859a03c86bf6ac791c31f52ce8609bcba594</id>
<content type='text'>
Since a recent refactoring[1] is merged, few compute methods are being
called at record creation, and throws traceback because of newID.

This commit fixes the traceback by improving the compute methods and
thus enable users to create records of slide contents and forums.
Note - compute fields should be assigned a value, and so we update
the recordset with default values while creation. See below PR for
more information.

[1] - https://github.com/odoo/odoo/pull/55995

Task - 2325605

closes odoo/odoo#56573

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>
Since a recent refactoring[1] is merged, few compute methods are being
called at record creation, and throws traceback because of newID.

This commit fixes the traceback by improving the compute methods and
thus enable users to create records of slide contents and forums.
Note - compute fields should be assigned a value, and so we update
the recordset with default values while creation. See below PR for
more information.

[1] - https://github.com/odoo/odoo/pull/55995

Task - 2325605

closes odoo/odoo#56573

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] various: improve code style and performance by improve ``all()`` usage</title>
<updated>2020-08-31T11:45:43+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-08-18T12:26:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1cc6bb1231401ea7f501d2f5b5e9641ec8734850'/>
<id>1cc6bb1231401ea7f501d2f5b5e9641ec8734850</id>
<content type='text'>
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --&gt; any(not) for earlier returns;
  * all([generator]) --&gt; all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56060

Related: odoo/enterprise#12486
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --&gt; any(not) for earlier returns;
  * all([generator]) --&gt; all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56060

Related: odoo/enterprise#12486
Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] website_slides: improve archive management</title>
<updated>2020-08-12T10:26:55+00:00</updated>
<author>
<name>Didier</name>
<email>did@odoo.com</email>
</author>
<published>2020-04-29T08:31:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d761a73ad005b537354271396ba088c3fcfffceb'/>
<id>d761a73ad005b537354271396ba088c3fcfffceb</id>
<content type='text'>
PURPOSE

Archiving a course should also archive its content, and unpublish it as it
should not be accessible from outside. Improve archive / publish management
between a course and its slides.

SPECIFICATIONS

Show the content of an archived course having archived slides. When slides and
course are archived its content should still be displayed. This is done using
an active test in context of field.

Propagate channel archive to content. Also unpublish archived slides.

LINKS

Continuity/IMP of task-2170708
Task-2225598

closes odoo/odoo#52233

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Archiving a course should also archive its content, and unpublish it as it
should not be accessible from outside. Improve archive / publish management
between a course and its slides.

SPECIFICATIONS

Show the content of an archived course having archived slides. When slides and
course are archived its content should still be displayed. This is done using
an active test in context of field.

Propagate channel archive to content. Also unpublish archived slides.

LINKS

Continuity/IMP of task-2170708
Task-2225598

closes odoo/odoo#52233

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
