Skip to content
Snippets Groups Projects
  1. Jan 29, 2021
    • 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
  2. Jan 28, 2021
  3. Jan 24, 2021
  4. Jan 20, 2021
  5. Jan 29, 2021
  6. 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
  7. Jan 28, 2021
  8. Jan 25, 2021
  9. Jan 28, 2021
  10. Jan 25, 2021
  11. Jan 28, 2021
  12. Jan 27, 2021
  13. 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
  14. Jan 27, 2021
  15. 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
  16. Jan 25, 2021
  17. Jan 22, 2021
    • Xavier Morel's avatar
      [IMP] tours: make chrome request a websocket port from the OS · b4e12c46
      Xavier Morel authored
      This should be a smarter and properly reliable version of #42071: in
      that, the runner requests a port, closes it, and gives the port to
      Chrome. However this apparently turns out to be less reliable than
      hoped for and the port we just released can immediately be picked up
      by somebody else (the original PR assumed the allocation of ephemeral
      ports would be random or FIFO but that may not be the case, especially
      inside containers).
      
      This uses the same technique of requesting port 0 so the OS allocates
      one, but it's Chrome requesting & immediately connecting so there
      should be no race condition possible, and we keep the property that as
      long as ephemeral ports are available Chrome will be able to open one
      without conflicts or overlaps.
      
      This leaves the issue of *retrieving* the port chrome got. Thankfully
      it turns out we use a custom user-data-dir in which case Chrome writes
      the port it got to `$DATA_DIR/DevToolsActivePort`[0]. Despite the
      file's name it *also* contains the path for the devtools endpoint so
      we need to only read the first line (rather than be able to read and
      intify the entire thing).
      
      Wait up to 10s before giving up entirely, and wait 100ms between each
      check for the file's existence: on my machine without significant load
      the file appears after 80 to 150ms, waiting up to 90ms seems ok (it's
      not like we're in a super hurry as tours tend to be pretty long).
      
      Other paths explored before moc used his eyes and brain and found out
      about DevToolsActivePort:
      
      * Chrome prints ws URL on the stderr, however because we don't know
        how much garbage Chrome might send there we need to send it to a
        continuous sink otherwise Chrome *might* end up blocking on its
        stderr because we're not reading from it. This turns out to be a bit
        of a mess of processes or additional threads.
      * xdo suggested we check what ports Chrome listens on using something
        like netstat/ss (turns out `psutil` has support for that OOTB),
        which worked great except on WSL (where it didn't work at all), and
        the future-proofness was a bit questionable as Chrome might add
        other servers in the future.
      * fme suggested using socket activation support[1] and passing in the
        port we'd opened without closing it, which would really have been
        ideal, however it turns out it was removed a few months later when
        chrome added pipes support[2], which was a pain to realize as chrome
        doesn't exactly do any useful error reporting (so unknown options
        just disappear into a void to be never seen or heard of ever).
      * And while the pipes system[3] has *serious* positive attributes
        (even lower initialization overhead, we could remove the websocket
        dependency, also avoids wasting sockets though that's not too much
        of an issue here) it would require rewriting a lot more than just
        the initialization as it uses its own logical protocol
        (NUL-terminated JSON). TBF most of the messaging stuff is properly
        contained into just a few `_websocket` methods but still...
      
      [0] https://bugs.chromium.org/p/chromium/issues/detail?id=624837#c4
      [1] https://bugs.chromium.org/p/chromium/issues/detail?id=624837
      [2] https://chromium-review.googlesource.com/c/chromium/src/+/954405/3#message-ab7415a7db7b94787300d987216e9ce60db47bc2
      [3] https://chromium-review.googlesource.com/c/chromium/src/+/954405/3
      
      
      
      opw-2378464
      
      Replaces #64758
      
      closes odoo/odoo#64844
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      Co-authored-by: default avatarXavier Dollé <xdo@odoo.com>
      Co-authored-by: default avatarChristophe Monniez <moc@odoo.com>
      b4e12c46
  18. Jan 27, 2021
  19. Jan 26, 2021
    • Adrien Widart's avatar
      [FIX] stock: automatic orderpoint creation · a9d5bd2e
      Adrien Widart authored
      
      When checking the replenishments, it sometimes creates a new reordering
      rule for a product while another already exists.
      
      To reproduce the error:
      (Need purchase,sale_management)
      1. Create a product P
      	- Must be storable
      	- In Purchase tab, add a vendor
      2. Create a reordering rule for P
      	- Trigger: Manual
      	- Min: 0
      	- Max: 0
      3. Create+Confirm a SO with P
      4. Go to Inventory > Operations > Replenishment
      5. On P-product's line, click on "Order Once"
      6. Confirm the generated RfQ
      7. Repeat 3-4
      
      Error: There are now two lines for P-product. A second reordering rule
      has been automatically created but the first one does already the job.
      
      OPW-2431780
      
      closes odoo/odoo#65040
      
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      a9d5bd2e
Loading