Commit Graph

11 Commits (4cf4e09d1cc56cdfd68f1df030a91134d245b4ee)

Author SHA1 Message Date
Víctor Martínez 7f3a3d6984 [FIX] mass_mailing_list_dynamic: Prevent ValidationError when merge contacts wizard related to dynamic and full sync list 2021-03-17 11:51:16 +01:00
Pedro M. Baeza 4d1bc89cf8 [FIX] mass_mailing_list_dynamic: Detect rough cases for contact modifications
Followup of 11067ea9cf

There are 2 cases that breaks the validation:

- If you write list_ids through dot notation, the ORM converts always to command
  [(6, 0, <full_list_of_ids>)], so the validation fails, as it checks lists that
  have not been modified. Now the diff is done for not having false positives.
- The constraint is being triggered even if there's no real change on the affected
  fields. We move the check to the existing create/method code for checking there
  real changes.

TT25002
2020-08-01 12:01:10 +02:00
OCA-git-bot 5d133836fa Merge PR #585 into 12.0
Signed-off-by rafaelbn
2020-07-30 05:56:37 +00:00
Pedro M. Baeza 11067ea9cf [FIX] mass_mailing_list_dynamic: Avoid error on shared contacts
- Create a contact with tag "X"
- Create a dynamic mailing list fully sync with criteria for tag "X".
- Sync it.
- Create a second mailing list non dynamic.
- Try to add the contact to second mailing list.

You get an error in this case, and it shouldn't happen.
2020-07-29 21:18:49 +02:00
david b3cfd62848 [FIX] mass_mailing_list_dynamic: list sync on send
- We change the method to hook on (it wasn't correctly overriden anyway)
to ensure the list is resynced even if no recipients are left. For
example: we create a dynamic list with a domain expecting it to sync in
the first mass_mailing. It wouldn't sync as Odoo dismisses the mailing
considering no recipients are left thus it wouldn't get into the
`send_mail` method.
2020-07-16 11:50:33 +02:00
ernesto b9eeff7ac7 [MIG] mass_mailing_list_dynamic: Fix contact synchronization 2019-08-16 16:02:25 +02:00
Victor Martin 1776230992 [MIG] mass_mailing_list_dynamic: Migration to 12.0 2019-08-16 12:15:10 +02:00
David e42d13490b [IMP] mass_mailing_list_dynamic: make user aware of list change
- Adds is_synced field to track whether a dynamic list has unsynced
changes or not so the user is aware that the definitive number of
contacts is yet to be determined.
- It fixes an issue that made impossible deleting a res.partner filter
when a list had use it to filter contacts.
- It also shows only the filters available for the user (shared and
belonging to self).
2019-08-16 12:15:10 +02:00
David 3edb0ec21c [FIX] mass_mailing_list_dynamic: Reversible dynamic list 2019-08-16 12:15:10 +02:00
Pedro M. Baeza fb76420bff [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... (#211)
* [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters...

* Brand new icon
* Added feature of loading an existing filter as criteria
* Tests as SavepointCase for optimizing times
* Tests in post-install for avoiding errors on res.partner not null constraints
  when several modules added them.
* Updated documentation.
* Fix mock in test for not commiting test data.

* [FIX] mass_mailing_list_dynamic: Wasn't able to create contacts in fully synced lists

Syncing context was being set in the wrong object. Added to test too.

* [FIX] mass_mailing_list_dynamic: Allow to write back vals from res.partner

Module mass_mailing_partner writes back certain values from partner to
mass_mailing_contact. Module should allow that write operation.
2019-08-16 12:15:10 +02:00
Jairo Llopis ccc693d67b [ADD] mass_mailing_list_dynamic: Autopopulated mailing lists 2019-08-16 12:15:10 +02:00