Skip to content
Snippets Groups Projects
  1. Jul 22, 2020
  2. Jul 17, 2020
    • Samuel Degueldre's avatar
      [FIX] web_editor: add index on original_id to improve delete performance · 2e81f53a
      Samuel Degueldre authored
      
      In #45174, the original_id field was added on ir.attachment, so that
      derived images in the web-editor (cropped, resized, optimized, ...)
      could keep a trace of the original, such that if the user wanted to
      revert it or change the crop/size/optimization parameter, we could do it
      from the original again so that for example the quality can be increased
      or the crop region made bigger.
      
      The addition of this self-referencing many2one from ir.attachment to
      itself however will cause DELETE queries on ir.attachment to do a
      sequential scan on the table to update potential records referencing the
      deleted record in their original_id field. As the ir.attachment table
      tends to be one of the biggest tables in production databases (millions
      of records), this scan can take multiple seconds per DELETE operation,
      and since attachments are used everywhere in odoo to represent files,
      DELETE operations on them are frequent.
      
      Adding an index on the original_id field should make these DELETE
      operations substantially faster (scaling with the log of the number of
      filled original_id fields, which will be very small, instead of scaling
      linearly with number of records)
      
      closes odoo/odoo#54676
      
      X-original-commit: 2b5064a00b7a5c8dc66429869287386f244b1257
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      2e81f53a
  3. Jul 16, 2020
  4. Jul 15, 2020
    • Christophe Simonis's avatar
      [FIX] website_sale: browse fiscal position in sudo · 6d625005
      Christophe Simonis authored
      
      The tax mapping is only readable by internal users. As the calling
      method can be used by portal routes, we should browse the fiscal position
      in sudo mode.
      
      closes odoo/odoo#54524
      
      X-original-commit: 46e9a9683967600c55bf43895740fff1d61eb49b
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      6d625005
    • Nicolas Martinelli's avatar
      [FIX] purchase_stock: fallback on seller · 817de24a
      Nicolas Martinelli authored
      
      - Create a product with routes MTO + Buy.
      - Create a vendor pricelist with a minimum quantity:
        Min. Qty 1000 for 10 USD
      - Create a SO, sell 1000 quantity
        => A PO is created automatically in draft.
      - Go back to SO and update quantity to 1200.
      
      The following message pops up: "There is no matching vendor price to
      generate the purchase order for product..."
      
      We select the supplier based on the procurement quantity, which is lower
      than the minimum quantity of the supplier.
      
      To avoid this situation, we fall back on any supplier like it was the
      case in v12.
      
      opw-2297001
      
      closes odoo/odoo#54526
      
      X-original-commit: 4d4913fc
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      817de24a
  5. Jul 17, 2020
    • oco-odoo's avatar
      [FIX] account: make assignation of tax repartition and tags work in bank... · 6df72a53
      oco-odoo authored
      [FIX] account: make assignation of tax repartition and tags work in bank reconciliation widget and on misc operations
      
      Bank reconciliation widget allows creating a writeoff with tax lines, in order to simulate both the invoice and the payment into a single entry, from one statement line. Before this fix, the tax repartition used by this feature was always the one defined for invoices. Also, in some cases, the amounts reported in the tax report had the wrong sign, because of the way the tax report applies the sign multiplicator on lines' balances. This multiplicator cannot be computed properly from a payment or miscellaneous operation, so we need to rather impact the sign of the tags directly.
      
      With this fix, we guess whether or not we are refunding something from the data entered by the user, and modify the signs of the tags accordingly so that the tax has the same impact on the report as it would have had with an invoice doing the same operation.
      
      closes odoo/odoo#54691
      
      X-original-commit: ac2662b67c878eb2ef6e9462a0e6c9f1fbdb6adb
      Related: odoo/enterprise#11948
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      6df72a53
  6. Jul 16, 2020
  7. Jul 20, 2020
  8. Jul 17, 2020
  9. Jul 13, 2020
    • Martin Trigaux's avatar
      [FIX] gamification: use right field on goal domain · 49fc1979
      Martin Trigaux authored
      
      There is no field 'ids' on a gamification.goal, but one called 'id'
      Without this commit, calling _get_serialized_challenge_lines (or
      indirectly, calling report_progress) with a non-empty subset_goals was
      failing due to an invalid domain.
      This is not supposed to happen on standard flow but can be triggered
      with manual modification of date fields and refreshing a challenge.
      
      Fixes odoo/odoo#25913
      
      closes odoo/odoo#54387
      
      X-original-commit: 1e3483d2
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      49fc1979
  10. Jul 17, 2020
  11. Jul 16, 2020
  12. Jul 17, 2020
    • std-odoo's avatar
      [FIX] website_event: fix ACL issue during registration · 89a2423c
      std-odoo authored
      
      Bug
      ===
      Register to an event with a public user.
      Sometimes an ACL error will be raised.
      
      Technical
      =========
      Before flushing the environment (after the creation of the event
      registration in the endpoint `registration_confirm`), the ORM will
      recompute all needed stored fields. As we didn't write on some of them
      (`date_closed`, `utm_campaign_id`, `utm_source_id`, `utm_medium_id`)
      they are in the list `Environment::all.tocompute`. So, the ORM will recompute
      the fields even if the state didn't change (this behavior can be verify
      in `BaseModel::recompute`). This is done after the "create" call of the
      event registration and so without the SUDO flag.
      
      Task-2299227
      
      closes odoo/odoo#54624
      
      X-original-commit: 38f37cd483b7907b20171e2c44e14e69e3e00596
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      89a2423c
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: touch events are passive and allow resize with touch events · ce8cb110
      Joseph Caburnay authored
      
      1. Methods associated to touchmove and touchstart listeners should not
      call preventDefault because they are passive by default. Calling preventDefault
      will do nothing but in chrome browser, error message is issued.
      2. We now allow resize based on touch events.
      
      closes odoo/odoo#54612
      
      X-original-commit: c6b7133d9c9dc52a8d283124b5a4497940e54682
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      ce8cb110
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: no need for disableRubberbanding · f6f1ea6f
      Joseph Caburnay authored
      The primary goal of disableRubberbanding is to disable scrolling during
      touch event by default and to allow only selected descendants to have scrolling
      active during touchstart+touchmove event. Only elements with class="touch-scrollable"
      are allowed for touch scrolling. This restriction can be a good idea but it
      results to bug-ridden explicitness which is not necessary because scrolling
      should be allowed automatic by default in the first place. In this commit, we
      allowed scrolling by default by:
      
      1. We remove disableRubberbanding.
      2. We set the position property of .pos to fixed. This is to accomplish the
      original goal of disableRubberbanding (fixing the root element in its position).
      3. We remove the touch-scrollable class as they are not needed anymore and
      no style associated to it.
      
      Removing the disableRubberbanding method also fixes the Intervention error during
      touch scrolling event. The reason for that error is we are calling preventDefault
      in the event that is passive. touchmove and touchstart events are passive by default
      - which means that preventDefault won't work.
      
      X-original-commit: 54f7fb49dae3aab6a005402a1ac60262bbd15edc
      f6f1ea6f
Loading