summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/static/src/js
AgeCommit message (Collapse)Author
2021-01-28[FIX] mass_mailing: save error does not break inliningNicolas Lempereur
Scenario: - create mass mailing with icons and without title - save and get error "The followign fields are invalid: Subject" - fill subject and save - edit => the icons have disappeared This is because mass mailing widget is using: - a "body_html" field that contains inlined html - a wysiwyg editor to edit field "body_arch" - a textarea containing "body_arch" value to be saved When we save this happens: 1. we save the current value of wysiwyg into textarea 2. wysiwyg content is inlined (eg. transforming font in image) 3. inlined wysiwyg content is set to "body_html" field 4. if there: - is no error while saving => body_html and body_arch are saved and will be used on next edition - if there is an error the fields are not saved, and we now have an inlined content on wysiwyg, so next time we save the "body_arch" is going to be inlined: => this for example breaking the icons on edition Issue discovered when fixing opw-2447756 closes #65208 closes odoo/odoo#65217 X-original-commit: 0f5f53837bc403960e307ab85e9fe68423c23f5f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-28[FIX] mass_mailing, web_editor: send mail to outlook and keep image sizeNicolas Lempereur
Office Outlook doesn't take into account the [style] attribute, and it doesn't manage width/height in percent value. This commit set width/heigth attribute in pixels and also always set the width/height in style attribute (keeping them in the original unit and setting them to auto if not present). This is a reintroduction of 2015 commit bdf58adb465b opw-2447756 closes odoo/odoo#65212 X-original-commit: c51762a790d6fefd97e6c818bfaa9307180dd5b5 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-27[FIX] *: update tour sequenceMohammed Shekha
with this commit we are updating sequence of onboarding tours task-2444153 closes odoo/odoo#64846 Related: odoo/enterprise#15886 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-26[FIX] mass_mailing: disable the ability to save custom snippetsBenoit Socias
Before this commit saving a custom snippet inside an email template produced a "cross origin" error related to the combination of the save & reload mechanism with the fact that the email template editor is inside an iframe. After this commit saving a custom snippet inside an email template is not available anymore. Given that fixing the reload problem would be only temporary -while quite complex-, it has been decided to disable the feature until the editor allows for cleaning snippets without saving them. Decided during task-2374802 closes odoo/odoo#64922 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-10-19[FIX] mass_mailing: make better link dialog for mass mailingqsm-odoo
Primary and link buttons are "hacked" by mailing themes scss. We thus have to fix their preview if possible (as they are previewed as standard bootstrap while they actually have a different look depending on the mailing theme). Note: this commit is obviously a big hack which calls for lots of improvements in master. Part of https://github.com/odoo/odoo/pull/60203 opw-2360756 X-original-commit: 7bd7bc2513b72f5ffc006758c4bf4eb42ae6ed67
2020-10-19[FIX] mass_mailing, *: restore mass mailing optionsqsm-odoo
*: web_editor The snippet options which were specific to mass mailing were not loaded anymore as they were loaded outside of the iframe where the edition take places. Fortunately, the generic options were still working and are the most important. This bug was only revealed thanks to another bug fix which wanted to be done in the unloaded file. Note: this fix is a series of huge hack to make it possible and as safe as possible in stable versions. This obviously has to be refactored in master, if not already done. Part of https://github.com/odoo/odoo/pull/60203 X-original-commit: 7225ce6b862c4f6b99a97732833b43189530699a
2020-07-14[IMP] web_editor, *: review background color/image options UIqsm-odoo
*: website, mass_mailing, website_blog, doc Part of https://github.com/odoo/odoo/pull/53930 task-2157252
2020-06-05[IMP] web_editor, *: move image optimization feature to left-panelSamuel Degueldre
*: website, mass_mailing In continuity with the nline crop, in an effort to make the image workflow as seamless as possible in the website editor, the image optimization feature has been moved out of the modal which could be opened through the media-dialog and into the left panel. This commit adds a quality slider and a width selector, as well as a preview of the image's weight to the left panel, and removes the image_optimize dialog. This commit also introduces the possibility to add a color filter on images. Part of https://github.com/odoo/odoo/pull/51517 task-2192755 closes odoo/odoo#51517 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-29[IMP] mass_mailing: add email marketing tourJérémy Hennecart
PURPOSE Improve the Email Marketing tour and onboarding to create a "wow effect" when users test the app. SPECIFICATIONS Create a tour for mass_mailing to let user visit Odoo Email Marketing through a simple mailing creation flow. This require the following functional changes * by default, if user chooses to contact mailing lists and there is a single mailing list available, add it as default value for chosen list; * create a master mailing list data containing the admin user so that he can easily follow the tour and test the mailing application; LINKS Task ID 2194876 Community PR odoo/odoo#48259 Upgrade PR odoo/upgrade#983 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-18[FIX] mass_mailing: fix untranslated text on unsubscribe pageAnh Thao Pham (pta)
- Install Website and Email Marketing - Go to Settings - Click on "Manage Languages" and activate French - Click on "Activate and Translate" and check the websites to translate - Go to Preferences and set user language to "French" - Go to Website > Configuration > Settings and make sure that French is in the languages list and that it is default - Go to Email Marketing - Create a new mailing - Make sure that current user is in the Recipients list - Send the mailing (it will be scheduled) - In debug mode, go to Settings > Technical > Scheduled actions to run the action manually - Check the received mail and click on the "unsubscribe" link On the unsubscribe page there is text that is not translated. Some of the translations on this page is done in JS. But the translations are not available at that moment. The translations have to be loaded manually before letting the JS doing its work. opw-2251235 closes odoo/odoo#51485 X-original-commit: 72a5e2b273e5faeccf49c0ef3fbb9f470e1a1c71 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-30[FIX] mass_mailing: escape the mailing list namestd-odoo
Task-2241443 closes odoo/odoo#50502 X-original-commit: afa2153a24d495b863cd85febca3f96551d8cd56 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-05[FIX] mass_mailing: fix content not savedjvm-odoo
Issue - Install Email Marketing - Create/Edit one of them - Save Changes not saved - Click edit & save Changes saved Cause Before 30db768, the order of execution was: 1. field_html > commitChanges (value = <p><br></p>) 2. mass_mailing_widget > commitChanges (value = "test") After 30db768: 1. mass_mailing_widget > commitChanges (value = "test") 2. field_html > commitChanges (value = <p><br></p>) Solution Use this.saveCroppedImages in mass_mailing widget to add the delay there too OPW-2207107 OPW-2207817 closes odoo/odoo#47018 X-original-commit: 31e36fdc9b63fade99cef0c9ac4ed093b3936707 Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-27[FIX] mass_mailing, web_editor: edit font awesome icon with zoomNicolas Lempereur
In case of font-awesome icon when the browser is being zoomed, we can get a decimal font-size. There is a system that transform font-awesome in image links so they are readable in any email client (supporting image) but it did not take into account decimal font-size. With this changeset, we only send a integer font size: we do not try to get the original value because styling is relative on elements, a 90% zoom ratio could lead to a 98% font-awesome icon ratio. Also improve edition of font-awesome icon edition after first save by reverting the transformation to image on edit. Thanks to that, the original size will also be reinstated and will not depend on zoom on previous save. opw-2156069 closes #43949 closes odoo/odoo#44033 X-original-commit: fe72bf01b67ea20ddb74a5b05464c63cc77090ef Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-19[FIX] mass_mailing: fix unsaved changes in source mode editorJason Van Malder
Issue - Install Email Marketing - Create/Edit a template - Switch into source mode - Add things - Save Things not saved. Cause The widget override his parent `commitChanges` and don't take source mode into account. Solution Take source mode into account like: https://github.com/odoo/odoo/commit/e29c08969f6e7ad981e9b7b79027d84dc89fbca2#diff-59db103a74684967379b66a89695cfdeR102-R105 OPW-2151675 closes odoo/odoo#42193 X-original-commit: 14f55b8d95bbcaf2409342140ccad55a1cd1c2d7 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-01[FIX] mass_mailing: mail template become invisible after savingryv-odoo
Bug === In the mailing mailing form view, after saving the email and creating it, the body is invisible and one needs to edit and save again to see the content The view has two fields with the same name Fix === At the end, we have only one field and some condition on the attributes (class, widget) TASK_ID : 2078918 Co-authored-by: Stéphane Debauche <std@odoo.com>
2019-09-23[FIX] *: hide technical field widgets in non-debug mode (Studio)Juhil Somaiya
*: - account - barcodes - calenndar - hr_timesheet - mail - mass_mailing - partner_autocomplete - web - website_slides This commit removes description of fields that should not be shown in non-debug mode Studio. Only field widgets whose own description is set are displayed in non-debug mode Studio in "Widget" of sidebar. In other words, even if any ancestor has a description but not the current widget, it won't be displayed in the sidebar in non-debug mode. Task-Id 2056992 closes odoo/odoo#35902 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-09[IMP] web: edit translations in new dialogVincent Schippefilt
Before this commit, translations were edited in a list view with a filter on the field that needed to be translated. After this commit, the translations for each fields are translated in a dedicated dialog. The changes done to the current language are taken into account immediately, both ways, from the dialog to the form and from the form to the dialog. Translating terms is also available in create mode, the user will be prompted to save before editing a translation Task ID: 2028152 closes odoo/odoo#36185 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-08-28[IMP] web_editor, *: introduce and restore new web_editor UIqsm-odoo
* mass_mailing, note, website, website_blog, website_form, website_mass_mailing, website_sale This commit, unfortunately, mixes three things: - Restoring as much as possible the scss organisation to allow styling the web_editor UI properly. - Fixing some bugs like a border around the page once the editor is loaded, no ability to scroll the snippets, etc - Introducing a whole new UI for snippet options: a left panel instead of the old dropdown & button overlay. Note: this commit also do some linting and ES6 convertion even though some of it has been done in the parent commit. Note 2: some elements that were removed are still styled in the POS apps but this is because part of a feature was removed while leaving dead code behind, this is handled in another PR which is to be merged (https://github.com/odoo/odoo/pull/36136). Part of https://github.com/odoo/odoo/pull/36068 task-1942370 closes odoo/odoo#36068 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-22[REF] web_editor, mass_mailing: new iframe mechanismGorash
Since we reverted the saas-12.2 editor in favor of the 12.0 one, we faced a dilemna regarding how the editor iframe is handled in mass_mailing. The 12.0 version was using a special controller to get the website assets required for mass_mailing while the saas-12.2 version used a completely different mechanism that was, obviously, not handled by the 12.0 version. We did not want to reintroduce the old controllers who were considered to be a hack to load the assets in the mass_mailing iframe. However, we were very cautious about changing the editor itself to avoid introducing new bugs in the editor core of 13.0. The approach we chose at the end, is to use the loadAsset mechanism introduced in saas-12.2 to load the necessary assets and inject them in the mass_mailing iframe. This did not reintroduce the controllers nor did it require to change the code of the editor itself. However, it required moderate changes to the wysiwyg interface. Part of PR 35677. Co-authored-by: Nicolas Bayet <nby@odoo.com> Co-authored-by: Antoine Guenet <age@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-02[REF] utm,mass_mailing: replace mass mailing campaign by utm campaignqmo-odoo
PURPOSE This commit removes the mass_mailing.campaign model. Instead of having a fully fledged model, we will simply inherit utm.campaign. We will also add relevant statistics on utm campaign model in order to use it in various applications. SPECIFICATIONS This commit removes the mass_mailing.campaign model. Instead of having a fully fledged model, we will simply inherit utm.campaign. This change implies that mass_mailing.tag and mass_mailing.stage have to move to the utm model along their associated views/data. These changes were made so that campaigns could be used in the future by social, mass_mailing and mass_sms and available in the same view This commit also removes the source_id and the medium_id fields on the campaign. This commit also moves the unique_ab_testing field from the mass_mailing_campaign to the mass_mailing model Task ID: 2002029 PR: #34015
2019-07-17[REF] mass_mailing: rename mail.mass_mailing modelThibault Delavallée
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 model to mailing.mailing. Rationale : * mailing is now a prefix for mass mailing models; * mailing.mailing is easier to read / find / understand; Note that mail.mass_mailing.campaign is not updated as it is likely to be removed soon and replaced by simple utm.campaign model. MIGRATION mail.mass_mailing model -> mailing.mailing mail_mass_mailing table -> mailing_mailing LINKS Task ID 2037906 Preparing task ID 1997464 (SMS addition in mass mailing) PR #34938
2019-07-17[REF] mass_mailing: rename mail.mass_mailing.{.contact{_rel}, list{.merge}} ↵Thibault Delavallée
models 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 -> mailing.list mail.mass_mailing.list.merge model -> mailing.list.merge mail.mass_mailing.contact model -> mailing.contact mail.mass_mailing.list_contact_rel model -> mailing.contact.subscription mail_mass_mailing_contact_list_rel table -> mailing_contact_list_rel (specific case of a decorated m2m) fields updated (no column change) * mailing.list: subscription_contact_ids -> subscription_ids LINKS Task ID 2037906 Preparing task ID 1997464 (SMS addition in mass mailing) PR #34938
2019-07-12[MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6a1823Martin Trigaux
closes odoo/odoo#34820 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12[MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f625c9e7Martin Trigaux
closes odoo/odoo#34747 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10[MERGE] Forward port of 12.0 to saas-12.2 up to 3b1d00acda9358108Martin Trigaux
closes odoo/odoo#34732 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-08[FIX] mass_mailing: Proper translation stringJairo Llopis
Computed expressions cannot happen inside a translation string. closes odoo/odoo#34643 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-05[FIX]web_editor: Fixed traceback due to 'field_html' widget while saving recordmgh-odoo
Previously, when user edited record having 'field_html' widget and tried to save the record immediately, a traceback was faced sometimes because content was not loaded yet. This commit fixes the issue by calling super method if the content is not loaded yet properly. Task: #1932687 Closes: #30833 closes odoo/odoo#31581 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-06[REF] mass_mailing: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-18[FIX] *: various docstring formatting issuesXavier Morel
Would yield block quotes instead of code blocks or lists or whatnot.
2019-02-14[IMP] web_editor: lazy load the wysiwygChristophe Matthieu
Issue: wysiwyg asset slow down the loading of the website, error inadvertently introduced: https://github.com/odoo/odoo/pull/29775 The assets are now loaded assynchroneously, when the editor is needed, its assets will be loaded. closes odoo/odoo#30700
2019-02-25[FIX] mass_mailing: fix send email issue.Siddarth Gajjar
- while clicking on send now button in mass mailing app it throws error due to wysiwyg undefined. closes odoo/odoo#30533
2019-01-25[FIX] mass_mailing: restore email templatesSiddarth Gajjar
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775, the classes 'o_mail_wrapper' and 'o_mail_wrapper_td' were renamed to 'o_mailWrapper' and 'o_mailWrapper_td' because of what appears to be a JS-variable-search-replace fail. Strange enough, the scss was not impacted which allowed to see the bug in master. closes odoo/odoo#30544
2019-01-17[ADD] web_editor,*: Tests for new structure of web editorAntoine Guenet
The refactoring also had to be done in order to create a set of unit tests. Each behavior can be tested, including the behaviors performed as a consequence of keyboard interactions (for instance: Enter, Tab...). This commit also contains some changes to test_utils that were necessary given the new structure of the wysiwyg editor. Co-authored-by: Gorash <chm@odoo.com>
2019-01-17[IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' fieldChristophe Matthieu
* Creating a new structure by transforming all the plugins in the library using the odoo inheritance system. Plugins are easier to implement with the AbstractPlugin to add Odoo behaviors. * From now on, the methods of the library (in this case Summernote) can no longer be called by other modules or files. Only the wysiwyg widgets can access it, to simplify the updating process. The wysiwyg object serves as an interface. * Depending on the options the snippets will be loaded or not, the editor will be in an iframe or not... all of this is transparent from the outside. * Regarding iframes, all controllers related to editing have been removed: the new API no longer needs them. This speeds up loading, eases testing and removes complexity for the same features. PUBLIC FEATURES There are several public methods on the Wysiwyg class: * Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the library (xml, lazy, assets...) is loaded. * Wysiwyg.getRange (DOM): returns the range (selection in the dom) * Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates a range (selection in the dom) * Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an element (option available to select all, start or end) A jQuery selector was added: :o_editable, which indicates whether the current element is editable. That is, if it is contained in a tag with the attribute 'contentEditable = "true"' or in a tag with the class o_editable. Several methods are also present: * focusIn: makes a focus and places the cursor at the beginning of the element * focusInEnd: makes a focus and places the cursor at the end of the element * selectContent: makes a focus and selects the content HTML FIELD The HTML field can receive different options: * style-inline: {boolean} transforms a class into an inline style when saving and vice versa when reading. * no-attachment: {boolean} prevents the use of attachments (in media dialog) * cssEdit: {xml_id} to use a template containing the css to loaded in an iframe when editing * cssReadonly: {xml_id} to use a template containing the css to load into an iframe when viewing in readonly * snippets: {xml_id} snippets template (can be used with or without cssEdit) * wrapper: {template} qweb static template (containing a tag: id = "wrapper") that will include the content during editing (removed on save) MASS MAILING A widget was created for mass mailing. There are now two fields: body_html and body_arch. body_arch contains the code with the class without conversion into inline style, useful when editing and one with the inline style that is visible in readonly mode and sent by email. Advantage: no spreading errors, able to update css/theme, able to do more changes when converting to inline style so that a maximum of mail clients have an impeccable rendering. Co-authored-by: Antoine Guenet <age@odoo.com>
2019-01-17[REF] web_editor,*: Move and rename files to prepare refactoringChristophe Matthieu
The refactoring of the wysiwyg editor and 'html' field allows us to move some of the code that was in web_editor but only used in website or in mass_mailing. Some parts are still in web_editor but will be moved at a later time.
2018-12-19[REF] mass_mailing: clean JS views overridesAurélien Warnon
Task #1909424 The mass_mailing module used a lot of JS "include" to override the behavior of the kanban view and the html_frame widget. This commit cleans the overrides by using proper inheritance with "extend" instead of "include". It also slightly changes the current behavior of the mass_mailing kanban view to disable the drag and drop feature only when the view is grouped by "state" or "email_from". (Before this commit, the drag and drop feature was disabled for ALL fields). closes odoo/odoo#29452
2019-04-24[IMP] web, *: add a description to generic widgetsJuhil Somaiya
A `description` key has been added on AbstractField and all generic field widgets ; it is used to display a more user friendly name (both in the webclient and in Studio). Non-generic field widgets have an empty string as description. Related task 1918327 closes odoo/odoo#30131 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com> Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-17[REF] mass_mailing: cleanup redundant check in commitChanges()mgh-odoo
* Use === for stricter comparison. * Merge checks on this.wysiwyg and this.mode as they are redundant in this case. Task-ID: 1950784 closes odoo/odoo#32280 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2018-08-13[IMP] mass_mailing: focus on content when user selects the plaintext themeParth Gajjar
2018-08-13[IMP] mass_mailing: removed font-family from plain textAnshuman Sharma
Purpose behind this commit is to remove font-family from all elements in plaintext theme. So mail receiver will see this mail in default system font. This is inspired by new Gmail and suggested by FP As we want to show system's default font in the mail sent with the basic theme. And so we remove font-family from basic theme while saving. But by doing so in readonly mode is not getting proper font in odoo as we don't having any assets in readonly mail editor. So we added stylesheet just for display purpose.
2018-08-10[IMP] mail, mass_mailing : apply blacklist, opt_out per mailing listDavid Beguin
Purpose ======= - Apply the blacklist implementation to Improve mailing subscription to be more compliant with the European GDPR law. Keep a list of people who does not want to receive promotional emails (or mass mailing in general) anymore. - Allows the recipient to update himself his mailing preferences Specifications =========== This commit is regrouping some main changes on mass mailing. Apply Blacklist for following models through blacklist.mixin : - crm.lead - res.partner - mail.mass_mailing.contact - mail.channel.partner - Opt_out per mailing list instead of per mailing contact. - Replace opt_out by blacklist in crm.lead + res.partner models - Added 'ignored' state for mass_mailing. Ignored = blacklisted, opted-out Ignored email are not included into final statistics to avoid confusion. - Unsubscribe(d) pages migrated from website_mass_mailing to mass_mailing module as thoses pages should work without having the website module installed Detailed implementation =================== Mass-mailing : - A blacklisted email is notified by the ban icon next to the email field. (at the left of the email field for display purpose) - Renaming the '_get_blacklist' method that was actually searching opt_out list into 'get_opt_out_list' - Opt out per mailing list : Add opt_out + related fields (for display and ergonomy reasons) on the relational model - Display relational model tree view instead of mass_mailing.contact tree view when clicking on mass_mailing_list in kanban view -> In order to be align between contact_nbr displayed in kanban tile and the content of the tree view -> mass_mailing contact is accesible via the user icon in this tree view - Remove custom filters 'filter_contact_subscription' and 'filter_contact_unsubscription' as opt_out is not on mass_mailing.contact model anymore - Add 'is_public' to mailing list The name of this mailing list can be seen (or not) by recipient in the unsubscription page If the mailing lists used in the mass mailing are not public, the user in only informed that he has been unsubscribed. If the mailing lists are public, the user is informed that he has been unsubscribed from the mailing lists and he has the choice to modify his subscription to all the public mailing list he is or was subscribed to. - Unsubscription Page : - mass_mailing_contact : Opt_out per mailing list, done by email and not by id, as multiple contact can have the same email The recipient can add/remove himself to/from the blacklist The recipient can send a feedback about why he unsubscribed - crm.lead + res.partner : Once the recipient unsubscribe, he is automatically blacklisted The recipient can 'Come back' and remove himself from the blacklist if he changes his mind - Show blacklist button parameter added in config : The idea is to enable/disable the fact that the recipient can add himself to the blacklist by showing or not the 'blacklist me' button Only applies for mass_mailing.contact. The recipient, once blacklisted, can always, no matter the value of this parameter, 'come back' and unblacklist himself crm.lead + res.partner : - Replace opt_out by blacklist in crm.lead + res.partner models. As when a res.partner or crm.lead unsubcribe, we assume that the recipient does not want to receive mass mailing anymore, at all, even if we adds him to a mailing list afterwards. He is then blacklisted to avoid this. With this behaviour, if a new lead is created with the same email address, he won't be able to receive mail in mass_mode. But he will still be able to receive '1 to 1' direct email. Task ID 33224 Closes #25966
2018-07-27[REF] *: BS4, adapt dropdowns and caretsqsm-odoo
- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
2018-07-27[REF] *: BS4, adapt display classesqsm-odoo
The system completely changed. I also had to adapt classes to new screen breakpoints. hidden/hide -> d-none show -> d-block hidden-xs -> d-none d-md-(block/inline/...) hidden-sm -> d-md-none d-lg-(block/inline/...) hidden-md -> d-lg-none d-xl-(block/inline/...) hidden-lg -> d-xl-none visible-xs-* -> d-* d-md-none visible-sm-* -> d-none d-md-* d-lg-none visible-md-* -> d-none d-lg-* d-xl-none visible-lg-* -> d-none d-xl-* hidden-print -> d-print-none visible-print-* -> d-none d-print-* ... and all possible combination of those had to be handled too.
2018-06-12[MERGE] forward port branch 11.0 up to e3658d6f568Christophe Simonis
2018-06-06[FIX] mass_mailing: URI too longNicolas Martinelli
Since commit 6494f511718893, all images in mass mailing are created as attachments. This can lead to URI too long to be handled by some proxy, e.g. Nginx. opw-1853188
2018-02-15[MERGE] forward port branch saas-11.1 up to a277b585072Christophe Simonis
2018-02-14[MERGE] forward port branch saas-16 up to 77927559465Christophe Simonis