<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/event/tests/test_event_flow.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>[IMP] event_sale: add some tests for registration update</title>
<updated>2020-05-18T11:58:06+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-05-15T12:10:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=83a7fb5f9215c5cebcca547e62bb06fde716b05f'/>
<id>83a7fb5f9215c5cebcca547e62bb06fde716b05f</id>
<content type='text'>
In this commit we add some tests related to sale order / event registrations
synchronization, notably

  * registrations automatically created when _update_registrations of an SO
    line is called, for example at SO confirmation;
  * using the registration editor;

LINKS

Task ID 2258685
Prepare Task ID 2166679 (create leads from registrations)
PR odoo/odoo#51341</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this commit we add some tests related to sale order / event registrations
synchronization, notably

  * registrations automatically created when _update_registrations of an SO
    line is called, for example at SO confirmation;
  * using the registration editor;

LINKS

Task ID 2258685
Prepare Task ID 2166679 (create leads from registrations)
PR odoo/odoo#51341</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] (website_)event(_sale): change seats_availability field to seats_limited</title>
<updated>2020-03-31T06:34:45+00:00</updated>
<author>
<name>Patrick Hoste</name>
<email>pko@odoo.com</email>
</author>
<published>2020-01-10T15:08:41+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d2e02976e2934274cdc7a37616713ba6166ca1b7'/>
<id>d2e02976e2934274cdc7a37616713ba6166ca1b7</id>
<content type='text'>
PURPOSE

Change seats_availability selection field into a boolean field
and rename it to seats_limited for consistency.

SPECIFICATION

Change all the tests accordingly.

Task ID : 2198660
PR : #46659</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Change seats_availability selection field into a boolean field
and rename it to seats_limited for consistency.

SPECIFICATION

Change all the tests accordingly.

Task ID : 2198660
PR : #46659</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] event: set an explicit onchange on partner_id of registration</title>
<updated>2020-03-10T11:15:09+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-02-27T10:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c6003af73409e2cd124f641fb7714fefa9dc8b01'/>
<id>c6003af73409e2cd124f641fb7714fefa9dc8b01</id>
<content type='text'>
RATIONALE

Manual onchange is necessary because you spot an issue (or customer complains).
Automatic update through computed feild is only there to try to add missing
pieces of information but cannot decide which is the correct field value to keep.

SPECIFICATIONS

Keep an explicit onchange on partner_id. Rationale : if user explicitly
changes the partner in interface, he wants to update the whole customer
information. If partner_id is updated in code (e.g. updating your personal
information after registeration in website_event_sale) fields with a value
should not be reset as we do not know which one is the correct one.

How it should behave as following

  * computed fields based on partner_id should only update missing
    information. Indeed automated code cannot decide which information
    is more accurate;
  * interface should allow to update all customer related information
    at once. We consider event users really want to update all fields

Tests are added to ensure behavior is not modified without notice.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RATIONALE

Manual onchange is necessary because you spot an issue (or customer complains).
Automatic update through computed feild is only there to try to add missing
pieces of information but cannot decide which is the correct field value to keep.

SPECIFICATIONS

Keep an explicit onchange on partner_id. Rationale : if user explicitly
changes the partner in interface, he wants to update the whole customer
information. If partner_id is updated in code (e.g. updating your personal
information after registeration in website_event_sale) fields with a value
should not be reset as we do not know which one is the correct one.

How it should behave as following

  * computed fields based on partner_id should only update missing
    information. Indeed automated code cannot decide which information
    is more accurate;
  * interface should allow to update all customer related information
    at once. We consider event users really want to update all fields

Tests are added to ensure behavior is not modified without notice.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] event : move from onchange / default to stored editable computed fields</title>
<updated>2020-03-10T11:15:09+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-02-19T14:40:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5e4efef3ca3f2e9f02ec40c746c0d43aa3e97b79'/>
<id>5e4efef3ca3f2e9f02ec40c746c0d43aa3e97b79</id>
<content type='text'>
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS: GLOBAL RULES

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: REQUIRED FIELDS

As computed fields are computed after create required attribute cannot be
respected without computing them beforehand. That is why we have some custom
code to compute required fields if not given at create and update the creation
values accordingly.

SPECIFICATIONS: MAIL SCHEDULING

Mail scheduling on event type is modified in this commit. Previously checking
the use_mail_schedule radio button had no effect on event_type_mail_ids field.
It is now reset if unchecked. It is therefore coherent with use_ticket and
event_type_ticket_ids field behavior.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911

Co-Authored-By: Thibault Delavallée &lt;tde@odoo.com&gt;
Co-Authored-By: Michaël Mattiello &lt;mcm@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS: GLOBAL RULES

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: REQUIRED FIELDS

As computed fields are computed after create required attribute cannot be
respected without computing them beforehand. That is why we have some custom
code to compute required fields if not given at create and update the creation
values accordingly.

SPECIFICATIONS: MAIL SCHEDULING

Mail scheduling on event type is modified in this commit. Previously checking
the use_mail_schedule radio button had no effect on event_type_mail_ids field.
It is now reset if unchecked. It is therefore coherent with use_ticket and
event_type_ticket_ids field behavior.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911

Co-Authored-By: Thibault Delavallée &lt;tde@odoo.com&gt;
Co-Authored-By: Michaël Mattiello &lt;mcm@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] event(_sale): improve attendees integration</title>
<updated>2020-01-28T09:14:43+00:00</updated>
<author>
<name>Stéphane Debauche</name>
<email>std@odoo.com</email>
</author>
<published>2020-01-27T13:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1296681cbdd92f789a8d0df2abc66bbe4d1075ec'/>
<id>1296681cbdd92f789a8d0df2abc66bbe4d1075ec</id>
<content type='text'>
Purpose
=======

Improve the attendees management: improve views, actions,  (views, actions).

Specifications
==============

In order to allow state management in batch, state field is made editable in
multi edit mode of registrations. That way event managers are able to work in
batch. It required to move some code currently called in custom action-called
methods directly in write. It makes sense to consider that some required code
is called by writing on state field instead of depending on calling the right
method. Indeed there is not much "business" code to move: calling mail
schedulers on confirmation, and putting the closing date when closing.

Event and registration tree views are improved, some fields are now editable
in multi edit mode.

When a user register on a event from website, it will create a sale order and
a partner (the customer of the SO). Set automatically the partner of the
registration to the partner of the sale order.

Task ID 2119333
PR #40949</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======

Improve the attendees management: improve views, actions,  (views, actions).

Specifications
==============

In order to allow state management in batch, state field is made editable in
multi edit mode of registrations. That way event managers are able to work in
batch. It required to move some code currently called in custom action-called
methods directly in write. It makes sense to consider that some required code
is called by writing on state field instead of depending on calling the right
method. Indeed there is not much "business" code to move: calling mail
schedulers on confirmation, and putting the closing date when closing.

Event and registration tree views are improved, some fields are now editable
in multi edit mode.

When a user register on a event from website, it will create a sale order and
a partner (the customer of the SO). Set automatically the partner of the
registration to the partner of the sale order.

Task ID 2119333
PR #40949</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] (website_)event(_sale/_question/_track): clean and improve tests</title>
<updated>2020-01-10T13:24:25+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-01-08T13:34:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=5ee901dcb1dc6cfb0f7642b64e676a4124350b6a'/>
<id>5ee901dcb1dc6cfb0f7642b64e676a4124350b6a</id>
<content type='text'>
PURPOSE

As event will soon evolve (onchange -&gt; compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.

SPECIFICATIONS

Clean existing tests: lessen data / variables, try to remove unnecessary
tests or merge duplicates.

Add new tests, notably event type configuration copy onto event records
is not well tested. Event computed fields are also more tested.

Some access tests are added, more a base for future addition as only a few
use cases are covered.

LINKS

Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

As event will soon evolve (onchange -&gt; compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.

SPECIFICATIONS

Clean existing tests: lessen data / variables, try to remove unnecessary
tests or merge duplicates.

Add new tests, notably event type configuration copy onto event records
is not well tested. Event computed fields are also more tested.

Some access tests are added, more a base for future addition as only a few
use cases are covered.

LINKS

Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] event: replace state by kanban stage</title>
<updated>2020-01-08T09:11:50+00:00</updated>
<author>
<name>Debauche Stéphane</name>
<email>std@odoo.com</email>
</author>
<published>2019-10-23T11:04:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=412ff994f1120457c912aad487265e3de8a9f35a'/>
<id>412ff994f1120457c912aad487265e3de8a9f35a</id>
<content type='text'>
Purpose
=======
Remove the state on the event and add a stage.
So, we can have more control on the event flow, and we will have less constrains.

Website event
=============
Before
------
People can register for an event if "seats are available" and if the state is "confirmed".

After
-----
People can register for an event if `event_registrations_open` is True,
- Event: seats are available and the event is not finished
- Event sale:  One or more ticket has `sale_available` set to True

Task #2088538</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose
=======
Remove the state on the event and add a stage.
So, we can have more control on the event flow, and we will have less constrains.

Website event
=============
Before
------
People can register for an event if "seats are available" and if the state is "confirmed".

After
-----
People can register for an event if `event_registrations_open` is True,
- Event: seats are available and the event is not finished
- Event sale:  One or more ticket has `sale_available` set to True

Task #2088538</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] event, website_event: timezone timestamp to compute one day</title>
<updated>2019-10-18T19:41:14+00:00</updated>
<author>
<name>Lucas Perais (lpe)</name>
<email>lpe@odoo.com</email>
</author>
<published>2019-10-18T12:27:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bdc8e948d6992fcacaac69de89449ad7e08f0d35'/>
<id>bdc8e948d6992fcacaac69de89449ad7e08f0d35</id>
<content type='text'>
Have an event in Mexico timezone
As a begin date, choose something in the morning
As a end date, choose 18:00 in that timezone (or later)
in the same day
The end date will be written as the day after at 00:00 in UTC

Before this commit, the event was considered taking more than one day
Also, the rendering on the website took the wrong widget, and did not
transform the UTC dates into their TZ value

After this commit, the event is considered taking place in the same day
The rendering on the website is correct

OPW 2087828

closes odoo/odoo#39060

X-original-commit: 4514ff30e9cc218474dda4519e36cfc983e49fc8
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have an event in Mexico timezone
As a begin date, choose something in the morning
As a end date, choose 18:00 in that timezone (or later)
in the same day
The end date will be written as the day after at 00:00 in UTC

Before this commit, the event was considered taking more than one day
Also, the rendering on the website took the wrong widget, and did not
transform the UTC dates into their TZ value

After this commit, the event is considered taking place in the same day
The rendering on the website is correct

OPW 2087828

closes odoo/odoo#39060

X-original-commit: 4514ff30e9cc218474dda4519e36cfc983e49fc8
Signed-off-by: Lucas Perais (lpe) &lt;lpe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] event: improve test class and data to help reusing them</title>
<updated>2019-07-25T11:45:08+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-07-18T10:43:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2e2fd3f8a74d30357d9079cf5cccb0d27d5bf4dd'/>
<id>2e2fd3f8a74d30357d9079cf5cccb0d27d5bf4dd</id>
<content type='text'>
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATIONS

In order to add tests this commit performs a quick cleaning of event common
class to speedup and prepare new tests.

Containing
  * move data creation in class and use savepoint;
  * move registration creation in its own method to allow calling it if
    necessary;
  * clean some unnecessary variables.

LINKS

Task 1922187
Part of PR #34705</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATIONS

In order to add tests this commit performs a quick cleaning of event common
class to speedup and prepare new tests.

Containing
  * move data creation in class and use savepoint;
  * move registration creation in its own method to allow calling it if
    necessary;
  * clean some unnecessary variables.

LINKS

Task 1922187
Part of PR #34705</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: sudo() -&gt; with_user()</title>
<updated>2019-07-04T11:32:22+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-06-17T09:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b7fd679a6c41dbb694c6fb2ce4911798de0424b1'/>
<id>b7fd679a6c41dbb694c6fb2ce4911798de0424b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
