Skip to content
Snippets Groups Projects
  1. May 08, 2017
    • Laurent Smet's avatar
      [REM] odoo/report: remove deprecated stuff · 3425752e
      Laurent Smet authored
      - RML Reports
      - Webkit Reports (most part already removed by 13b9982c)
      - LocalService in netsvc.py
      - rename attributes like rml_% to report_%
      - rename ir.actions.report.xml to ir.actions.report
      - allow rendering directly on an ir.actions.report by calling render method
      - remove 'controller' report_type
      - remove unused res.font stuff
      - remove print_report method in models.py (not used)
      - restore removed call to pdftotext process in test_reports
      3425752e
  2. Apr 27, 2017
    • xmo-odoo's avatar
      [FIX] builtins removed from Python 3 · 2e6a589f
      xmo-odoo authored
      * Reverse wrapper courtesy of @rco-odoo's original P3 branch
      * thin compat module stripped down from werkzeug (to augment as needed)
      
      issue 8530
      2e6a589f
  3. Mar 08, 2017
  4. Feb 09, 2017
  5. Jan 18, 2017
  6. Jan 12, 2017
    • Denis Ledoux's avatar
      [FIX] mail: template, format date to customer language · 94da3692
      Denis Ledoux authored
      Up to now, there was no possibility to format a date
      within a specific language, such as the customer
      language. The date was always displayed with the format
      YYYY-mm-dd.
      (There was for the datetime, thanks to format_tz, but
      not for a simple date without time)
      
      This revision adds this possibility, but doesn't change
      the according email templates
      (such as the invoice date on the invoice email template)
      as it would require to update all translations, in
      the .po files and on transifex.
      
      If a user absolutely want this, he has to add
      the call to `format_date` himself, manually.
      
      opw-704260
      94da3692
  7. Jan 03, 2017
    • Raphael Collet's avatar
      [IMP] base, *: tighten `ir.model` access rights · 5d746d0a
      Raphael Collet authored
      Remove unrestricted "read" access.  To make code internally using `ir.model`
      work, add a private method `_get` on `ir.model` to retrieve the record
      corresponding to a model name, without access rights issue.
      
      Change signature of method `get_authorized_fields` to make it use a model name
      instead of a model id.  This removes the necessity of a search on `ir.model`.
      5d746d0a
    • Raphael Collet's avatar
      [REF] ir_config_parameter: remove `group_ids` and simplify · d0ca2d11
      Raphael Collet authored
      Add `sudo()` to call `get_param` where necessary, and make the web client use a
      controller instead of directly accessing parameters.
      d0ca2d11
  8. Oct 19, 2016
  9. Sep 27, 2016
    • Olivier Dony's avatar
      Revert "[FIX] mail: onchange_template_id" · 40bce50d
      Olivier Dony authored
      This reverts commit dc02f773.
      
      This commit caused a side-effect that is worse than the issue
      it tried to fix, which was purely cosmetic.
      Now in mass-mail mode the template is only rendered once
      and all recipients receive the same PDF, which completely
      defeats the goal of a dynamic report. We have static
      attachments for that.
      
      Original fix related to opw-657152
      Reverts PR #10568
      40bce50d
  10. Sep 05, 2016
  11. Aug 30, 2016
    • Thibault Delavallée's avatar
      [IMP] tools: sanitizer: add and clean sanitize options · 02c748be
      Thibault Delavallée authored
      Now having
      
       * sanitize: run the sanitizer to clean the html (removing javascripts,
         unwanted tags, ...)
       * sanitize_tags: only a subset of tags is allowed in html content.
         Unwelcomed tags are remove dand their content stripped.
       * sanitize_attributes: only a subset of attributes is allowed.
       * sanitize_style: only a subset of style attributes is allowed. Style
         attributes are parsed to keep only a white list.
       * strip_style: all style is removed. It bypasses sanitize_style as there
         is no need to sanitize something that is removed.
       * strip_classes: remove class attributes
      
      Fields parameters have also been updated to match the sanitize options. Html
      fields by default are sanitized with sanitize_tags activated but without any
      further options. All addons have been updated to match the new options
      according to their previous behavior.
      02c748be
  12. Aug 22, 2016
  13. Aug 16, 2016
  14. Aug 10, 2016
  15. Aug 09, 2016
  16. Jul 05, 2016
  17. Jun 21, 2016
  18. Jan 24, 2016
  19. Jan 21, 2016
  20. Jan 20, 2016
    • Nicolas Lempereur's avatar
      [FIX] mail: don't autoescape mail subject · 6dde919b
      Nicolas Lempereur authored
      The mail template rendering system use "autoescape" for subject, body,
      email_to, ...
      
      Using autoescape is good for the body, but for the subject it means
      variables insertions have to be marked as safe.
      
      This commit add another environment without autoescaping enabled for the
      subject field.
      
      From https://tools.ietf.org/html/rfc2822:
      
        The "Subject:" and "Comments:" fields are unstructured fields as defined
        in section 2.2.1, and therefore may contain text or folding white space.
      
        2.2.1. Unstructured Header Field Bodies
      
        Some field bodies in this standard are defined simply as "unstructured"
        (which is specified below as any US-ASCII characters, except for CR and
        LF) with no further restrictions.
      
      closes #10547
      
      opw-659231
      opw-666801
      opw-665863
      6dde919b
  21. Dec 10, 2015
    • Denis Ledoux's avatar
      [FIX] mail: jinja2 code compatible with wysiwyg for notifications · 4bebbfdc
      Denis Ledoux authored
      When editing an email template with the wysiwyg,
      the `<` and `>` operators are automatically converted
      to `&lt;` and `&gt;`, even for the Jinja2 conditions,
      therefore breaking these conditions, and the render
      of the email templates.
      
      We avoid to use these operators in the email
      template, so users can customize the notification
      email template without having an advanced
      knowledge on how to edit an email template containing
      Jinja2 code.
      
      Besides, the line return at the end of the email template,
      just after the `% endif`,
      is done on purpose as well: the wysiwyg adds automatically,
      at the time of this revision,
      `<p></p>` at the end of the email template source, but
      this cannot be added on the same line than `% endif`,
      otherwise this is considered as Jinja2 code, and it's not.
      
      opw-659113
      4bebbfdc
  22. Dec 04, 2015
  23. Nov 24, 2015
  24. Aug 28, 2015
    • Thibault Delavallée's avatar
      [IMP] mail: notification emails with button · 01ab75f5
      Thibault Delavallée authored
      Notification emails have been redesigned. They notably include buttons
      allowing to perform some action directly from the email.
      
      The notification creation and sending has been partially rewritten
      and improved. The purpose is to lessen the number of rendering to perform
      when sending emails to recipients. Recipients are first categorized into
      groups. Basic groups are partners and users. The notification template
      is then rendered twice, one for followers and one for not-followers. In most
      cases there will be few rendering to perform. Through inheritance it
      is possible to further categorize users. For example HR users / officers
      that have approve / refuse buttons in their email.
      
      A custom data structure is used to store data about buttons and actions.
      URLs, follow / unfollow are added in the structure and used in the
      template to render the email for a given group.
      
      New routes are added in mail. Those allow to perform some action, like
      going to a form in create mode, following / unfollowing, executing a method,
      sending a signal for a workflow. Those routes are for users only and rely
      on classic access rights.
      
      A generic route for viewing records is added. It replaces the old redirect
      action. According to some specific action given by the already-existing
      get_access_action, the record will be visible for everybody (forum, blog)
      or restricted (going on the Inbox / login / form view, according to access
      rights).
      
      The next commit will add the various inherits necessary to add the actions
      in the main addons.
      01ab75f5
  25. May 19, 2015
  26. May 08, 2015
  27. Apr 29, 2015
  28. Apr 27, 2015
  29. Mar 24, 2015
  30. Mar 02, 2015
  31. Jan 16, 2015
    • Goffin Simon's avatar
      [IMP] Cleanup and refactoring of exception handling · 0fd773a4
      Goffin Simon authored
      Unify and refactor exception handling in framework and addons.
      
      The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
       - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
       - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
       - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
       - `MissingError`: raised when an operation is attempted on a record that does not exist.
       - `ValidationError`: raised when an operation violates a SQL or Python constraint.
       - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.
      
      All exceptions take a single message argument.
      
      The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.
      
      A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.
      
      This commit introduces a more consistent policy for logging errors and warnings:
       - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
       - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
       - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
      0fd773a4
  32. Jan 07, 2015
    • Julien De Coster's avatar
      [IMP] Mass mailings send in cron · d88c34d1
      Julien De Coster authored
      1. The merge of the "email_template" module into the "mail" module.
      2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view.
      3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing).
      4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail.
      5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign.
      6. Many little improvements
      d88c34d1
  33. Dec 31, 2014
  34. Dec 10, 2014
  35. Oct 14, 2014
  36. Sep 09, 2014
Loading