Skip to content
Snippets Groups Projects
  1. Nov 22, 2021
  2. Nov 21, 2021
  3. Nov 19, 2021
    • Raphael Collet's avatar
      [FIX] base_automation: recursive computed field cause too many calls to flush · 7ed7c922
      Raphael Collet authored
      
      The use-case that motivated this fix is the deletion of a project task
      with many subtasks.  The field 'project_id' on tasks is recursively
      computed, and some automated action must be executed when its value
      corresponds to a given project.
      
      The issue occurs when the domain of automated actions is evaluated by
      method search(), because the latter flushes the fields to search on,
      which are also the ones being recomputed.  Combined with the fact that
      recursive fields are not computed in batch, this leads to a huge amount
      of recursive calls between the automated action and flush().
      
      The execution of task.unlink() looks like this:
      - mark 'project_id' to compute on subtasks
      - delete task
      - flush()
        - recompute 'project_id' on subtask1
          - call compute on subtask1
          - in action, search([('id', 'in', subtask1.ids), ('project_id', '=', pid)])
            - flush(['id', 'project_id'])
              - recompute 'project_id' on subtask2
                - call compute on subtask2
                - in action, search([('id', 'in', subtask2.ids), ('project_id', '=', pid)])
                  - flush(['id', 'project_id'])
                    - recompute 'project_id' on subtask3
                      - call compute on subtask3
                      - in action, search([('id', 'in', subtask3.ids), ('project_id', '=', pid)])
                        - flush(['id', 'project_id'])
                          - recompute 'project_id' on subtask4
                            ...
      
      closes odoo/odoo#80114
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      7ed7c922
    • Touati Djamel (otd)'s avatar
      [FIX] mrp: improve mrp BOM report · 0700db23
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a BOM:
          - set the quantity of the finished product and component as more than 1
          - save > print > BOM Structure
      
      Problem:
      The report generated shows the qty and cost for production of 1 unit of product, regardless of the BOM quantity
      
      opw-2691632
      
      closes odoo/odoo#80093
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      0700db23
    • Florian Damhaut's avatar
      [FIX] mrp : Removing a workorder broke the continuity · 81497125
      Florian Damhaut authored
      
      Unlinking a workorder which was in the middle of a chain of workorder created two subchains which both created a product when reaching their new respective ends.
      The issue was solve by assuring that when we a link is remove from a workorder chain, their adjacent workorders are linked together using next_workorder_id
      
      opw-2669514
      
      closes odoo/odoo#79251
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      81497125
    • Wolfgang Taferner's avatar
      [FIX] l10n_at: supplement and fix tags + remove empty tax_ids · 9de58fc6
      Wolfgang Taferner authored
      
      Cash flow tags were supplemented and useless and empty tax_ids removed.
      Additionally account 7990 had a wrongly tag which was corrected.
      
      closes odoo/odoo#80034
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      9de58fc6
    • Tariq Ahmed Khan's avatar
      [CLA] signature for partho222 · a0c938c9
      Tariq Ahmed Khan authored
      
      closes odoo/odoo#79989
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      a0c938c9
  4. Nov 18, 2021
    • Adrien Widart's avatar
      [FIX] pos_resturant: distinguish all order lines · fae78670
      Adrien Widart authored
      In some cases, it is not possible to print the order changes
      
      To reproduce the issue:
      (Use demo data)
      1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
          - Printed Product Categories: Food
      2. Edit the POS Bar:
          - Enable Order Printer
      3. Start a session of POS Bar
      4. Open table T1
      5. Select a Food product and add a note
      6. Submit the order to the kitchen
      7. Select again the same product without any note
      
      Error: The order button isn't green, it is not possible to sent the
      second order line to the kitchen
      
      The issue comes from the logic used in `computeChanges`:
      https://github.com/odoo/odoo/blob/75fb0aa6e9c314b61b30d49b5c463fa126dfc835/addons/pos_restaurant/static/src/js/multiprint.js#L215-L222
      
      
      `old_res` contains the products already sent to the kitchen
      As a result, since the line from step 5 and the one from step 7 have the
      same product, we consider that the new line (step 7) was already
      present. Then, when comparing the quantities, both lines have their
      quantity equal to 1, so we consider there isn't any information that
      should be sent to the kitchen
      
      OPW-2557518
      
      closes odoo/odoo#79526
      
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      fae78670
    • Nasreddin Boulif (bon)'s avatar
      [FIX] website_sale: check combination before add to cart · 81d99313
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce the issue:
      
      - Install "eCommerce" module
      - Create 2 attributes with 'Variants Creation Mode' is Never and
        one of them should have at least 2 values.
      - Create a product and add the two attributes as variants and
        one of them should have at least one value
      - Go to configure variant and select the first attribute and
        exclude one or more values from the second variant
      - Go to the website and change the variant to a value from the one
        you excluded and add to the cart directly (you should be fast).
      
      Issue:
      
        Product with a not possible combination is added to cart.
      
      Cause:
      
        Not checking if the combination is possible before adding to cart.
      
      Solution:
      
        When adding product to cart, if element with class
        ".js_add_cart_variants" is present and have children,
        trigger _getCombinationInfo to retrieve last combination info,
        then add it only if the combination is possible.
      
      opw-2569109
      
      closes odoo/odoo#79780
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      81d99313
    • Kevin Baptiste's avatar
      [FIX] hr_attendance: use correct company in Kiosk mode · ed3003c9
      Kevin Baptiste authored
      
      A wrong company was used in the Kiosk mode, preventing users to check in
      / out.
      
      closes odoo/odoo#79853
      
      Taskid: 2691031
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      ed3003c9
    • Adrien Widart's avatar
      [FIX] stock: transfer the package level to backorder · 68e96ef4
      Adrien Widart authored
      The packages reservations are not correctly done in case of a backorder
      
      To reproduce the issue:
      (Use demo data)
      1. In Settings, enable:
          - Delivery Packages
          - Multi-Step Routes
      2. Edit the warehouse:
          - Outgoing Shipments: 2 steps
      3. In Operations Types > Delivery Order, enable:
          - Show Detailed Operations
          - Move Entire Packages
      4. Create a Pick P:
          - 1 x [DESK0004] Desk
          - 1 x Large Cabinet
      5. Put each product in a separate pack
      6. Validate P
      7. Create a Delivery Order (Planned Transfer):
          - 1 x [DESK0004] Desk
          - 1 x Large Cabinet
      8. Mark as TODO, Check Availability
      9. In Detailed Operations, mark one of the packs as Done
      10. Validate the DO, Create a backorder
      
      Error: The not-yet-done pack is still on the delivery order and its
      status is "Reserved". This line shouldn't be present anymore. Moreover,
      the backorder has a line for this pack, its state is "Draft" (instead of
      "Reserved") and the state of the BO is Ready.
      
      When creating the backorder, the packages levels of the not-yet-done
      moves are transferred to the new picking (i.e., the backorder) However,
      these moves does not have a package level defined (due to
      9d758fa2). Therefore, when checking the
      packs:
      https://github.com/odoo/odoo/blob/e7450bee8f018a5334d9628235824f2fc6f32cec/addons/stock/models/stock_picking.py#L822-L832
      
      
      `package_level_ids` is empty, so a new `stock.package_level` is created
      (instead of using the one of the initial delivery order). And
      `move_lines_to_pack` is empty too, so the new `stock.package_level`
      won't have any move lines and its state will be "Draft"
      
      We should rather transfer the package levels of the moves' lines.
      
      OPW-2659176
      closes #77509
      
      closes odoo/odoo#79953
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Co-authored-by: default avatarAdrien Widart <awt@odoo.com>
      Co-authored-by: default avatarFlorent de Labarre <florent.mirieu@gmail.com>
      68e96ef4
  5. Nov 17, 2021
    • jbw's avatar
      [FIX] account: fix sale entry tax audit · 905567b6
      jbw authored
      
      Before this fix, lines of 'entry' type moves on sale journals would have had their
      tax audit string sign reversed.
      
      closes odoo/odoo#79556
      
      Task: 2687215
      Related: odoo/enterprise#22216
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      905567b6
    • jbw's avatar
      [FIX] account: fix misc reverse tags · fbe03174
      jbw authored
      Before this fix, all moves of type “entry“ were considered as misc operations in regard to repartition tags and the tax report. And only moves of type “out_refund” and “in_refund” were considered refunds.
      Now reverse entries with sale/purchase taxes get their tags set accordingly to repartition lines.
      
      Account                                    D      C      Tax   Tax Grids
      700000 Ventes en Belgique (marchandises)   0      1000   21%   -03
      451000 T.V.A. à payer                      0      210          -54
      400000 Clients                             1210   0
      
      Was reversed to:
      Account                                    D      C      Tax   Tax Grids
      700000 Ventes en Belgique (marchandises)   1000   0      21%   -03
      451000 T.V.A. à payer                      210    0            -54
      400000 Clients                             0      1210
      
      Is now reversed to:
      Account                                    D      C      Tax   Tax Grids
      700000 Ventes en Belgique (marchandises)   1000   0      21%   +49
      451000 T.V.A. à payer                      210    0            +64
      400000 Clients                             0      1210
      
      Task: 2687215
      Part-of: odoo/odoo#79556
      fbe03174
    • jbw's avatar
      [FIX] account: remove unused variables · d80c6418
      jbw authored
      Task: 2687215
      Part-of: odoo/odoo#79556
      d80c6418
    • Audric Onockx (auon)'s avatar
      [FIX] sale_timesheet : fixed Credit Notes for Vendor Bills not taken into... · c584742a
      Audric Onockx (auon) authored
      [FIX] sale_timesheet : fixed Credit Notes for Vendor Bills not taken into account in project overview profitability
      
      Reproduce :
      
      - Install modules Purchase, Accounting, Project, Sales Timesheet
      - In Accounting settings, activate option Analytic Account
      - Create a Project and link it with an Analytic Account
      - Create a PO then Vendor Bill with this Analytic Account
      - Check the Overview for the Project associated with that Analytic Account
      - The amount of the bill will show in the "Other Costs" field of the Profitability section
      - Go back and add a Credit Note for the vendor bill
      
      Issue :
      
      - The amount of the PO still shows in the "Other Costs" section, where it is expected to be balanced (zeroed) by the Credit Note.
      
      Solution :
      
      - Don't take into account the Vendor Bills for whioch a Credit Note exists.
      
      opw-2527655
      
      closes odoo/odoo#79390
      
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      c584742a
  6. Nov 16, 2021
    • alt-odoo's avatar
      [FIX] l10n_fr_fec: correct translation of journal name in FEC export · 8ba4b760
      alt-odoo authored
      
      Before this commit, when exporting the FEC report, we were using the account journal
      name in the initial language set. As it could be confusing for the French administration
      to see names in a foreign language, we should use the user language instead to allow the
      export of FEC report in French even if another default language was used.
      
      closes odoo/odoo#79679
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      8ba4b760
    • Richard deMeester's avatar
      CLA for Willdoo · ca080786
      Richard deMeester authored
      
      closes odoo/odoo#79143
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      ca080786
    • Adrien Widart's avatar
      [FIX] mrp: configure in and out moves of draft MO · 57b3364f
      Adrien Widart authored
      
      In multi steps configurations, the additional products of a MO could be
      missing in the associated picking
      
      To reproduce the issue:
      (Use demo data)
      1. In Settings, enable "Multi-Step Routes"
      2. Update the current warehouse:
          - Manufacture: 2 steps
      3. Create a MO for product "Table Top"
      4. Edit the MO:
          - Add 1 x Screw in the components
      5. Confirm the MO
      6. Open the generated Picking
      
      Error: The operations only contains one line for "Wood Panel". There
      should be a second line for the "Screw"
      
      When adding the new component, a new stock move is created but the
      latter does not have any `group_id` defined. This is the reason why the
      generated picking does not include this stock move.
      
      OPW-2671995
      
      closes odoo/odoo#79759
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      57b3364f
    • Nicolas Martinelli's avatar
      [FIX] base: GC files progressively · dbae5247
      Nicolas Martinelli authored
      
      - Get a database with millions of files in the checklist (do not ask how
        this happened)
      - Set a cron timeout low enough so that `autovacuum_job` times out
      
      The file GC will endlessly timeout without being able to delete any
      file.
      
      This is due to how the `_file_gc` method is built: we first build the
      whole whitelist, then we perform the deletion. With millions of
      checklist files, the loop which builds the `whitelist` takes ages. It
      ultimately leads to a timeout of the scheduled action, and therefore no
      file is deleted.
      
      To avoid this, we delete the files progressively. The checklist is split
      in chunks, and we check which files must be GC'd in a given checklist
      chunk. This way the files are removed even in case of timeout, meaning
      that there will be less files to check during the next run. Eventually
      the GC won't timeout anymore.
      
      closes odoo/odoo#79247
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      dbae5247
  7. Nov 15, 2021
  8. Nov 14, 2021
  9. Nov 12, 2021
  10. Nov 10, 2021
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: pivot: keep subTrees in comparison mode · 21eb4d1a
      Mathieu Duckerts-Antoine authored
      
      Before this commit, when comparing a period P of reference to another one,
      some rows with only data comming from P would not always be presented
      in the table. The problem used to manifest only when loading at least to
      level at the same time (starting from Total or any header via expand all).
      
      The reason is the following:
      - the data comming from P are processed first: starting from somewhere
        in the trees of headers, some nodes linked to the data comming from P
        are progressively created with no children at first, then the children
        (if any) are added later and so on progressively.
      - the data comming from the other period is processed and nodes are
        created with no children and so on in the same way, clearing possibly
        all the node children comming from P.
      
      For example, with
        a row groupby = [field_a, field_b],
        a group [v, v1] from P
        a group [v, v2] from the other period,
      a node corresponding to v would be added, then a node child for v1.
      Then the node for v would be recreated with no children, then a node child
      for v2 would be created. leading to a tree of row headers of the form
      Total > v > v2.
      
      Note that it was not affecting the measure values for the displayed rows
      since those measures are stored separately from the tree and are linked
      to the nodes via some ids.
      
      We fix the problem by avoiding the recreation of a node if it already
      exists.
      
      opw-2635113
      
      closes odoo/odoo#79580
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      Co-authored-by: default avatarAndrea Grazioso <agr@odoo.com>
      21eb4d1a
    • qsm-odoo's avatar
      [FIX] website: add test for onFocus/onBlur flow · dfb0ce4b
      qsm-odoo authored
      
      The flow has been broken multiple times across the years. Let's add a
      test in all stable versions. In 14.0 and 15.0, bugs in that flow have
      been reintroduced in multiple ways, those will be fixed during the
      forward-port of this test.
      
      closes odoo/odoo#79579
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      dfb0ce4b
  11. Nov 09, 2021
  12. Nov 08, 2021
    • luvi's avatar
      [FIX] web: title missing on reload · 842ffc41
      luvi authored
      
      This commit fixes an issue of the webclient where the tab
      was missing the name of the action in the title after a
      fresh load of the page.
      e.g. after a reload or when duplicating a tab in sales, the
      title was 'Odoo' instead of 'S00001 - Odoo'.
      
      closes odoo/odoo#79412
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      842ffc41
    • Guillaume (guva)'s avatar
      [FIX] account: Fix taxes computation in multi-currency · 8d978824
      Guillaume (guva) authored
      
      Steps to reproduce:
      
      - On a company with multi currency
      - Set the company currency rate to 1, and the foreign currency
        to 0.273748
      - Create a vendor bill
      - Set first the foreign currency, then select a product with a
        tax to 21% and a price unit of 155.32
      - Go to 'Journal Items', the 'tax paid' line debit is computed to 119.15
      - Reselect the foreign currency on form.
      - Now the 'tax paid' line debit is computed to 119.16
      
      The total is also impacted as the tax changed.
      
      Explanation:
      
      Before this commit, the taxes was both computed in foreign currency and company currency. However, when setting a new currency or changing the date, the taxes wasn't recomputed but the new conversion rate was applied.
      This commit is fixing the issue by applying the same logic as in 14.0: the taxes are always computed only the foreign currency, then the conversion rate is applied to get the accounting balance.
      
      opw-2569668
      
      closes odoo/odoo#79065
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      8d978824
    • Hardik Prajapati's avatar
      [FIX] website_forum: fix forum back button url from backend · e7dd314e
      Hardik Prajapati authored
      
      Currently, when user open the question from helpdesk ticket and
      user clicks on the back button of the forum page,
      it redirects the user to the app switcher. It happens because the
      back button contains the homepage URL as httprequest.referrer
      does not support the fragment url with hash(#).
      
      so this commit fixes the issue by binding the onclick event on the
      back button so clicking on the back button redirects the user
      to the helpdesk ticket.
      
      task-2602604
      
      closes odoo/odoo#75585
      
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      e7dd314e
  13. Nov 07, 2021
  14. Nov 05, 2021
  15. Nov 04, 2021
    • Touati Djamel (otd)'s avatar
      [FIX] sale_mrp: avoid creating useless picking · aac70fd4
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Install sale_management and sale_mrp
      - Create a product with BOM, which is a KIT and add any product in BOM line
      - Create a SO for the product > Confirm
      - Validate the delivery
      - Cancel the SO >  Set to Quotation > Reconfirm
      
      Problem:
      A new delivery order is generated while the ordered quantity = delivered quantity
      This is because `_get_qty_procurement` wrongly computed the product quantity based on the moves quantities in the kit case.
      
      opw-2647856
      
      closes odoo/odoo#79387
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      aac70fd4
  16. Nov 03, 2021
    • Tom De Caluwé's avatar
      [FIX] web_editor, website: fix removal of last item inside active slides · 3c194faa
      Tom De Caluwé authored
      
      A bug currently makes the carousel snippet collapse/disappear when its
      active contents are removed. This happens because after the removal,
      the carousel no longer has an active item.
      
      The solution that was chosen was to not allow the removal of slides
      unless using the dedicated option which is there for that. This solution
      has to advantage to also allow users to create empty slides (using a
      background image for example) by simply removing the columns inside.
      
      task-2506165
      
      closes odoo/odoo#77033
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      3c194faa
    • roen-odoo's avatar
      [FIX] purchase_requisition : PO Agreements wrong qty ordered · c09a16fb
      roen-odoo authored
      
      Current behavior:
      If you have 2 time the same product in the agreement and you confirm an order with just one line of this item
      the 2 lines in the agreement will have the quantity.
      
      Expected behavior:
      Only the ordered item should have the quantity applied. In this case the products are compared with the price and
      product ID. If you modify the price in the PO the first line of the agreement will have the quantity by default.
      
      Steps to reproduce:
      1. Create a new Purchase Agreement
      -Add two lines with the same product
      - First line has a scheduled date and price that are different from the second line
      2. Generate RFQ and confirm PO with only the first product line and a set quantity
      3. Once the PO has been confirmed, going back to the Purchase Agreement, the ordered quantities on both lines will be the same, although the PO was generated for only the first line.
      
      opw-2627898
      
      closes odoo/odoo#78779
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      c09a16fb
  17. Nov 02, 2021
Loading