Skip to content
Snippets Groups Projects
  1. Nov 27, 2022
  2. Nov 24, 2022
  3. Nov 20, 2022
  4. Nov 13, 2022
  5. Oct 30, 2022
  6. Oct 23, 2022
  7. Oct 17, 2022
  8. Oct 16, 2022
  9. Oct 09, 2022
  10. Oct 05, 2022
    • Damien Bouvy's avatar
      [IMP] *: adapt to grid form views · 836568df
      Damien Bouvy authored
      
      The recent switch from tables to css grids for form views `group` nodes
      has introduced several inconsistencies/issues with several views accross
      modules - these will not be the last fixes.
      
      closes odoo/odoo#102119
      
      Related: odoo/enterprise#32293
      Signed-off-by: default avatarBouvy Damien (dbo) <dbo@odoo.com>
      836568df
  11. Oct 02, 2022
  12. Sep 30, 2022
  13. Sep 25, 2022
  14. Sep 20, 2022
    • Martin Trigaux's avatar
      [I18N] *: export 16.0 source terms · 1a877276
      Martin Trigaux authored
      
      closes odoo/odoo#100573
      
      Related: odoo/enterprise#31507
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      1a877276
    • Pierre-Yves Dufays's avatar
      [IMP] digest: ease the way people can unsubscribe from a digest · e1f86d3d
      Pierre-Yves Dufays authored
      
      Ease the way people can unsubscribe from a digest by adding information
      to the email enabling a user agent to present a button to the user that
      automate the unsubscription.
      
      Technical notes:
      To ease the way people can unsubscribe from a digest, we have followed the
      advice of rfc8058 by adding the following header to the email:
      - List-Unsubscribe: https_URL_to_unsubscribe
      - List-Unsubscribe-Post: List-Unsubscribe=One-Click
      
      The https_URL_to_unsubscribe
      - must work with the POST method but not the GET. The GET version is disabled
      to avoid unintended unsubscription that could be triggered by an anti-spam
      accessing the URLs in the headers.
      - must unsubscribe the user without any additional steps (one click)
      - should contain an opaque identifier hard-to-forge to identify the list and
      the user (our token fulfills that goal). The goal is to avoid that someone
      could unregister someone else easily.
      - must fulfill other conditions like no cookie, no redirection, ...
      
      It requires also that List-Unsubscribe and List-Unsubscribe-Post be covered by
      a DKIM signature.
      
      Task-2800499
      
      closes odoo/odoo#86934
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e1f86d3d
  15. Jul 07, 2022
  16. Jun 14, 2022
    • Florian Charlier's avatar
      [IMP] base: add _is_internal method to res.users · dae28c4b
      Florian Charlier authored
      No method was readily available to know if a user is `internal` (has
      group `base.group_user`), which was inconsistent with other base groups.
      
      _is_internal is now used in the codebase where it is clear that
      `.has_group('base.group_user')` is called on a single record.
      
      Part-of: odoo/odoo#85703
      dae28c4b
  17. May 25, 2022
  18. Apr 23, 2022
  19. Apr 15, 2022
    • Mitul Shah's avatar
      [IMP] digest: fix tip description · ab0d4152
      Mitul Shah authored
      
      Before this Commit, while sending the digest emails, the tip description was
      incorrect due to sanitizing. Some jinja was also badly converted into
      inline qweb instead of regular qweb.
      
      After this Commit, we have fixed the tip description field value. We do the
      html_sanitize after rendering the QWEB template. So, we get the proper values
      of conditions and aliases. Replacing jinja with qweb template, should use
      <t t-out="variable"/> to print the dynamic value so, remove the inline_template
      expression `{{` and `}}` and put the <t t-out="variable"/>.
      
      Task-2704083
      
      closes odoo/odoo#88937
      
      X-original-commit: c08cdc39
      Related: odoo/enterprise#26293
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ab0d4152
  20. Apr 04, 2022
  21. Mar 29, 2022
    • Fabio Barbero's avatar
      [IMP] digest: update documentation links · 101c0801
      Fabio Barbero authored
      
      Purpose
      =======
      Update documentation links for digest in settings menu.
      
      Task-2800588
      
      closes odoo/odoo#87351
      
      X-original-commit: ca7502b0c2d46dd16547272cec0265c8c4aeca8e
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      101c0801
    • Fabio Barbero's avatar
      [IMP] digest, *: show pictures stored on Odoo · 1356a490
      Fabio Barbero authored
      Purpose
      =======
      Pictures from the digest emails are currently stored on the database
      itself, meaning that if the database expires (e.g. after trial expires) all
      pictures from previously sent emails won't be visible.
      This is an issue since digest tips are meant as a marketing tool to bring
      people to Odoo after trying a database.
      
      Digest pictures are now taken from Odoo's server
      (https://download.odoocdn.com/digests
      
      ) so that the pictures will still
      be visible after the database has expired.
      
      From this commit onwards, it should not be allowed to change a digest
      picture with the same name (to display a gif of a newer version), since
      all databases with previous versions would receive pictures of a version
      that does not correspond to theirs.
      
      This also means that everyone client's Odoo  server will contain pictures
      that are never used. This could be fixed if Odoo stored them somewhere
      else and didn't make them dependent from the git repository.
      
      Task-2372195
      
      closes odoo/odoo#87343
      
      X-original-commit: 35157677a2a63a2559a72aff21e62e23a3c671a2
      Related: odoo/enterprise#25654
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      1356a490
    • Fabio Barbero's avatar
      [IMP] digest, *: update digest pictures · 71bcd3bc
      Fabio Barbero authored
      Purpose
      =======
      Update pictures with higher quality, up-to-date equivalent.
      
      Task-2372195
      
      X-original-commit: 476ca7e5abfbe25f7375a426a249da6fb41098cf
      Part-of: odoo/odoo#87343
      71bcd3bc
  22. Mar 16, 2022
    • Munaf Khan's avatar
      [FIX] digest: fix digest mail failure due to blank "From" field · 4c072bd2
      Munaf Khan authored
      
      Currently while sending a digest, if a company does not have an email
      address set, the "From" field for the mail is blank and so trying to
      send digest fails.
      
      With this commit, if a company does not have an email address set, it
      will fallback to logged in user's email address as a "From" value.
      In most cases, it will be the Odoobot email address (if the digest is
      sent with the CRON) but if the admin send manually the digest, we will
      use the admin email address.
      
      TaskID-2729780
      
      closes odoo/odoo#86507
      
      X-original-commit: b9f8b8c7
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4c072bd2
  23. Dec 08, 2021
    • Antoine Guenet's avatar
      [FIX] base, web_editor, mail, digest: preserve comments in sent e-mails · aceb0868
      Antoine Guenet authored
      For email design in the context of Microsoft Outlook, we want to keep
      some magic Microsoft comments (Outlook conditional comment), which -
      until this commit - were skipped by QWeb. These allow us to change the
      rendering exclusively for Outlook so as to overcome some of its
      limitations. This commit introduces a qweb rendering option
      (`preserve_comments`) for when - like in mass mailing and digest - we
      want to keep comments.
      
      Part-of: odoo/odoo#80621
      aceb0868
  24. Dec 07, 2021
  25. Nov 16, 2021
    • Fabio Barbero's avatar
      [IMP] digest: organise digest view · 1a9b6422
      Fabio Barbero authored
      
      Purpose
      =======
      
      Give the user a more organized view of the digest KPIs in the backend and
      improve global wording of digest sections and KPIs.
      
      Specifications
      ==============
      
      Reorganize order of KPIs in digest view. Fix some typos, move buttons in
      list and form views.
      
      Task-2582128
      
      closes odoo/odoo#77507
      
      Related: odoo/enterprise#21340
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      1a9b6422
    • Fabio Barbero's avatar
      [IMP] digest: fix spelling mistake · 0324e12e
      Fabio Barbero authored
      Fix spelling mistake in unsubscribe actions now that unsubscribe with token
      has been merged with odoo/odoo@0ac3de1 .
      
      Task-2582128
      
      Part-of: odoo/odoo#77507
      0324e12e
    • Thibault Delavallée's avatar
      [FIX] digest: improve tone down · 49085a12
      Thibault Delavallée authored
      Currently digest sending is toned down when being sent if subscribed users
      did not connect since more than 3 days. It allows to avoid spamming people
      not being active or present anymore.
      
      This is currently limited to daily digests that are set to weekly. However
      it may continues to send digests each week until the digest is de-activated.
      
      In this commit we tone down the digest from daily to quarterly depending
      on users activity. It is still based on overall activity and not individual
      users to avoid complex computation on heavy digests. This will be done in
      further cleaning of digests.
      
      Task-2688856 (Digest tone down improvement)
      
      X-original-commit: f916354b
      Part-of: odoo/odoo#79877
      49085a12
    • Fabio Barbero's avatar
      [FIX] digest: ease unsubscribe · 0ac3de16
      Fabio Barbero authored
      
      Purpose of this commit is to ease usage of unsubscribe button for periodic
      digests for non-admins. Users land on page that says "You have unsubscribed
      from ..." and not on digest form view anymore.
      
      It is done using a public route with a token, allowing to unsubscribe even
      when being not logged, for example when receiving digest emails that are
      unwanted.
      
      Task-2641394 (Digest emails sending improvement)
      Task-2582128 (Digest onboarding and usage improvement)
      
      X-original-commit: a4b98a82
      Part-of: odoo/odoo#79877
      Co-authored-by: default avatarThibault Delavallée <tde@odoo.com>
      0ac3de16
    • Thibault Delavallée's avatar
      [FIX] digest, mass_mailing: correctly set body before odoo mentions · d27a6f72
      Thibault Delavallée authored
      Body is used in statistics as an additional content to digest layout. However
      it is strangely located after Odoo mentions (Send by, ...). Currently link
      trackers statistics are therefore at the end of the email. They belong to
      the "core" section of the emails.
      
      Task-2686586 (Repair mailing statistics email)
      
      X-original-commit: c9a503ee
      Part-of: odoo/odoo#79877
      d27a6f72
    • Thibault Delavallée's avatar
      [FIX] digest, mass_mailing: fix crash about impossible 'unsubscribe' · db5315ef
      Thibault Delavallée authored
      Mailing statistics emails are build on digest layout. This layout contains a
      reference to the digest unsubscribe mechanism, which obviously does not work
      with mailing statistics emails as they currently have no opt-out mechanism.
      This commit fixes that part of the template so that unsubscribe is displayed
      only with digests.
      
      Task-2582128 (Digest onboarding and usage improvement)
      Task-2686586 (Repair mailing statistics email)
      
      X-original-commit: febe4506
      Part-of: odoo/odoo#79877
      db5315ef
    • Fabio Barbero's avatar
      [FIX] digest: display unsubscribe even if no preferences to display · 72637878
      Fabio Barbero authored
      A wrongly-placed t-if prevented from displaying unsubscribe link (and the
      "Sent by Odoo" sentence by the way, even if less annoying).
      
      Task-2582128 (Digest onboarding and usage improvement)
      
      X-original-commit: 669209b4
      Part-of: odoo/odoo#79877
      72637878
    • Thibault Delavallée's avatar
      [IMP] digest: add tests about tone down and unsubscribe · 4ea673bf
      Thibault Delavallée authored
      Purpose is to ensure behavior of digests and prepare future fixes and
      improvements. Tone down and unsubscribe links are currently not tested.
      This commit fixes that by adding relevant tests.
      
      Task-2641394 (Digest emails sending improvement)
      Task-2582128 (Digest onbarding and usage improvement)
      
      X-original-commit: f340859a
      Part-of: odoo/odoo#79877
      4ea673bf
    • Thibault Delavallée's avatar
      [FW][FIX] digest: use email queue to send digest emails (and improve tests) · 9c25a65f
      Thibault Delavallée authored
      When there is an issue updating digest state (concurrent access, or some other
      error that may happen), digest emails may be sent in loop. Indeed they are
      currently sent in the same transaction that the one that updates digest state.
      This means that emails may be sent even if digest update fails.
      
      As we do not think timing is so important, we now use the email queue to send
      digest emails. That way email creation is rollbacked and they are not sent
      if digest update fails for some reason.
      
      Tests are updated to take into account we now create outgoing mail.mail. Some
      tests are also added about mail values and subscription, and cleaned in a more
      general way.
      
      Task-2641394 (Digest emails sending improvement)
      Task-2582128 (Digest onbarding and usage improvement)
      
      X-original-commit: 96a14816
      Part-of: odoo/odoo#79877
      9c25a65f
    • Thibault Delavallée's avatar
      [FIX] digest: add missing depends on is_subscribed field · 54780667
      Thibault Delavallée authored
      Currently subscribed field is not computed again if user_ids field value
      changes on a digest. This has probably few consequences in current code
      but better be sure this field is correctly updated in a given transaction.
      
      Task-2641394 (Digest emails sending improvement)
      Task-2582128 (Digest onboarding and usage improvement)
      
      X-original-commit: 3a7c1348
      Part-of: odoo/odoo#79877
      54780667
    • Thibault Delavallée's avatar
      [IMP] digest: add private methods to manage digest members · 35ccabf0
      Thibault Delavallée authored
      Purpose is to ease digest management and testing. Public methods still work
      as before this commit, simply calling the private implementation. New private
      methods allows to better manipulate subscribed users. Those will be used
      notably as shortcuts in tests.
      
      Task-2641394 (Digest emails sending improvement)
      Task-2582128 (Digest onbarding and usage improvement)
      
      X-original-commit: 3045c49f
      Part-of: odoo/odoo#79877
      35ccabf0
  26. Sep 29, 2021
    • Nicolas Bayet's avatar
      [IMP] mail,*: replace jinja with qweb · 4813f429
      Nicolas Bayet authored
      Jinja as a templating engine was problematic in differents respect:
      - introduce external dependency to Odoo (less controll)
      - add another templating mechanism in the stack
      - specific feature in qweb cannot be reused
      - difficulty in rendering easily editable templates
      - more knowledge required with no betterment
      
      By replacing jinja with qweb we can now build tools to edit a qweb
      that will work with the previously jinja encoded document
      (essentially `mail.template` records).
      
      There is a catch however. Some email fields (eg. email_to) used jinja
      syntax for rendering dynamic variables (ie. ${object.something} and
      ${object.something_that_should_not_be_escaped | safe}).
      
      We still want user to use dynamic variables for some char fields (eg.
      subject, from, to, ...). We made a new rendering engine called
      "inline_template" that will render an expression enclosed by `{{` and
      `}}`.
      
      To be able to edit the templates from the backend interface, a
      plugin to the Odoo editor has been made for seamlessly edit the
      document.
      
      This qweb plugin includes:
      - make dynamic variables (eg. `<t t-out="variable"/>`) not editable
        (for preventing the user to shoot himself in the foot)
      - group and hide related logical branching (ie. t-if, t-elif, and t-else)
        in order to see only one at once
      - a floating select input to switch visibility of a particular logical
        branching
      
      Task-27033
      
      X-original-commit: odoo/odoo@68182baff4bdf4b3bcc1f46b361f5a5b8ac9aa11
      Part-of: odoo/odoo#77377
      4813f429
  27. Sep 02, 2021
    • std-odoo's avatar
      [IMP] mail, various: add email templates management levels · cc012a08
      std-odoo authored
      
      Purpose
      =======
      
      Purpose of this commit is to add a new group for the mail template designer.
      Goal is to make roles clearer: managers edit templates, users use them. This
      commit allow some designers / managers to make email template and to let
      others users use those email templates.
      
      Specifications
      ==============
      
      When this feature is enabled in the Settings page, a new group is required to
      modify email templates in a composer like wizard or to make dynamic content.
      This allows to separate managers editing / composing templates from standard
      users that use them.
      
      If the current does not have this group, the email body will be in readonly
      mode if he selected an email template. That way we force him to use the email
      template that the manager made.
      
      Technical
      =========
      
      New Group
      ---------
      
      Only users in this group will be able to create / write email template or
      to write Jinja code in the mail composer (including other fields like subject
      in mailing).
      
      By default, all internal users have this group. Mass mailing users also have
      this group as writing mailings is about the same management level as writing
      templates.
      
      Mail Composer Mixin
      -------------------
      
      In comment mode, the template is rendered and then saved on the body field
      so non-"Mail Template Editor" users can load email templates.
      
      But in mass mode, the body of the template is saved and then rendered and
      many things change the body (HTML sanitizer, web editor move inline CSS
      properties, add / remove spaces...). So in this case, we can not know if
      the user changed the body or not. That is why we put the body field in
      readonly mode so, it is not modified by the web editor.
      
      Jinja code detection
      --------------------
      
      To detect dynamic Jinja content, we compile the template, and we browse the
      AST. If we do not have a single "Template Data" node, we assume that the
      template is dynamic.
      
      When we detect the template as static, we do not render it. That way we
      avoid unnecessary rendering.
      
      Code cleaning
      -------------
      
      Move Jinja import into tools so that it is outside of mail framework code.
      
      Task-2187263
      
      closes odoo/odoo#75840
      
      Related: odoo/enterprise#20547
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      cc012a08
Loading