Skip to content
Snippets Groups Projects
  1. Feb 01, 2021
    • Christophe Monniez's avatar
      [FIX] packaging: add a bom to nsi script · d29c70a1
      Christophe Monniez authored
      
      When using the windows installer in French language, the `Hôte` label
      used to configure postgresql server does not display correctly.
      
      The LangString documentation does not specify how to use the special
      characters but after some tests, specifying a BOM for the nsi file seems
      to be the way to go.
      
      closes odoo/odoo#65365
      
      X-original-commit: 3d0871d1
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      d29c70a1
    • Romain Estievenart's avatar
      [FIX] web: Auto close dropdown is broken · 7cb24db6
      Romain Estievenart authored
      
      Steps to reproduce:
      1. Go to Project App
      2. Open and edit a task
      3. Click on Customer => search more
      5. Click on "Filters"
      6. Click on "Group by"
      => The "Filters" and "Group by" dropdown are open at same time => bug
      
      Since odoo/odoo@e4f87710e16357f24f388159a7b1e82eccda598a, we added a way
      to prevent bs and owl dropdown to be open in the same time.
      
      But when the web-editor is present, the CSS selector used to match the
      opened modal ("search more" in this case) conflicts with the DOM created
      by the web-editor  (modals identified by the classes: .web-editor,
      .note-picture-dialog, .note-link-dialog, .note-help-dialog).
      
      To avoid this conflict, this commit uses a more restrictive CSS selector
      to match only the first (active) opened modal (as web-editor doesn't
      attach its modals at the root of the body).
      
      closes odoo/odoo#65274
      
      Signed-off-by: default avatarPierre Paridans <pparidans@users.noreply.github.com>
      7cb24db6
    • John (jol)'s avatar
      [FIX] account: remove constraint on bank statement line amount = 0 · ee4f7df8
      John (jol) authored
      
      A former constraint made it impossible to import bank statements with lines = 0.
      The task #2403369 removed that constraint.
      But the user could no longer reconcile Bank Statement Lines = 0.
      
      Drawbacks :
      - The user is then blocked when setting a lock date.
      - The bank statement remains endlessly in Status Processing
      
      A previous fix made a bank statement line = 0 immediately reconciled.
      
      Closes task #2449127.
      
      closes odoo/odoo#65269
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      ee4f7df8
    • nie's avatar
      [FIX] hr_attendance: user can see other users attendances · 036992d2
      nie authored
      
      Steps:
      - As admin, go to Settings > Users & Companies > Users
      - Edit Mark Demo (demo)
      - In Human Resources > Attendances, select Manual Attendance or blank
      - As demo, go to My Profile
      - Click the smart button showing the hours worked for the last month
      - Remove all filters
      
      Bug:
      The demo user, who hasn't the rights to see the other employees
      attendances, can see them.
      
      Explanation:
      Every user must have the right to read attendances in order to see their
      own attendances. Not giving the users the read rights in the security
      record rule prevents the record rule from being applied when reading
      attendances. This makes the read access rights the only rule and allows
      everyone to see the attendances of the others.
      
      This commit also fixes the default selected employee when going to the
      attendances tree view on these paths:
      - User
      - Employee
      - User > Employee
      
      In fact, sometime, `active_id` is the ÌD of the user and not of the
      employee. This leads to incorrect results since another employee's
      attendances are shown.
      
      Finally, this commit prevents users from creating attendances from other
      apps since only attendance officers and above can have access to the
      creation form within the Attendances app.
      
      opw:2440117
      
      closes odoo/odoo#65330
      
      X-original-commit: b3247c81
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      036992d2
    • Anh Thao Pham (pta)'s avatar
      [FIX] pos_cash_rounding: fix cash rounding for cash method only · d207a0fb
      Anh Thao Pham (pta) authored
      
      - Go to Point of Sale > Configuration > Settings & enable "Cash Rounding"
      - Configure POS:
        * Enable Invoicing
        * Enable "Cash Rounding" and "Only on cash methods"
        * Select 0.05 HALF-UP Rounding Method
      - Start POS session
      - Select a Product and change its Price to a value that should be rounded (i.e. $ 16.51)
      - Select a Customer
      - Proceed to Payment
      - Enable Invoice
      - Select Bank Payment method
      - Validate
      No rounding is applied as expected, but the rounding line still appears on printed Invoice.
      
      opw-2449222
      
      closes odoo/odoo#65317
      
      X-original-commit: b0eb0fe0
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      d207a0fb
    • Olivier Dony's avatar
      [FIX] registry: prevent inherited phantom cache clears · 3585c2c3
      Olivier Dony authored
      
      This patch complements the previous one by ensuring that any
      `cache_invalidated=True` flag inherited from the master process
      (pre-fork mode) cannot trigger a cache clear.
      
      This could occur when the first request is served, because the flag was
      never clear in the master process, which never server any request.
      
      At the end of `check_signaling()`, the local cache has either been
      cleared because a (real) increment of the cache sequence was detected,
      or it is considered still valid. The final state of the
      `cache_invalidated` flag should reflect this, by being `False`.
      
      closes odoo/odoo#65303
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      3585c2c3
    • Olivier Dony's avatar
      [FIX] registry: do not signal a phantom cache clear on load · 87aef4e3
      Olivier Dony authored
      During loading, the registry clears all `ormcache` data multiple
      times, in order to ensure consistency with the newly loaded module
      data.
      
      Since 083c70bb, this was done by
      calling `self.clear_caches()`, with the side-effect
      of signalling to all other worker processes that the cache
      *needs* to be invalidated, which is actually untrue.
      
      If the other workers have any reason to reload their own registries,
      they will also clear their own cache in the process - there is no
      need to forcefully invalidate it globally.
      
      One could think that combining the pre-fork mode with the `-d <db>`
      parameter would mitigate this issue, by making all workers inherit from
      a fully loaded registry, In reality it doesn't work, because they also
      inherit from the `cache_invalidated=True` flag, that was never cleared
      in the master process. So despite having a fully loaded registry, the
      newly forked workers will signal a cache invalidation upon serving
      their first request.
      
      Further, in a multi-tenant setup with large numbers of databases,
      registries may be recycled and loaded much more frequently than
      new workers are starting, due to the limited registry LRU, amplifying
      this effect a bit.
      
      ~~
      
      This patch directly clears the cache LRU without going through
      `clear_cache()`, avoiding setting the `cache_invalidated` flag of the
      registry, and thus not signalling to other workers.
      
      This is similar to what was being done before 083c70bb,
      where the LRU was dropped like all other lazy properties.
      87aef4e3
    • Nicolas Lempereur's avatar
      [FIX] im_livechat: smiley feedback correspond to choice · 45ea88e5
      Nicolas Lempereur authored
      When a user on website sends livechat feedbacks:
      
      - Good -> send an average smiley :neutral_face:
      - Average -> send ?? instead of smiley
      
      This is because in e4a4ffb9 value of good (:blush:) was changed from 10 to 5,
      and value for average (:neutral_face:
      
      ) was changed from 5 to 3, but it was not
      reflected in one part of the code.
      
      opw-2447246
      
      closes odoo/odoo#65328
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      45ea88e5
  2. Jan 29, 2021
  3. Feb 01, 2021
    • Martin Trigaux's avatar
      [FIX] hr_holidays: include time in demo data · ada1da9a
      Martin Trigaux authored
      
      All fields not provided default to 0, so the the exact values are
      `%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`.
      Because this is only 2 days it can entirely overlap with a week-end
      (e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and
      triggering an error at confirmation (`"The following employees are not
      supposed to work during that period"`).
      
      Change familly trip as the same issue would occure in May 2021
      
      closes odoo/odoo#65314
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      ada1da9a
  4. Jan 31, 2021
  5. Jan 29, 2021
  6. Jan 30, 2021
  7. Jan 29, 2021
    • Arnold Moyaux's avatar
      [FIX] mrp_account: wrong kit cost · 827f65f7
      Arnold Moyaux authored
      
      Usecase to reproduce
      - Create a KIT with COMP A (15$) COMP B (25$)
      - Enable Margin on SO
      - Set the cost on the KIT with compute cost button (40$)
      - Create a quotation with the KIT (cost is correct 40$)
      - Confirm the quotation -> Cost is updated to 15$ (first component)
      
      It happens because the function to compute the average price doesn't
      expect a kit and compute everything from the valuation layer of first
      component
      
      opw-2413246
      
      closes odoo/odoo#65292
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      827f65f7
    • Laurent Smet's avatar
      e63fef32
    • Christophe Monniez's avatar
      [FIX] packaging: update rpm packaging for fedora 32 · a8deb1dd
      Christophe Monniez authored
      
      As Fedora 32 was the current release when Odoo 14.0 was released, this
      should be the supported version.
      
      Also, a few  old libs were still in mentioned in the packaging files.
      They flew under the radar because they never broke the packaging.
      This is not the case anymore, those libs disappeared from the Fedora
      repos.
      
      It seems that pyparsing is not used anymore since 5a1c06a1 and thus can
      be safely removed from `requirements.txt` too.
      
      pychart is not used anymore since 3425752e.
      
      While at it, remove mix of tabs and spaces in package.dffedora, also add
      missing packages to avoid installation at test time.
      
      Now that I started down the slippery slope, also removed some `-dev`
      packages in package.dfsrc as wheel's are available.
      
      Finally, the rpm install script now detects the python ABI version in
      order to avoid update this file at each ABI change in Fedora.
      
      Fixes #63719
      
      closes odoo/odoo#65224
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      a8deb1dd
  8. Jan 28, 2021
  9. Jan 24, 2021
  10. Jan 20, 2021
  11. Jan 29, 2021
  12. Jan 26, 2021
    • nie's avatar
      [FIX] stock_account: correct forecast report total amount and currency · 67d975be
      nie authored
      Steps:
      - Go to Settings > Companies > Manage Companies
      - Create a company (1) with a different currency than the one you're in
      - Go to inventory > Products > Products > Create a product (2)
        - Storable Product
        - Cost: 10
      - Click Update Quantity
      - Create a new quantity line with 1 in On Hand Quantity
      - Switch to company (1)
      - Go to Inventory > Products > Products > Edit product (2)
        - Storable Product
        - Cost: 15
      - Click Update Quantity
      - Create a new quantity line with 1 in On Hand Quantity
      - Go back to the product
      - Click the "Forecasted" smart button
      
      Bug:
      Traceback here:
      https://github.com/odoo/odoo/blob/47bfdf0592a5dd93870ca1a9da326351d70087bb/addons/stock_account/report/report_stock_forecasted.py#L17
      
      
      ValueError: Expected singleton: res.currency(2, 1)
      
      Explanation:
      The amount is the sum of the `stock.valuation.layer`s of a product
      across all companies and these companies may have different currencies.
      
      This commit scopes the computation of the amount inside the company of
      the current warehouse.
      
      Also the `stock.quant` values displayed in the "On Hand" report are not
      correct for the other companies when displaying their data by selecting
      all the checkboxes in the global company dropdown.
      This commit also fixes the amounts in the On Hand view by using the
      standard price per company and attributing the correct currency to the
      `stock.quant`.
      
      opw:2444593
      
      closes odoo/odoo#64942
      
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      67d975be
  13. Jan 28, 2021
  14. Jan 25, 2021
  15. Jan 28, 2021
  16. Jan 25, 2021
  17. Jan 28, 2021
  18. Jan 27, 2021
  19. Jan 21, 2021
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] point_of_sale: change pricelist remove price extra (variant) · 323d2937
      Andrea Grazioso (agr-odoo) authored
      
      Create a product with variants attributes that NEVER create variants.
      Configure Variants to add some extra-prices to some variants.
      In POS settings activate "Product Configurator" and
      "Advanced Pricelists", add the public pricelist and one that applies 5% to
      the product.
      
      Open a session and select the product created (say price = 1$)
      Select the attributes, the extra-price is added to the product (say the
      total price now is 2$).
      Change pricelist from public to 5% and the order line will show our
      product = 0.95, not taking the extra-prices into account (so not 1.9,
      i.e. 5% of the 2$ that were formerly displayed)
      
      opw-2439445
      
      closes odoo/odoo#64861
      
      Signed-off-by: default avataragr-odoo <agr-odoo@users.noreply.github.com>
      323d2937
  20. Jan 27, 2021
  21. Jan 28, 2021
    • Nicolas Lempereur's avatar
      [FIX] web: nested x2many with no widget and onchanges · 4212f84d
      Nicolas Lempereur authored
      
      Let's assume the following situation: in a form view, there is a
      one2many field A displayed as a list (non editable). In the list,
      there is another one2many field B displayed with no widget (it
      basically displays "X records"). In A's form view, B is also
      displayed, but this time as a list.
      
      There is an onchange on the main form view that adds a line in A,
      (and simply sets B to [[5]], i.e. 'No record').
      
      Before this commit, if the user opened the newly added sub record in
      A, and clicked on 'Add a line' of B, it crashed.
      
      The cause of the crash was that the wrong viewType was used to
      create the new (default) record in B: it used the original
      viewType, which was undefined (B is displayed with no widget in
      A's list). With this commit, we use the viewType of B that is used
      to edit it, in this case 'list'.
      
      In the slighlty different scenario where B is displayed with
      widget many2many_tags in A's list, there were no crash, but wrong
      fieldNames were sent to the 'default_get' RPC. As a consequence,
      default values for fields in B's list were potentially not loaded.
      
      opw-2422806
      closes #64793
      
      closes odoo/odoo#65157
      
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarAaron Bohy <aab@odoo.com>
      4212f84d
Loading