Skip to content
Snippets Groups Projects
  1. Oct 12, 2020
  2. Oct 13, 2020
  3. Oct 12, 2020
    • Achraf (abz)'s avatar
      [FIX] point_of_sale: Send invoice by email with qr_code · 4bc17f78
      Achraf (abz) authored
      
      Issue
      
          - Install "Point of Sale"
          - Enable "Qr Code" in Invoicing
          - Open new POS session
          - Set random customer
          - Try to send the invoice by email
      
      Cause
      
          The 'qr_code_urls' doesnt exist in the dictionary.
      
      Solution
      
          Add 'qr_code_urls' with all generated qr code urls to the dictionary in report.point_of_sale.report_invoice
      
          EDIT:
            use `_get_report_values` function of report.account.report_invoice instead of generate all qr code urls
      
      opw-2357088
      
      closes odoo/odoo#59669
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      4bc17f78
  4. Oct 09, 2020
  5. Oct 08, 2020
  6. Oct 12, 2020
  7. Oct 07, 2020
    • Siddarth Gajjar's avatar
      [FIX] website_slides: fix concurrency traceback · c1b8c1d8
      Siddarth Gajjar authored
      - Prior to this commit, slide content of type document or presentation is
        having src as '/slides/embed' and that controller tries to set slide as
        viewed. Along with this, for few slide types (including document and
        presentation) and for logged in user, it will try to set slide as completed
        once slide rendering is done with help of method `_setCompleted`, without
        waiting for the iframe to be loaded. This means, the controller called from
        the src of iFrame and the above method both tries to update same 'slide_slide'
        table at the same time, resulting into concurrency error.
      
      - This commit fixes the issue by marking the slide as completed (with help
        of method `_setCompleted`) only after the iFrame is loaded, avoiding the
        concurrent updation of 'slide.slide' table.
      
      TaskID 2265863
      Closes https://github.com/odoo/odoo/pull/52918
      
      
      
      closes odoo/odoo#59382
      
      X-original-commit: c5f406c8
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c1b8c1d8
  8. Oct 13, 2020
    • Xavier Morel's avatar
      [FIX] core: make --test-file work with symlinked modules · 53680966
      Xavier Morel authored
      
      While individual addons paths are normalised, module and resource
      paths are not.
      
      As a result, when symlinking modules into directories on the
      addons path, the path of test modules is only half-normalized: it's
      normalised up to the addon path (which likely did not need it in that
      setup) but not above that.
      
      This is an issue when using `--test-file`, because that path is fully
      normalised, and so the path of the provided test file and that of the
      corresponding test module will not match, leading to the tests
      unexpectedly not getting run.
      
      Normalize the test module's path before the comparison, using the same
      routing used for --test-file.
      
      closes odoo/odoo#59751
      
      X-original-commit: 46ad887ad8262a58d96dcd2b57707df267ae723e
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      53680966
  9. Oct 12, 2020
    • qsm-odoo's avatar
      [FIX] website: remove useless specific scss for quotes carousel · 281edf19
      qsm-odoo authored
      This reverts commit [1] which was fixed the right way and generically
      with [2].
      
      [1]: f011c9aa
      [2]: https://github.com/odoo/odoo/commit/9c08e119b125b82e2c42dc944920dd8a96789e25
      
      
      
      closes odoo/odoo#59787
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      281edf19
    • Samuel Degueldre's avatar
      [FIX] website_sale: fix ribbon modifications not being previewed · 922f3b67
      Samuel Degueldre authored
      
      Previously, editing a ribbon in the options panel had no preview inside
      of the page until the change was validated. This commit fixes that issue
      by making the real ribbon invisible, and making the ribbon dummy
      visible. The preview still only affects the current ribbon being edited
      until it is validated. Unvalidated changes are discarded when clicking
      elsewhere in the page.
      
      task-2339986
      
      closes odoo/odoo#59782
      
      X-original-commit: bdda4a06e2b0543f46cf51960af20505d574447b
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      922f3b67
    • xO-Tx's avatar
      [FIX] web_editor: fix background-sizing preview · 8a15618f
      xO-Tx authored
      
      with background-sizing option, user drags background image to adjust its
      position using an overlay with the same content from snippet (cloned element).
      
      Some CSS child selector rules will not be applied since the clone element has
      a different container from the snippet content.
      
      The CSS "background-attachment" property should be the same in
      both parallax snippet & its copy, this will keep the preview more "wysiwyg"
      instead of getting different result when bg position saved.
      
      This can be improved by copying all style from snippet content and
      override it with overlay related style (copying all css into overlay will
      not work since it will change the style of its content too)
      
      task-2327025
      
      closes odoo/odoo#59769
      
      X-original-commit: aaa3e63985789ea07464a5957eb18481e70a383f
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      8a15618f
    • Laurent Stukkens (LTU)'s avatar
      [FIX] website,website_sale: HTML escape dynamic snippet · f9142211
      Laurent Stukkens (LTU) authored
      
      Issue
          To do on Community:
          - Install website_sale (eCommerce)
          - Go into Website app
          - Navigate through Product/Products
          - Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
            characters into the name
          - Save
          - Go to the Website app Dashboard and click on 'Go to Website'
          - Click on 'Edit' button
          - Drag and drop the 'Dynamic Product' snippet into the website
          - Click on the block 'Your Dynamic Snippet wil be ...'
          - In the right panel, in the 'Dynamic Product' snippet options,
            chose a 'Template' and a 'Product Category'
      
          A traceback is shown
      
      Cause
          the '&' character crashes lxml.etree.fromstring
      
      Solution
          ensure no '&' is sent to lxmx.etree.fromstring by using
          odoo.tools.html_escape (in order to ensure no other problematic
          characters are sent to the front) on the field values except when
          not applicable (widget rendering with record_to_html should not be
          escaped).
          It is important to note here that this is applicable
          to action servers that are used by the dynamic filter.
      
      opw-2357027
      
      closes odoo/odoo#59679
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      f9142211
    • Benjamin Vray's avatar
      [FIX] website, *: keep logged user buttons outside the autohide menu · 59584974
      Benjamin Vray authored
      
      *: portal
      
      The dividers were removed with the new header templates but we still
      needed them to know which items do not need to be folded in the
      auto-hide menu. Instead of adding these dividers again, we added a new
      class for these elements.
      
      part-of: #59640
      task-2312878
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      59584974
    • Benjamin Vray's avatar
      [FIX] website: enable autohide menu in editor mode · 969aa3dc
      Benjamin Vray authored
      Before this commit, autohide menu was disabled in editor mode. This was
      thus not really wysiwyg for users anymore.
      
      part-of: #59640
      task-2312878
      969aa3dc
    • Tiffany Chang (tic)'s avatar
      [FIX] delivery: add barcode app check into package wizard · 945b5f67
      Tiffany Chang (tic) authored
      
      Because the barcode app bypasses the detailed operations for receipts
      (with default settings set), an error was being thrown when doing "put
      in pack" when a carrier is set (saving during the delivery package
      wizard) because the picking move lines are incorrectly selected. This
      commit adds in a check for when the wizard is accessed via the barcode
      app so that the error does not occur and the same behavior as when no
      carrier is assigned is followed.
      
      Related Enterprise PR: odoo/enterprise#9808
      
      closes odoo/odoo#59737
      
      Task: 2039720
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      945b5f67
    • Raphael Collet's avatar
      [FIX] core: optimize first snaphot in onchange · ec50c426
      Raphael Collet authored
      
      This patch speeds up the performance of method `onchange`.  Our use-case
      is an invoice with 300 lines, where we modify the unit price or quantity
      on several lines.  Each modification triggers a call to `onchange` on
      the invoice itself.  The latter call went from 1.3 to 0.8 seconds, which
      represents a speedup of 30% to 40%.
      
      In the implementation of `onchange`, the first snapshot is preceded by a
      "prefetching" phase, where the lines of x2many fields are read, so that
      the fields of unmodified lines are in cache.  This is useful because the
      fields of those lines are not sent by the client, which only sends ids.
      This prefetching represents more than 40% of the duration of `onchange`,
      in our use-case.
      
      The prefetching is inefficient for several reasons.  First, it uses
      `mapped`, which formats data that is actually never used.  Second, it
      accesses new records that have the actual lines as origin.  And on those
      records, computed stored fields are not taken from the origin record,
      but are (uselessly) computed instead.
      
      We have optimized the prefetching in the following way.  It now reads
      stored fields on the actual lines (using `_read` to avoid formatting),
      then copies the cache of those fields on the corresponding new lines (to
      avoid useless computations).  This makes the prefetching about 10 times
      faster!
      
      closes odoo/odoo#59744
      
      X-original-commit: d39d61d7
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      ec50c426
    • IEL's avatar
      [FIX] hr_expense: correct check for bank settings · 5c0fca66
      IEL authored
      TLDR: fix a mess in journal fields check
      
      Steps:
      
      * Create expense "paid by Company"
      * Click Post
      
      Before:
      
      * AttributeError: 'account.journal' object has no attribute
      'default_credit_account_id'
      
      After:
      
      * Either posted or shows user error about journal misconfiguration
      
      Notes:
      
      * Field ``default_credit_account_id`` is replaced in https://github.com/odoo/odoo/commit/41f119d5325dfbbf916d1d34e63946646ed4d44c
      
      
      * The error is introduced during incorrect forward-port #58852
      
      ---
      
      task-2355177
      
      closes odoo/odoo#59721
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      5c0fca66
  10. Oct 09, 2020
  11. Oct 12, 2020
  12. Oct 08, 2020
  13. Oct 12, 2020
    • David Beguin's avatar
      [FIX] survey: let Chart.js handle the session graph max height automatically · ac64af03
      David Beguin authored
      
      Before this commit, the graph y scale in the survey manager screen was based on
      the attendees count. But is some attendees do not answer the question, the bars
      never reach the maximum height of the graph, and bars can stay really small.
      
      Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2
      
      10 |
         |
         |
         |       |
      0  |_|__|__|_
           A  B  C
      
      After this commit, the max height of the graph is not set on the graph. So the
      chart lib will handle itself the height and will adapt automatically the bars
      height in function of the data given to the graph. Bars will always take full
      height space, relatively to the count of the most voted answer.
      
      Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2
      
      2  |       |
         |       |
         | |  |  |
      0  |_|__|__|_
           A  B  C
      
      Task ID: 2351455
      
      closes odoo/odoo#59106
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ac64af03
  14. Oct 09, 2020
  15. Oct 12, 2020
  16. Oct 09, 2020
    • Jorge Pinna Puissant's avatar
      [FIX] project: access token on task · 64e93794
      Jorge Pinna Puissant authored
      
      - Create a new Project with 'Portal user and all employees' as
        visibility;
      - Add a portal user as customer;
      - Create a new task in the Project, without assigning the task to
        anybody;
      - Connect to the portal as the portal user;
      - Send a message on the task.
      
      Before this commit, an Error 403 forbidden was raised, this error occurs
      because the task don't have an access token created, this token will be
      created when an internal user send a message on the task.
      
      Now, the access token is created if the project has a 'Portal user and
      all employees' visibility, and the portal user can post a message on
      the task.
      
      opw-2345070
      
      closes odoo/odoo#59282
      
      X-original-commit: 8a68fac8
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      64e93794
  17. Oct 12, 2020
    • Rémy Voet (ryv)'s avatar
      [FIX] purchase: fix state of extra product · 74780e95
      Rémy Voet (ryv) authored
      
      As explained in issues-59664, the commit
      f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
      readonly attribute in the `purchase.order.line` state field
      to avoid to save bad `state` in the server (then the state of the
      PO line != PO line).
      But it breaks the feature to add product
      when the PO is already confirm (the state will be 'purchase' and the
      `product_id` is readonly when state == 'purchase').
      
      To fix both issues, add a `default_state` in the context.
      It will "bypass" the attrs of `product_id` and the state of PO
      ('draft') line won't be save because it is readonly.
      
      resolve #59664
      
      closes odoo/odoo#59720
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      74780e95
    • Luis González's avatar
      [FIX] tools/safe_eval: Add missing builtin `sorted` · 3c823390
      Luis González authored
      
      Before this commit, the function `sorted` wasn't available on
      `safe_eval`, even though it's a Python built-in, which mades it
      unavailable for Python-code evaluation, e.g. server actions.
      
      After this commit, the above function is now accessible.
      
      closes odoo/odoo#59711
      
      X-original-commit: a725c892
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      3c823390
  18. Oct 10, 2020
    • Swapnesh Shah's avatar
      [FIX] sale_stock: inventory widget visibility · ea798c07
      Swapnesh Shah authored
      
      Before this commit there would be crash on Removing `Unit` field from Sale order lines list view due to missing `product_uom`, Which is necessary for `QtyAtDateWidget` widget.
      
      Now we hide the Widget if `product_uom` is not selected.
      
      Fixes #59492
      
      closes odoo/odoo#59687
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      ea798c07
    • Pierre Paridans's avatar
      [FIX] mail: plain-text messages word-wrap in Discuss UI · 5e66ca8d
      Pierre Paridans authored
      
      When a user sends a plaintext email to a mail-enabled channel, the
      rendering of this message in Discuss have present a horizontal scroll
      when the text contains long sentences.
      
      This commit fixes it by enabling wrapping of the line's word to fit its
      container size and prevent horizontal scrolling.
      
      Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71f3b490522358fa689ada7635dcd26a
      but a wrapper element (with the class `.o_thread_message_content`) was
      introduced in odoo/odoo@4685e4bc7f19f964697bf0dbd7dfdf254b6c5628 and
      merged between the testing of the fix above and its actual merging in the
      Odoo codebase, making it ineffective. We only have to properly re-enable
      it.
      
      opw-2341485
      
      Related task ID: 34931
      
      closes odoo/odoo#59689
      
      X-original-commit: a8b64a74
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      5e66ca8d
  19. Oct 09, 2020
  20. Oct 06, 2020
    • Harpritsinh Sisodiya's avatar
      [FIX] web_editor: fix oe_structure view that are not in extention mode · 731b3eb2
      Harpritsinh Sisodiya authored
      
      Issue occurs due to the way we compute the default value in base ir ui view.
      The method _compute_defaults don't set extention mode under some condition
      even if we provide an inherit_id view.
      
      This commit double fix it, we use now self.env['ir.ui.view'] to create the
      new view and so always compute the mode based on 'if inherit id or not'.
      Second fixes is to explicitely set mode manually as 'extention'.
      
      before commit:
      when you drop snippet to blog sidebar and click save button.
      The changes of user is not visible in sidebar because view created in mode
      'normal' and not 'extention'
      
      task-2311520
      closes odoo/odoo#55908
      
      closes odoo/odoo#59313
      
      X-original-commit: a944ce9b
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      Co-authored-by: default avatarjpr-odoo <jpr@openerp.com>
      731b3eb2
  21. Oct 11, 2020
  22. Oct 09, 2020
Loading