Skip to content
Snippets Groups Projects
  1. Mar 31, 2021
  2. Mar 30, 2021
  3. Mar 31, 2021
    • Romain Derie's avatar
      [IMP] web_editor: add error support for too big image files · 603ace19
      Romain Derie authored
      ValueError is raised when image resolution is too big (over 45e6[1]).
      
      [1]: https://github.com/odoo/odoo/blame/4c91e895a98642f10bd1d2d46819705edc38f638/odoo/tools/image.py#L47
      
      Part of https://github.com/odoo/odoo/pull/65828
      
      
      task-2345082
      
      closes odoo/odoo#65828
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      603ace19
    • Romain Derie's avatar
      [IMP] web_editor: show error if uploaded image type is not suported · 9dab9ffc
      Romain Derie authored
      We only support .gif, .jpe, .jpeg, .jpg, .png, .svg
      
      This commit won't let the code go though if we know the image format is not
      suported.
      
      Part of https://github.com/odoo/odoo/pull/65828
      task-2345082
      9dab9ffc
    • Romain Derie's avatar
      [IMP] web_editor, *: show a progress bar on image upload · 0d6cdeef
      Romain Derie authored
      *: web, web_unsplash
      
      Without this commit, the user had no hint to know something was actually
      being performed.
      It would be worst when uploading multiple image at once, eg in image
      wall, as it could take some times for the images to be processed and
      uploaded.
      
      The user now has a visual hint about the upload progress through a
      toaster and some progress bars.
      
      For unsplash, note that as the actual image download is performed S2S,
      the progress bar will automatically jump to 100%, then will wait for the
      RPC success once the server is done to show a success progress bar.
      
      Part of https://github.com/odoo/odoo/pull/65828
      task-2345082
      0d6cdeef
    • Romain Derie's avatar
      [IMP] web_editor: whitelist supported image formats in URL · 185c50a7
      Romain Derie authored
      Only allow URL ending with extension of supported image formats.
      Don't let anything else goes though, so we remove the magic behavior
      that was uploading a non-image url as a document.
      
      Part of https://github.com/odoo/odoo/pull/65828
      task-2345082
      185c50a7
    • Romain Derie's avatar
      1dc4ca96
    • Rémy Voet (ryv)'s avatar
      [IMP] stock: populate putaway · 69ae63e7
      Rémy Voet (ryv) authored
      
      closes odoo/odoo#63516
      
      Related: odoo/upgrade#2040
      Related: odoo/enterprise#15363
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      69ae63e7
    • yhu-odoo's avatar
      [IMP](sale_)stock,mrp: smart putaway rules · 92e577d1
      yhu-odoo authored
      We introduced new Smart Putaway Rules.
      Locations now can have a storage category, on each storage category,
      we can specify the amount of products/packages(with certian package
      type) that can be stored in the location.
      On putaway rules, we can also set a storage category. Now when apply a
      putaway rule, we will find a suitable child location of the out
      location according to quantity/weight setting on the storage category.
      
      Task 2341820
      PR #63516
      ENT PR odoo/enterprise#15363
      UPG PR odoo/upgrade#2040
      92e577d1
    • yhu-odoo's avatar
      [REF] delivery, stock: make delivery product a new model · 1cd0a138
      yhu-odoo authored
      Currently, delivery packaging and product packaging share the same
      model product.packaging. In this commit, we make delivery packaging
      a new model stock.package.type. The code is also moved to stock
      instead of delivery for compatibility reasons.
      
      Task 2341820
      PR #63516
      ENT PR odoo/enterprise#15363
      UPG PR odoo/upgrade#2040
      1cd0a138
    • yhu-odoo's avatar
      [FIX] stock: don't check parent locations when finding putaway rules · f2b19e4f
      yhu-odoo authored
      Let's say we have location A, B, and C. A is the parent of B, B is the
      parent of C. And we have a putaway rule to move product from A to B. Now
      receive product at C, because currently when we can't find a putaway
      rule at one location, we will loop to check its parent locations. So the
      puteaway rule A -> B will be found, and product received at C will in
      the end be stored at B.
      After this commit, we don't check the parent locations when we can't
      find a putaway rule.
      
      Task 2341820
      PR #63516
      ENT PR odoo/enterprise#15363
      UPG PR odoo/upgrade#2040
      f2b19e4f
    • Odoo's Mergebot's avatar
      [MERGE] web: fix quick edit tests mcm · 6e972e79
      Odoo's Mergebot authored
      
      This PR is two-fold. First, it removes a cause non-deterministic failing
      builds. The cause was the setTimeout for the quick edit event in FormController
      which waits at least 1 tick even if timeout = 0 like in those tests. Now, if this
      timeout is 0 then we bypass the setTimeout.
      Second, we ensure that the delay is patched to 0 for every tests, and allow
      to set it to a specific value is wanted in a given test. Indeed, before this PR,
      a patch done in a module was never unpatched, and some tests executed after
      passed in the whole suite, but failed when executed alone, because they also
      needed the patch.
      
      closes odoo/odoo#68578
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      6e972e79
    • Aaron Bohy's avatar
      [FIX] web: tests: patch form multiClickTime once for all · c89cdcf1
      Aaron Bohy authored
      A lot of tests in different QUnit modules need this delay to be
      patched to 0. Some of them (e.g. the 'ActionManager > Misc' module)
      didn't patch it correctly. It worked before because a patch was
      done in a previous test, and wasn't unpatch. The previous commit
      ensures the patch is removed, so now we have at least 2 tests of
      the above mentionned module that fail. This commit ensures that
      the delay is patched in every tests, and allows to specify a
      custom delay if necessary.
      c89cdcf1
    • Aaron Bohy's avatar
      [FIX] web: tests: properly unpatch after test · a3937cfd
      Aaron Bohy authored
      For testing purpose, the multi-click timeout delay of the quick
      edit is patched. However, in this specific test, it is patched
      twice (once to set it to 0 in beforeEach, and once to set it to 50
      in the test itself). A single call to unpatch removes the second
      patch (50) but keeps the first one, for the remaining of the test
      suite. This could lead to weird situations where the whole suite
      passes, but a single test executed on its own fails.
      
      Issue spotted in the assets revamp PR, as it alters the test order.
      a3937cfd
    • Michael Mattiello (mcm)'s avatar
      [FIX] web: fix quick edit tests · 7ad8bb2c
      Michael Mattiello (mcm) authored
      Before this commit, quick edit tests could crash in an undetermined way.
      It was due to the setTimeout for the quick edit event in FormController
      which waits at least 1 tick even if timeout = 0 like in those tests.
      Now, if this timeout is 0 then we bypass the setTimeout.
      7ad8bb2c
  4. Mar 30, 2021
    • Yannick Tivisse's avatar
      Revert "[FIX] hr_contract: update date_end when closing contract" · 6c11a1c1
      Yannick Tivisse authored
      This reverts commit 825b533ec964fd8a9923dd4d2091f122b92d8759.
      
      For the following reasons:
      - This is a behavior change on a stable release. See our stable policy:
        https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean
      
      
      - If a contract end date is set, it's erased when moving the contract afterward.
      - There is a cron which is moving the expired contracts automatically,
        this will rewrite the end date on it, which is not a big deal, but this
        is useless.
      - Modifying the contract end date also unlink all the work entries that are
        outside of the new contract period. If there is an open payslip, it also
        recomputes the worked days lines, and the payslip lines.
        That way, it's possible to recompute a payslip by introducing unpaid
        time off inside of it. If the payroll officers are checking the payslips
        at that time, and don't notice it (already checked, etc...), then at the
        validation, this could lead to some more serious issues (wrong net salary
        paid to the employee, wrong accounting entries, wrong declaration to the
        state, etc).
      
      If the contract end date is badly configured, this is normal that the
      reporting is wrong. No need to add some magic that people don't understand,
      that could lead to wrong behaviors later on the process.
      
      closes odoo/odoo#68541
      
      X-original-commit: c34b6bc3d0d25e8b8b1bcb6684331627b823f57d
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      6c11a1c1
    • Yannick Tivisse's avatar
      [FIX] resource: Correctly pass domain if set · cf7e3860
      Yannick Tivisse authored
      
      closes odoo/odoo#68536
      
      X-original-commit: 62a01fa6ff2f1f078b333f5d8bb16d73d0921bdb
      Related: odoo/enterprise#17371
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      cf7e3860
    • Rémy Voet (ryv)'s avatar
      [REF] stock: remove `_product_available` method · 20b58fc7
      Rémy Voet (ryv) authored
      
      This method is useless and it bypass the computation of some fields
      (qty_available, virtual_available, incoming_qty, outgoing_qty). Then
      this method is not cache-friendly, and we should use `read` instead.
      
      task-2439019
      
      closes odoo/odoo#66621
      
      Related: odoo/enterprise#16584
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      20b58fc7
    • Rémy Voet (ryv)'s avatar
      [REF] stock: cache the `get_warehouse` of `stock.location` · 64caa930
      Rémy Voet (ryv) authored
      To avoid multiple search of the get_warehouse for the same location
      and extra SQL request (it happens a lot for complicate flow, e.g.
      mrp_mps, replenishment report).
      Translate it into a standard compute to use the cache of
      the ORM for no-store compute field (`warehouse_id`) and put
      some depends to be always correct (even if `warehouse_id` shouldn't
      change in the same request).
      
      task-2439019
      64caa930
    • Rémy Voet (ryv)'s avatar
      [REF] *mrp*: batch `_bom_find` · 974c4398
      Rémy Voet (ryv) authored
      Some usage of `_bom_find` are performance bottleneck (one request by
      product). By example, when the mrp is installed, search products
      with fields compute by `_compute_quantities` (e.g. 'Negative forecasted
      quantity'). it is due to the override of `_compute_quantities`
      in mrp which will make (in the worst case) a `_bom_find` for each
      product in the DB.
      To avoid this situation the `_bom_find` method become batched
      which can handle several products in once. The signature of the method
      has changed and uniformize in all module.
      
      Example performance Gain:
      ------------------------
      In a DB with 7000 products (type 'product'), 500 locations, 1800 BoM,
      9000 Stock moves, etc. Search in the tree view with filter "Negative
      forecasted quantity":
      Before: 10879 (nb SQL request) 12.67 +- 0.11 sec (Total RPC Time)
      After: 159 (nb SQL request) 1.82 +- 0.03 sec (Total RPC Time)
      
      task-2439019
      974c4398
    • Rémy Voet (ryv)'s avatar
      [FIX] product: fix performance tree/kanban views product · 9253643f
      Rémy Voet (ryv) authored
      The compute of `product_variant_count` was highly inefficient
      in batch. It is due to `with_prefetch` which remove the prefetch
      (reset _prefetch_ids = _ids) of the for loop.
      It was added by 05a00fa9
      which fixed performance issue for the 11.0 about
      `sales_count`. But with the new ORM (13.0) compute fields are lazy.
      
      Performance improvements:
      For the search_read of the kanban view (Menu: Sale/Products/Products)
      with the default pagination (80 items):
      Before: 347 SQL request and 0.31 +- 0.2 sec (Python and SQL time)
      After: 110 SQL request and 0.14 +- 0.2 sec (Python and SQL time)
      
      task-2439019
      9253643f
    • Khalid El Haji's avatar
      [CLA] signature for khalidelhaji · 5dee24c6
      Khalid El Haji authored
      
      closes odoo/odoo#68558
      
      X-original-commit: 610e1cea
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      5dee24c6
    • Jérémy Hennecart's avatar
      [IMP] calendar(_sms): add template selection on reminders · 4a616e1a
      Jérémy Hennecart authored
      
      The purpose is to allow the user to have the opportunity to manage what is
      going to be send as reminders. He can now access to the template or create
      a new one when the type of reminder is email or sms. In case of a simple
      notification, a new text field is added to add custom content.
      
      Task ID-2191254
      COM PR odoo/odoo#68443
      UPG PR odoo/upgrade#2313
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4a616e1a
    • Jérémy Hennecart's avatar
      [REF] calendar: prepare alarm communication configuration · f87a0eb7
      Jérémy Hennecart authored
      Purpose of this commit is to ease sending mail to attendees using template
      by using a template record instead of an xml id. Indeed this allow having
      flows using a configurable template instead of an hardcoded one.
      
      Code in calendar_sms is split into main models to ease future improvements
      related to SMS.
      
      Taks ID-2191254
      COM PR odoo/odoo#68443
      f87a0eb7
  5. Mar 25, 2021
    • Qiuyu (QHO)'s avatar
      [FIX] mail: unfollow only if the partner is in the channel · 502e89ed
      Qiuyu (QHO) authored
      
      Before the commit, `_action_unfollow()` can be called by
      `_message_receive_bounce()` and then multiple leave notifications
      can be sent even if the partner has been removed from the channel,
      when the partner is a follower of the channel and without a
      valid email address.
      
      Unfollow action should also remove the partner from the followers,
      and only be processed if the partner is still a member of the channel.
      
      Task id: 2456233
      
      closes odoo/odoo#68314
      
      X-original-commit: 5cf22425eb68f15d94a8b283c50198561bbc240a
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      502e89ed
  6. Mar 30, 2021
Loading