Skip to content
Snippets Groups Projects
  1. Nov 22, 2020
  2. Nov 17, 2020
  3. Nov 20, 2020
    • Nicolas Galler's avatar
      [FIX] stock: shipping entire package does not update delivered quantity · 2abc9026
      Nicolas Galler authored
      
      Behavior prior to this commit:
      
      In the following scenario:
      - order of 10 widgets
      - delivery using an entire package of 15 widgets (by adding the package
      under the "Packages" list and checking the "Done" checkbox)
      
      The delivery, when validated, does not update the delivered quantity on
      the sales order, and generates a warning about not shipping enough
      product.  We expect instead the sales order to be updated with the
      actual quantity that was shipped (i.e., 15), and a warning about
      shipping too many products.
      Additionally, when adding the package, the picking reverts to a "Draft"
      state and we have to click "Mark as Todo" again.
      
      Behavior after the commit:
      
      When adding one (or more) entire package in the packages list, and
      marking them as Done, their entire quantity will be marked as Delivered
      on the Sales Order, and no warning about not shipping enough product
      will be shown.  Of note, if the package also contains products that are
      not on the SO, they will be marked as shipped as well (in that case the
      picking will indeed revert to draft since we will have added a new
      product).  However they will not be automatically added to the SO.
      
      Technical details:
      
      When adding a package under the picking it needs to, eventually, reflect
      on a stock move.  Prior to the commit, the system would add a new stock
      move.  This had 2 problems:
       - the generated move did not carry back to the SO,
       - it would flip the picking back to draft (under certain circumstances
       it was possible to circumvent that and have a package level, and a move
       line, that was not tied to a stock move and thus would automatically
       reattach itself when the picking was validated, and sort of work, but
       it was more of a happy accident and relying on the steps being followed
       in a very precise order).
      
      With this commit, we do not generate the stock move as soon as the
      package is added.  Instead, that is done when the picking is marked as
      done, either by relating it to an existing stock move, or by generating
      a new one at this time.
      
      opw-2367893
      
      closes odoo/odoo#62108
      
      X-original-commit: 173bfe6764a554d601d2c7edac2a4c79e2faaa83
      Signed-off-by: default avatarNicolas Galler <ngaller@users.noreply.github.com>
      2abc9026
    • Xavier Dubuc's avatar
      [FIX] mail: prevent multiple send of message by spamming send button · 909b6688
      Xavier Dubuc authored
      
      task-2388702
      
      closes odoo/odoo#61993
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      909b6688
  4. Nov 17, 2020
  5. Nov 20, 2020
    • Nicolas Martinelli's avatar
      [FIX] purchase_stock: fix price difference · beeb83ca
      Nicolas Martinelli authored
      
      1. Create a storable product
      2. Set the category: Costing
         - Method: First In First Out (FIFO)
         - Inventory Valuation: Automated
         - Price Difference Account: Price different accounts.
      3. Create a vendor bill with the product and the quantity set as 0, and set a tax
      4. Post the vendor Bill
      
      A ZeroDivision error is raised.
      
      opw-2375464
      
      closes odoo/odoo#62104
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      beeb83ca
    • Jeremy Kersten's avatar
      [FIX] website_sale: don't crash if website.filter.snippet has been deleted · 9359be0d
      Jeremy Kersten authored
      
      Meanwhile another fix to make these filter more compliant in multi website.
      For now, if you delete website 1 (and filter by cascade) and create website 2
      and try to drop a caroussel product, it will crash because no filter exists.
      
      closes odoo/odoo#62097
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      9359be0d
    • Jeremy Kersten's avatar
      [FIX] website: only toggle view in toggle state · e18c43d2
      Jeremy Kersten authored
      Before this commit, we write on each record the value, whatever the current value.
      Now we check if it is necessary to avoid useless fork.
      
      The first change on header was slowly.
      e18c43d2
    • Jeremy Kersten's avatar
      [FIX] website: non group_system should see the button 'quick create' · 23c643a5
      Jeremy Kersten authored
      Code has been optimized to make only one request in the past (5da1b96f), but
      all modules that replace in the past the groups='base.group_system' by
      groups='website.group_website_designer' has not been adapted.
      
      By consequence, now only a user with group 'system & designer' can see the
      'quick create' button.
      
      We remove the optimization in stable to make the fix with a minimal diff, but
      optimization will be done in master, without forget to adapts all modules this
      time.
      
      task-feedback
      23c643a5
    • Samuel Degueldre's avatar
      [FIX] website_blog: make twitter share string translatable · fab72412
      Samuel Degueldre authored
      Previously the default message when sharing a blog article was
      hardcoded, meaning it was always in English and not translatable, this
      commit fixes that.
      
      Closes https://github.com/odoo/odoo/issues/31173
      
      
      task-2369420
      
      closes odoo/odoo#62070
      
      X-original-commit: 7e7a1edf702e070cf3f690946e5cda90f21a88d8
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      fab72412
    • jev-odoo's avatar
      [FIX] core: incomplete traceback · 65047681
      jev-odoo authored
      
      XML loading always raises a ParseError, however when an XML loading error is triggered from an HTTP request (e.g. a button) the final ParseError logged & shown to the user would not be properly chained to its ancestor, leading the original cause to be lost and issues being much harder to diagnose.
      
      This cause is lost in _handle_exception where we duplicate the exception in order to chain it correctly, the __cause__ of the source exception was not properly copied over, and would thus break the chain.
      
      The fix also requires explicitly chaining the ParseError to its cause, this should not be necessary but the cause is also lost if this is missing, it is not clear why.
      
      opw-2381776
      
      closes odoo/odoo#61914
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      65047681
  6. Nov 18, 2020
  7. Nov 20, 2020
  8. Nov 18, 2020
    • Rémy Voet (ryv)'s avatar
      [FIX] mrp_subcontracting: fix flow with only tracked finished product · 1a34e46e
      Rémy Voet (ryv) authored
      
      Step to reproduce:
      - Create a subcontracting BoM by partner A,
      for a tracked product B (by serial or lots)
      - Create a incoming transfer coming from A and mark as todo.
      - Fill the move with move lines with lot + quantity.
      - It is impossible to validate the transfer, "You need to supply lot..."
      
      Also at the creation of the picking a warning popover indicate that
      the previous operation (the hidden MO) is set after the transfer.
      
      These issues comes from the refactor of mrp for v14 and the part of
      subcontracting wasn't complete obviously.
      
      Fixes done:
      - Rewrite the code of the `_action_done` for subcontracting. It is for
      the case of tracked finished product without any tracked component,
      there wasn't any code to manage that. Now manage it by backorder MO
      feature. Fix the main bug
      - Set finished_date_planned before the transfer to avoid the alert
      popover.
      - Avoid to write activity in channel about the hidden MO in case of
      cancelling.
      - Fix `action_record_components` to manage multiple subcontracting
      products with tracked component.
      - Remove the `priority` field from the wizard MO (in case of tracked
      product. Also the wizard is not really a wizard, just a weird hybrid
      MO form)
      
      PR: odoo/odoo#61606
      task-2357115
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      1a34e46e
  9. Nov 19, 2020
    • Anh Thao Pham (pta)'s avatar
      [FIX] account: fix 0% taxes shown on invoice print · 9e244ae3
      Anh Thao Pham (pta) authored
      
      - Install Invoicing
      - Go to Invoicing > Configuration > Taxes
      - Create a Tax 0% with its own tax group
      - Go to Invoicing > Customers > Invoices
      - Create an Invoice with a line having a normal Tax and several lines with Tax 0%
      - Confirm and print Invoice
      On the Subtotal section of the printed invoice, for the label of the Tax Group of Tax 0%,
      only the amount of the first line having this tax is shown.
      (i.e. "Tax 0% on $ XXX", where XXX should be the sum of all lines on which Tax 0% is applied)
      
      opw-2381051
      
      closes odoo/odoo#61856
      
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      9e244ae3
  10. Nov 20, 2020
    • jev-odoo's avatar
      [FIX] service: rpc call with empty array (php) · 9f97b743
      jev-odoo authored
      
      Before this fix, trying to authenticate via
      xml-rpc call from PHP following the documentation at
      odoo.com/documentation/14.0/webservices/odoo.html#logging-in
      raised an error:
      
          > $uid = $common->authenticate($db, $username, $password, array());
          TypeError: 'list' object is not a mapping
      
      Because PHP doesn't have separate array and mapping types, the
      XML-RPC encoder disambiguates based on the existence of
      key => value pairs, such disambiguation yields an empty xmlrpc
      array for an empty PHP array, which is unexpected on the Python
      side.
      
      Relax the check on the Python side:
      
      * fixing this on the client side requires adding arbitrary and
        meaningless key => value to the empty array to force the
        correct disambiguation which is ugly and weird
      * the example code has been there for a long time, so there's
        probably lots of such PHP code in the wild
      
      opw-2388141
      
      closes odoo/odoo#62077
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      9f97b743
    • Josean Soroa's avatar
      [FIX] mrp: float formatting · 0bebde19
      Josean Soroa authored
      
      Correctly format the `product_uom_qty` with the appropriate widget.
      
      opw-2382517
      
      closes odoo/odoo#62078
      
      X-original-commit: 042298f8
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      0bebde19
    • Paul Morelle's avatar
      [FIX] mail: avoid a stack overflow during loading · 14b1bbb2
      Paul Morelle authored
      
      When the amount of mail messages is big enough (about 1500?), the
      recursion goes deeper and deeper, until the Javascript limit raises an
      infinite recursion error.
      
      This commit fixes the issue by avoiding to run an inner
      _flushUpdateCycle with the update if the change is not needed, so the
      second time that it is reached it does not start a new update, which
      would have run another flush update cycle.
      
      closes odoo/odoo#62076
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      14b1bbb2
    • Didier (did)'s avatar
      [FIX] mail: fix image width inside the chatter · 352e868f
      Didier (did) authored
      
      Web editor hard code the width inside the image html. This `max-width`
      constraint the image inside the chatter and avoid unwanted horizontal scrollbar.
      
      task-2389432
      
      closes odoo/odoo#62073
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      352e868f
  11. Nov 16, 2020
  12. Nov 20, 2020
  13. Nov 18, 2020
    • Arnaud Baes's avatar
      [FIX] hr_holidays: write access for approvers · 7c32f977
      Arnaud Baes authored
      
      Without write permissions, Time Off Managers are unable to approve
      nor refuse leave requests. It seems there was a mismatch with
      `hr_holidays.group_hr_holidays_user` as "Approvers" and actual users
      at some point.
      
      Bug reported via p/feedback by CMO and LEM after v14.0 migration.
      
      closes odoo/odoo#61943
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      7c32f977
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: make `do_unreserve` faster than ever · e7a43655
      Rémy Voet (ryv) authored
      
      `do_unreserve` is a action that can be made in the tree view of
      `stock.picking` but it was very slow and not batched.
      For 80 picking with -/+ 10 `stock.move.line` related each
      (calculate on 5 sample of 80 pickings):
      It took 17947 +- 2741 SQL requests, 7.37 +- 1.09 sec of SQL
      and 8.13 +- 1.31 sec of python execution (+- 15.5 sec in total)
      
      Make some  change to speed up the unreservation of
      multiple picking/move:
      - Batch the call of `_do_unreserve` of move in picking
      - Use OrderedSet instead of RecordSet to reduce the complexity of
      `_do_unreserve`. (Become significant when len(recordset) > 1000)
      - Add `.with_prefetch()` in the unlink of stock move line
      to patch issue with prefetching + unlink + cache.
      - Batch `_recompute_state`
      - Also batch the `do_unreserve` of MO
      
      Result after change in the same samples:
      It take now 1438 +-	20 SQL requests, 0.45 +- 0.02 sec of SQL
      and 0.68 +- 0.02 sec of python execution (+- 1.13 sec in total,
      13 times faster). Note that the gain increase proportionally.
      
      task-2383111
      
      closes odoo/odoo#61879
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      e7a43655
  14. Nov 20, 2020
  15. Nov 19, 2020
  16. Nov 06, 2020
  17. Oct 30, 2020
    • Aurélien Warnon's avatar
      [FIX] crm: change the position of a tour step tip 'bubble' · 878bffce
      Aurélien Warnon authored
      This commit slightly changes the crm tour by changing the position of a tip
      bubble.
      
      During the quick creation (kanban) of a record, the tip text was placed on top
      of the m2o selection proposals, making them hard to read / click.
      We simply moved the tip text to the top of the selection instead.
      
      Task 2373095
      878bffce
Loading