Skip to content
Snippets Groups Projects
  1. Dec 16, 2019
  2. Dec 19, 2019
    • William Henrotin's avatar
      [FIX] mrp: convert quantity in product UoM · 348f8f10
      William Henrotin authored
      
      If a component is used in a production with another unit of measure
      than it's one, the created stock move line could not convert the quantity
      correctly.
      If there is enough quantity in stock, the created move line takes the
      quant uom but the quantity in the production ones.
      ex: consume 1 dozen, the quantity on the stock move line is 1 unit
      
      This commit always uses the wo line's UoM and quantity to create the
      stock move line.
      
      This commit is a backport of d813873f (in 13.1)
      opw 2154288
      
      closes odoo/odoo#41954
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      348f8f10
  3. Dec 17, 2019
  4. Dec 18, 2019
    • Jason Van Malder's avatar
      [FIX] website: fix background video widget on mobile · f5f569b4
      Jason Van Malder authored
      
      Issue
      
          - Download the customer db: stargue-inc
          - Go on the website in mobile mode
      
          Traceback & the second item in the carousel is not displayed.
      
      Cause
      
          Traceback: we use `this.$iframe` without checking if it's defined
          Second item not displayed: the first video promise is overriden
          by the second video promise.
      
      Solution
      
          Check if this.$iframe is defined and resolve the old promise
          instead of overriding it.
      
      OPW-2152690
      
      closes odoo/odoo#42098
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      f5f569b4
  5. Nov 18, 2019
  6. Dec 12, 2019
    • Olivier Dony's avatar
      [FIX] ir.attachment: make filestore GC yield to other transactions · 8a093c74
      Olivier Dony authored
      If a long-running transaction holds a write-lock on any row in
      ir.attachment, the GC job can wait an indefinite amount of time to
      acquire its table-wise SHARE LOCK.
      
      While sitting in the queue for this lock, it will conflict with any
      future transaction that tries to acquire a write-lock on any row [1].
      So the GC transaction, which would normally execute very fast and
      immediately release its lock, will start to block other transactions and
      cause severe delays in response time. It basically depends on how long
      the tx holding the lock takes to complete... which is unknown.
      
      As a workaround, we force an arbitrary (but short) lock_timeout in the
      GC tx before attempting the lock. If it fails to acquire it, it will
      fail and raise, causing the whole operation to abort. The cron job will
      be rescheduled quickly because it failed to complete, giving the GC
      another chance to complete.
      
      10 seconds seems a reasonable compromise, as it gives the blocking
      transaction(s) some time to complete before bailing out, yet should
      not be long enough to bring the system to a halt due to other
      transactions blocked by the GC one. I have no hard data to back this
      claim, though.
      
      [1] See the LOCK conflict table in the documentation:
            https://www.postgresql.org/docs/10/explicit-locking.html
      
      
      
      closes odoo/odoo#41816
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      8a093c74
  7. Dec 18, 2019
    • Xavier Morel's avatar
      [FIX] core: ask OS to pick CDT port · 1eaabb2f
      Xavier Morel authored
      
      When running multiple odoo on the same machine (in order to test
      multiple things concurrently, etc...) it's easily enough to start them
      on 8069, 8070, 8071, ... and that *seems* to work, but then they start
      walking on one another and *losing* chromes entirely, so you end up
      with hundreds of chrome processes: right now with 2 Odoo running tests
      my machine is at 365 Chrome processes, 550 process and 3180 threads
      total (should be ~160 and ~700 with 2 chrome processes at most).
      
      Instead, ask the OS to ask for a devtools port, then close the socket
      and pass that to the child process. There's a race of sort for the
      instant between closing the socket and Chrome reopening it, but:
      
      * the window is very short
      * we got a random port from the ephemeral range, it's possible
        somebody else gets it inbetween but unlikely (the 50% on a birthday
        attack is 200 for Linux's ephemeral range, it's a somewhat lower 150
        for the IANA range used by BSDs and Windows)
      
      Sadly chrome doesn't stop if it can't bind to the port it's given.
      
      closes odoo/odoo#42096
      
      X-original-commit: 897ded1c
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      1eaabb2f
    • qsm-odoo's avatar
      [FIX] website, *: fix tabs breaking when increasing number of columns · a8e2e7dd
      qsm-odoo authored
      
      * web_editor
      
      Previously, increasing the number of columns on the tabs snippet would
      cause the newly created tabs to toggle the original tabs instead of its
      own, this was caused by an oversight where the columns were clone
      directly using jQuery, and the snippets' the onClone method was not
      called on the newly created columns (here, tabs). This commit move the
      responsibility to clone onto the SnippetsMenu so that it can create the
      appropriate snippetEditor if needed and call its onClone method.
      
      task-2070643
      
      closes odoo/odoo#41909
      
      X-original-commit: 5876e01c
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      a8e2e7dd
    • Nicolas Martinelli's avatar
      [FIX] account: loop correctly · 0d6a370f
      Nicolas Martinelli authored
      
      opw-2157568
      
      closes odoo/odoo#42086
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      0d6a370f
    • jev-odoo's avatar
      [FIX] payment_paypal: Less confusing transaction logs · 11fae5c0
      jev-odoo authored
      
      Before this commit, the log displayed "set as done"
      before actually trying to put the transaction in done.
      If an error then occurred in the'_set_transaction_done'
      function and the transaction could not be processed,
      this could lead to a misinterpretation of these logs.
      
      This log is therefore moved after the transaction is
      processed and is only displayed if it is actually successful.
      
      This is valid for'done','pending' and'cancel'.
      
      closes odoo/odoo#42078
      
      X-original-commit: dd7552b1
      Signed-off-by: default avatarjev <jev-odoo@users.noreply.github.com>
      11fae5c0
  8. Dec 17, 2019
  9. Dec 18, 2019
  10. Dec 12, 2019
  11. Dec 17, 2019
  12. Dec 16, 2019
  13. Dec 17, 2019
  14. Dec 10, 2019
  15. Nov 20, 2019
  16. Dec 16, 2019
  17. Dec 12, 2019
  18. Dec 16, 2019
    • Nans Lefebvre's avatar
      [FIX] base: add extension to downloads without filenames · 77faf95a
      Nans Lefebvre authored
      
      The filename can be obtained in 3 ways when downloading a file, in order:
      - by the filename argument
      - by the filename_field argument
      - a default one is computed as backup.
      
      In the last case, there is by construction no file extension.
      The filename is made from the record's model name, id and field.
      However the model name almost certainly contains a ".",
      which is the standard extension separator for filenames.
      As a result <model_name_end-id-field> is considered to be the existing
      extension, so we don't try to guess it from the mimetype.
      
      To keep the existing default filename convention, we always add the
      guessed extension in this case.
      
      opw 2149612
      
      closes odoo/odoo#41917
      
      X-original-commit: f62a49a2f83bcce66eb9c3b08687ee5a37def503
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      77faf95a
    • Nicolas Martinelli's avatar
      [FIX] stock_account: delete COGS when set to draft · 84cb3b9c
      Nicolas Martinelli authored
      
      - Create a product A, FIFO & Automated
      - Create a SO, deliver and invoice
      - Post the invoice
      - Reset it to draft
      - Post the invoice again
      
      The COGS lines are duplicated.
      
      Unlike the other lines, the COGS lines are only added at posting. This
      is done in case several invoices are generated in draft, but validated
      in an arbitrary order.
      
      We clean up the COGS lines when resetting to draft.
      
      opw-2153695
      opw-2152465
      
      closes odoo/odoo#41915
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      84cb3b9c
    • Jason Van Malder's avatar
      [FIX] payment: fix ecommerce blinking "Pay now" button · 76a0e4fe
      Jason Van Malder authored
      
      Issue
      
          - Install e-commerce
          - Add stripe as payment acquirer
          - Go in website > shop
          - Add something in your cart and process checkout
          - In developer tools > network set online to slow 3g
          - Spam the pay now button
          - Go in Website > Configuration > Ecommerce > Payment Transactions
      
          Multiple transactions have been created for your order.
      
      Cause
      
          The pay now button doesn't stay disabled during the payment process.
      
      Solution
      
          Disable the button and enable it only when the process is done.
      
      OPW-2148899
      
      closes odoo/odoo#41860
      
      X-original-commit: 2d63d8165b96fc5cb3118fdc16aadbafd8ee9963
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      76a0e4fe
Loading