Skip to content
Snippets Groups Projects
  1. Sep 13, 2018
  2. Sep 12, 2018
  3. Sep 11, 2018
  4. Sep 07, 2018
  5. Sep 03, 2018
    • Nicolas Lempereur's avatar
      [FIX] web_editor: back to first -> history stay ok · 61b77125
      Nicolas Lempereur authored
      If we do:
      
      - one change that will be saved in history
      - go back to the document before any change
      - do other change
      
      we can easily get in a state were the history is no longer recorded.
      
      The history is kept like this:
      
      - pos: our position in the history
      - aUndo: the snapshots of history
      - toSnap: the last history snapshop that is to be saved
      
      so for example if we start without change (at originalState):
      
        {pos: 0, aUndo=[], toSnap=null}
      
      Then we do two changes (change1, change2):
      
        {pos: 2, aUndo=[originalState, change1], toSnap=change2}
      
      If we make an undo, we will get to:
      
        {pos: 1, aUndo=[originalState,change1,change2], toSnap=null)
      
      If we make another change (change3):
      
        {pos: 2, aUndo=[originalState, change1], toSnap=change3}
      
      So the history after the position is removed.
      
      But when we get back to the original, the state would forever be:
      
        {pos: 0, aUndo=[originalState], toSnap=change85}
      
      because when doing a change, the code only removed history from the
      max(pos, 1) index.
      
      opw-1870119
      closes #26701
      61b77125
    • Nicolas Lempereur's avatar
      [FIX] web_editor: normal up/down in content in cell · 793988c7
      Nicolas Lempereur authored
      In the editor in a table cell, when we press UP/DOWN keys:
      
      - we have default editor/browser behavior if there is content before
        (UP) or after (DOWN) the element we are currently on
      - else we go to the previous (UP) or next (DOWN) row if available
      - else we go to the next content if available
      - else we have the default editor/browser behavior
      
      But when checking if there is an element before/after the content, we
      did not take into account if there was an ancestor node inside the cell
      that had content after, so for example with this structure:
      
      ```
      <table>
      <tr><td>
        <p>hello <b>world</b></p>
        <p>cruel</p>
      </td></tr>
      <tr><td>
        <p>bingo</p>
      </td></tr>
      </table>
      ```
      
      if the current range was on 'world' text node, we would just check if
      there is content after this text node, not if there is content after its
      `<p/>` ancestor.
      
      Before the fix we would get on the next row, after we would have default
      editor/browser behavior: ie. if cruel is on another line, going to this
      line.
      
      opw-1870119
      closes #26701
      793988c7
  6. Sep 01, 2018
  7. Aug 28, 2018
  8. Aug 27, 2018
  9. Aug 22, 2018
    • Toufik Benjaa's avatar
      [FIX] mail: channel_get return wrong channel when duplicate partners · 81f975d3
      Toufik Benjaa authored
      - In some cases (merge of partners, etc ...) there might be mail.channel
        that have two mail.channel.partner with the same res.partner.
        When you try to open a discuss window with a partner for which you
        have no existing mail.channel.
        The channel opened is the one where your partner is duplicated.
        This is due to the fact that the SQL request to find the mail.channel
        doesn't take in account that a mail.channel may have twice the same
        partner.
      
        To fix this issue, we try to exactly match the partners we search.
      81f975d3
  10. Aug 21, 2018
  11. Aug 20, 2018
  12. Aug 14, 2018
  13. Aug 13, 2018
  14. Aug 08, 2018
  15. Aug 07, 2018
  16. Aug 04, 2018
  17. Jul 28, 2018
  18. Jul 18, 2018
  19. Jul 16, 2018
  20. Jul 23, 2018
  21. Jul 12, 2018
  22. Jul 14, 2018
  23. Jul 23, 2018
    • Olivier Dony's avatar
      [FIX] base: always preload dateutil · 779ceac9
      Olivier Dony authored
      The dateutil package uses lazy import to selectively expose its
      features: `parser`, `relativedelta`, `rrule`, `tz`.
      
      Depending on installed modules and order of initialization, there was no
      guarantee that a given feature was already loaded during the preparation
      of the action context.
      
      This patch ensures that we always preload the feature set we need, and
      only that feature set. This way we have a consistent `dateutil` lib in
      the action context at all times.
      779ceac9
  24. Jul 07, 2018
  25. Jul 08, 2018
  26. Jul 29, 2018
    • Simon Lejeune's avatar
      [FIX] base: strengthen ir.attachment access rights · e5984fbf
      Simon Lejeune authored
      An ir.attachment record can be served as a request's reponse if:
        - a request triggers a 404
        - the ir.attachment record has its url field matching the url of
          the failed and is of binary type
      
      Following rev[1], portal users have the right to create these kind of
      records, and it is a security concern.
      
      This patch restrict the ability to create and write on the ir.attachment
      records that may be served through the dispatch's exception mechanism to
      settings users.
      
      As the asset bundles files are served through the use of these special
      ir.attachment, we make sure to retrieve only ir.attachment records
      created by the superuser in the `get_attachment` method.
      
      As website administrators often need to play with these special
      ir.attachment, we also let to this group the permission to manage them.
      
      [1] 61065b6d
      e5984fbf
  27. Jul 03, 2018
    • Simon Lejeune's avatar
      [FIX] report: avoid local file resources · d5efba25
      Simon Lejeune authored
      Make sure building reports using local resources are disabled.
      This avoids get different report result based on the system if the
      given resources are or not present (e.g. custom style)
      d5efba25
  28. Aug 01, 2018
  29. Jul 27, 2018
    • Nicolas Lempereur's avatar
      [FIX] base: use -U+FEFF instead of U+2011 in -num · cb2a3afa
      Nicolas Lempereur authored
      In af64780a an improvement was done so a numerical fields like '-500'
      was not breaked up over two lines after the hyphen.
      
      But it seems in a very particular case of printing PDF in a given
      combination of condition:
      
      - printing over wkhtmltopdf which itself uses an old version of webkit
      - particular font (issue happen with Arial but not "Segoe UI")
      - particular version of windows (windows server 2012, not on windows 10)
      
      the - character at the front of a monetary, float or integer field would
      be displayed as | erroneously.
      
      The problem is probably that the font system in the old webkit with
      given windows will not find the code point in the given font, and
      doesn't fallback correctly.
      
      This commit replace using the "NON-BREAKING HYPHEN (U+2011)" by using
      the "ZERO WIDTH NO-BREAK SPACE (U+FEFF)" which is an invisible character
      with no width that prevent splitting at its location.
      
      As a note, an alternative to this character is "WORD JOINER (U+2060)"
      that may be preferred, but it presents exactly the same issue (with
      -|500 instead of -{WORD JOINER}500) in the same environment.
      
      mentioned in https://www.odoo.com/forum/1/question/118653
      opw-1867842
      fixes #17093
      fixes #25840
      closes #26019
      cb2a3afa
  30. Jul 25, 2018
  31. Jul 23, 2018
    • Jeremy Kersten's avatar
      [FIX] report: fix padding for ul in report pdf · f045186f
      Jeremy Kersten authored
      Rendering in html was correct thanks to the webkit-padding-start 40px added
      by the browser. But once printed with wkhtml, the padding was missing.
      
      Now we force the padding manually.
      
      This commit closes #7375
      f045186f
Loading