<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mass_mailing/models/mailing_list.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] mass_mailing: correctly update list subscriptions when updating contacts</title>
<updated>2021-05-21T16:07:07+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-05-21T09:26:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=11ffeddf23f6e40012e4a4a664d48193ec134ce3'/>
<id>11ffeddf23f6e40012e4a4a664d48193ec134ce3</id>
<content type='text'>
There is a missing depends on subscription_ids fields, meaning it is not
correctly refreshed when contacts are updated. When dealing with m2m using
the o2m model as relational table, depends have to be specified on field
itself to allow recomputing the fields.

Task ID-2431217
COM PR odoo/odoo#71140</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a missing depends on subscription_ids fields, meaning it is not
correctly refreshed when contacts are updated. When dealing with m2m using
the o2m model as relational table, depends have to be specified on field
itself to allow recomputing the fields.

Task ID-2431217
COM PR odoo/odoo#71140</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mass_mailing: show correct recipient count in merge wizard</title>
<updated>2021-04-21T10:20:00+00:00</updated>
<author>
<name>Dharmraj Jhala</name>
<email>dja@odoo.com</email>
</author>
<published>2021-04-02T07:22:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9ac6b921c7e1918a229aeeef97890f19deac1d37'/>
<id>9ac6b921c7e1918a229aeeef97890f19deac1d37</id>
<content type='text'>
Right now, when o2m/m2m are set from default_get from web client,
the compute methods from the records being set yield `NewId` when
we try to get ID for the record, even if the records are existing.
It can result into wrong computation when the ids of the records
are used in preparing the data.

The same thing happens in the wizard that is used to merge mailing
lists. When we select multiple mailing lists and open the wizard
to merge them, they are set in the `src_list_ids` of wizard, but
number of recipients are always zero for them, because the method
that computes `contact_nbr` (recipients) on mailing lists fetches
data from the query, but we can't match (or find) the stats from
query result because we don't get the actual ID in recordset for
existing records.

This commit fixes the behavior by using `_origin` on the records
while finding data in the compute method, and thus getting the
correct recipient count.

Task ID-2471692
COM odoo/odoo#67213

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now, when o2m/m2m are set from default_get from web client,
the compute methods from the records being set yield `NewId` when
we try to get ID for the record, even if the records are existing.
It can result into wrong computation when the ids of the records
are used in preparing the data.

The same thing happens in the wizard that is used to merge mailing
lists. When we select multiple mailing lists and open the wizard
to merge them, they are set in the `src_list_ids` of wizard, but
number of recipients are always zero for them, because the method
that computes `contact_nbr` (recipients) on mailing lists fetches
data from the query, but we can't match (or find) the stats from
query result because we don't get the actual ID in recordset for
existing records.

This commit fixes the behavior by using `_origin` on the records
while finding data in the compute method, and thus getting the
correct recipient count.

Task ID-2471692
COM odoo/odoo#67213

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mass_mailing_sms : traceback on create contact list</title>
<updated>2020-09-28T09:59:55+00:00</updated>
<author>
<name>Mariska Archielli (ram)</name>
<email>ram@odoo.com</email>
</author>
<published>2020-09-28T08:27:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=31f2bb5e494965d31f5e49d47908fd4b5eb64077'/>
<id>31f2bb5e494965d31f5e49d47908fd4b5eb64077</id>
<content type='text'>
Fix traceback when creating a new contact by checking the id list is not empty.

Task ID : 2302578

closes odoo/odoo#58555

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix traceback when creating a new contact by checking the id list is not empty.

Task ID : 2302578

closes odoo/odoo#58555

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: adapt action content retrieval</title>
<updated>2020-08-17T09:09:02+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2020-05-25T07:04:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6156f98288b16f6c84d36bacf16d5a66a661abb3'/>
<id>6156f98288b16f6c84d36bacf16d5a66a661abb3</id>
<content type='text'>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mail, mass_mailing, phone, survey: call toggle_active / action_(un)archive when possible</title>
<updated>2020-04-03T12:59:28+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-02-28T13:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=bea9bc3d6c51bfc1c4eaad2378caba83b7a5142a'/>
<id>bea9bc3d6c51bfc1c4eaad2378caba83b7a5142a</id>
<content type='text'>
Purpose of this commit is to call toggle_active or archive / unarchive methods
instead of manually writing on active field. Indeed this allows to trigger
business code related to archive / unarchive which is normally located
in toggle_archive (called by action_archive and action_unarchive).

Task ID 2170708
Community PR odoo/odoo#46563</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose of this commit is to call toggle_active or archive / unarchive methods
instead of manually writing on active field. Indeed this allows to trigger
business code related to archive / unarchive which is normally located
in toggle_archive (called by action_archive and action_unarchive).

Task ID 2170708
Community PR odoo/odoo#46563</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mass_mailing: remove inactive lists from mass mailing</title>
<updated>2020-03-06T14:27:02+00:00</updated>
<author>
<name>jvm-odoo</name>
<email>jvm@odoo.com</email>
</author>
<published>2020-03-02T07:46:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1a7e0fb01bb8669fe20b832b467f2c24fb0c25f3'/>
<id>1a7e0fb01bb8669fe20b832b467f2c24fb0c25f3</id>
<content type='text'>
Issue

	- Install Mass Mailing
	- Create 2 mailing list (x &amp; y) with differents
	  contacts
	- Create a mass mailing with x &amp; y, send it

	Ok, sent to everyome

	- Archive mailing list y
	- Duplicate the last mass mailing, send it

	Not ok, sent to y contacts too

	When a list is archived, I can't manually
	remove it from the mass mailing (it disappears)

Cause

	When archiving a list, it still remains in
	contact_list_ids

Solution

	Prevent archiving a mailing list if any mass mailing
	using it exist with state != 'done'

	Re-evaluate the domain field at copy

OPW-2202111

closes odoo/odoo#47094

X-original-commit: 4346f1da7a26a11f49c8e76f6ed8d6d6078a1d8a
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue

	- Install Mass Mailing
	- Create 2 mailing list (x &amp; y) with differents
	  contacts
	- Create a mass mailing with x &amp; y, send it

	Ok, sent to everyome

	- Archive mailing list y
	- Duplicate the last mass mailing, send it

	Not ok, sent to y contacts too

	When a list is archived, I can't manually
	remove it from the mass mailing (it disappears)

Cause

	When archiving a list, it still remains in
	contact_list_ids

Solution

	Prevent archiving a mailing list if any mass mailing
	using it exist with state != 'done'

	Re-evaluate the domain field at copy

OPW-2202111

closes odoo/odoo#47094

X-original-commit: 4346f1da7a26a11f49c8e76f6ed8d6d6078a1d8a
Signed-off-by: Jason Van Malder (jvm) &lt;jvm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] models: ORM speedup</title>
<updated>2019-08-20T12:43:59+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-08-14T07:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9920f20e4c7753bc17bea71dea3a90f7de687196'/>
<id>9920f20e4c7753bc17bea71dea3a90f7de687196</id>
<content type='text'>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mass_mailing: prepare mass_sms</title>
<updated>2019-08-12T12:00:22+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-07-26T14:33:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c7a14e9109ff81611b77b91ae1910a2f2e9b576e'/>
<id>c7a14e9109ff81611b77b91ae1910a2f2e9b576e</id>
<content type='text'>
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Prepare mass mailing module to addition of mass_mailing_sms.

Mailing model: mailing type
  * add a mailing_type selection field;
  * mass mailing contains only 'mail';
  * synchronize medium accordingly;
  * update actions of mass mailing application to add a domain on mailing
    type being 'mail';

Mailing contact
  * remove is_email_valid field as its purpose is achieved by email_normalized
    field coming from address mixin (added by blacklist management);

Mailing contact subscription
  * clean a bit fields and views as this should stay a technical model;

Trace model and report: trace type
  * add a trace_type selection field;
  * mass mailing contains only 'mail';

Various
  * clean some bits of code in views, remove old code bits;
  * add anchors to ease view inheritance to be able to customize views for
    SMS mailings;
  * ensure all views in mass mailing filter content on mail type (mailing
    and traces being type mail only);
  * rename some methods to be more updated with current guidelines, notably
    main action methods;

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Prepare mass mailing module to addition of mass_mailing_sms.

Mailing model: mailing type
  * add a mailing_type selection field;
  * mass mailing contains only 'mail';
  * synchronize medium accordingly;
  * update actions of mass mailing application to add a domain on mailing
    type being 'mail';

Mailing contact
  * remove is_email_valid field as its purpose is achieved by email_normalized
    field coming from address mixin (added by blacklist management);

Mailing contact subscription
  * clean a bit fields and views as this should stay a technical model;

Trace model and report: trace type
  * add a trace_type selection field;
  * mass mailing contains only 'mail';

Various
  * clean some bits of code in views, remove old code bits;
  * add anchors to ease view inheritance to be able to customize views for
    SMS mailings;
  * ensure all views in mass mailing filter content on mail type (mailing
    and traces being type mail only);
  * rename some methods to be more updated with current guidelines, notably
    main action methods;

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mass_mailing: rename mail.mass_mailing.{.contact{_rel}, list{.merge}} models</title>
<updated>2019-07-17T15:50:33+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-07-17T10:58:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=772e1c0cc4e75cec971d2b4e1c820eb54872dc93'/>
<id>772e1c0cc4e75cec971d2b4e1c820eb54872dc93</id>
<content type='text'>
PURPOSE

Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.

SPECIFICATIONS

Rename mail.mass_mailing.list and mail.mass_mailing.list to mailing.list
and mailing.list.merge. Rename mail.mass_mailing.contact to mailing.contact.
Rename mail.mailing_list.list_contact_rel to mailing.contact.subscription.
Rationale :

  * those new names are easier to understand: mailing.list and mailing.contact
    are less mail-related, especially taking into account that SMS will allow
    to be less mail-oriented;
  * those names are easier to read / find / understand;
  * align wizard and sub-models naming with the main naming;
  * have a mailing as first part of namespacing;

MIGRATION

mail.mass_mailing.list model -&gt; mailing.list
mail.mass_mailing.list.merge model -&gt; mailing.list.merge
mail.mass_mailing.contact model -&gt; mailing.contact
mail.mass_mailing.list_contact_rel model -&gt; mailing.contact.subscription
mail_mass_mailing_contact_list_rel table -&gt; mailing_contact_list_rel (specific
case of a decorated m2m)

fields updated (no column change)
  * mailing.list: subscription_contact_ids -&gt; subscription_ids

LINKS

Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.

SPECIFICATIONS

Rename mail.mass_mailing.list and mail.mass_mailing.list to mailing.list
and mailing.list.merge. Rename mail.mass_mailing.contact to mailing.contact.
Rename mail.mailing_list.list_contact_rel to mailing.contact.subscription.
Rationale :

  * those new names are easier to understand: mailing.list and mailing.contact
    are less mail-related, especially taking into account that SMS will allow
    to be less mail-oriented;
  * those names are easier to read / find / understand;
  * align wizard and sub-models naming with the main naming;
  * have a mailing as first part of namespacing;

MIGRATION

mail.mass_mailing.list model -&gt; mailing.list
mail.mass_mailing.list.merge model -&gt; mailing.list.merge
mail.mass_mailing.contact model -&gt; mailing.contact
mail.mass_mailing.list_contact_rel model -&gt; mailing.contact.subscription
mail_mass_mailing_contact_list_rel table -&gt; mailing_contact_list_rel (specific
case of a decorated m2m)

fields updated (no column change)
  * mailing.list: subscription_contact_ids -&gt; subscription_ids

LINKS

Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938</pre>
</div>
</content>
</entry>
</feed>
