Skip to content
Snippets Groups Projects
  1. May 04, 2021
  2. May 03, 2021
    • oco-odoo's avatar
      [FIX] account: reconciliation models: fix priorities when matching amls from payments · b5800c9d
      oco-odoo authored
      
      Since the payment refactoring, the structured reference of a payment is stored in its ref field, not payment_reference like for invoices. This caused payments never to be matched with highest priorities, as payment_reference_flag was always false, and only communication_flag could match.
      
      To reproduce:
      
      - Have a reconcile model with match_total_amount=False.
      - Create a statement line with communication a1b2c3 for 1000
      - Create 3 payments:
      > 500, with memo a1b2c3
      > 500, with memo a1b2c3 (so, the same one)
      > 500, with memo d1e2f3
      - Open the reconciliation widget for your statement line
      
      ===> The 3 payments are matched, while only the two first ones should have been, as they were exact matches for the communication, and should hence have received higher priority.
      
      closes odoo/odoo#70277
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      b5800c9d
  3. Apr 29, 2021
    • Laurent Stukkens (LTU)'s avatar
      [FIX] sale_timesheet: prevent multicompany issue on SOL · 2480e959
      Laurent Stukkens (LTU) authored
      
      Steps to reproduce:
      
              - Create an SO for a prepaid service in company A and confirm it
              - Create a project and a task in company B and select the customer linked to the SO you previously created
              - Unselect company A from the multi-company widget; only display the records from company B
              - Timesheet on the task you previously created
      
      Observed behavior:
      
              - The SOL set by default belongs to company A, thus generating an access right error when trying to timesheet on the task
      
      Expected behavior:
      
              - The SOL set by default should belong to the same company as the task
      
      task-2515259
      
      closes odoo/odoo#69783
      
      Related: odoo/enterprise#17921
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      2480e959
  4. May 04, 2021
  5. Apr 28, 2021
  6. May 04, 2021
  7. Apr 27, 2021
  8. May 03, 2021
  9. May 04, 2021
  10. May 03, 2021
  11. Apr 19, 2021
  12. May 02, 2021
    • Swapnesh Shah's avatar
      [FIX] mrp: set default product on unbuild order · 4de0ae43
      Swapnesh Shah authored
      
      Before this commit, Creating Unbuild order using
       Unbuild Button was resetting Bom as it was calling
      `_onchange_product_id` after setting `mo_id` which was
      resetting Bom on Unbuild order.
      
      To Fix Issue, We setting `default_product_id` so It would not
      reset `bom_id` when `_onchange_product_id` is called.
      
      Fixes: #70216
      Odoo Ticket: 2521788
      
      closes odoo/odoo#70218
      
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      4de0ae43
  13. May 03, 2021
    • Romain Derie's avatar
      [FIX] http_routing, website: prevent crash when using `fw` in url · 0490828d
      Romain Derie authored
      
      Before this commit, the routing map generated and used would be the one from
      the website the request is performed, instead of the one from the `fw` website
      ID which will be the one we redirect the user to.
      
      This issue was introduced with the routing map by website, be8fc229 and is
      restricted to a single case: a publisher using the website switcher, and it
      won't happen on next page naviguation/refresh as the `fw` website id will be
      the same as the current website's ID. Thus there won't be any routing map
      mismatch.
      
      Step to reproduce:
        - Create a page on website 2, set it as homepage
        - Naviguate to website 1 on '/' url
        - Naviguate to website 2 on '/' url
      This will raise a werkzeug error about `EndPoint not iterable`.
      
      ----- Technical analysis ------
      
      This is the current flow:
      1. `_dispatch()` is setting `website_routing` to `get_current_website()` -> 2
      2. `_dispatch()` is calling `_match()`
      3. `_match()` is calling `routing_map()` with key = `website_routing`, which
         was set to 2 in step 1.
      4. `routing_map()` is calling `_generate_routing_rules()` which generate the
         rules based on `website_routing`, which was set to 2 in step 1.
      5. `_dispatch()` authenticate the user by calling `_authenticate()`
      6. `_dispatch()` is calling `_add_dispatch_parameter()`, where URL param `fw`
         is forced in session, so `get_current_website()` now return the correct
         `website_id` -> 1
      
      The issue: in order to handle the `fw` URL parameter (step 6.), we need to
      check the rights to ensure we can allow the website switch.
      To check rights, user need to be authenticated (step 5.), which is done after
      generating the routing map (2. & 3. & 4.).
      The routing map is generated based on the current website (step 1.)
      
      Step 6 depends of steps 5 which depends of steps 2/3/4 which depend of step 1,
      but step 1 should depend of step 6, which is an impossible cycle.
      
      closes odoo/odoo#70278
      
      X-original-commit: 878e28f9
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      0490828d
    • Laurent Smet's avatar
      [FIX] account: Fix price_unit rounding issue with fpos/price included tax · 3470a3c9
      Laurent Smet authored
      
      - Create an invoice with an empty fiscal position
      - Create a line with a product having 100.0 as sale price and 21.0% price-included tax
      => price_unit equals 99.99
      
      This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0.
      The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes.
      
      closes odoo/odoo#69836
      
      X-original-commit: e2247a86
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      3470a3c9
  14. Apr 30, 2021
    • Adrien Widart's avatar
      [FIX] purchase_stock: consider product unit price precision · 77b7a23c
      Adrien Widart authored
      
      When changing the product price precision, this can lead to incorrect
      stock valuations.
      
      To reproduce the error:
      (Enable debug mode)
      1. Go to Settings > Technical > Database Strucutre > Decimal Accuracy
      2. Edit Product Price:
          - Digits: 4
      3. Create a Product Category PC:
          - Costing Method: FIFO
      4. Create a Product P:
          - Product Type: Storable Product
          - Product Category: PC
      5. Create a RfQ with product P:
          - Quantity: 1000
          - Unit Price: 0.035
      6. Confirm Order, Receive Products, Validate
      7. Click on Valuation
      
      Error: The total value is equal to $40 instead of $35. The calculation
      was done after rounding the unit price: $0.035 becomes $0.04, then
      1000*0.04=$40.
      
      When confirming the RfQ, a stock move is created. To do so, the method
      `_get_stock_move_price_unit` is called. When validating the delivery, it
      recomputes the unit price thanks to method `_get_price_unit`. In both
      situation, and if the line has taxes, the method `compute_all` is called
      like this:
      ```python
      price_unit = line.taxes_id.with_context(round=False).compute_all(price_unit,
      	currency=line.order_id.currency_id, quantity=1.0)['total_void']
      ```
      But here is the problem. In this method, total amount is computed with
      this line:
      ```python
      base = currency.round(price_unit * quantity)
      ```
      However, `quantity` is equal to 1 and the multiplication is rounded
      using the currency precision. As a result, `base` is equal to $0.04.
      Then, all computations will use this value and will be incorrect.
      
      This fix applies the real quantity so `base` will have the correct
      value:
      ```
      base = currency.round(price_unit * quantity)
           = currency.round(0.035 * 1000)
           = 35
      ```
      
      OPW-2472192
      
      closes odoo/odoo#70080
      
      X-original-commit: a57dc071
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      77b7a23c
  15. Apr 28, 2021
  16. Apr 29, 2021
    • Arthur Detroux (ard)'s avatar
      [FIX] website: hide cookie bar when entering edit mode · 8c672662
      Arthur Detroux (ard) authored
      
      Previously :
      Once a user enabled the cookie bar, it prevented him from dropping
      snippets in the main area of the page because the focus was on
      the cookie bar. Dropping snippets there has a confusing behavior and
      might make the user think the editor is broken.
      
      Reason :
      The cookie bar has an oe_structure class and takes over the body
      if it's not hidden or dismissed. The oe_structure allows to drop
      snippets.
      
      Fix :
      Hiding the cookie bar when user enters edit mode to avoid dropping
      snippets in it by mistake.
      
      task-2477430
      
      closes odoo/odoo#68938
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      8c672662
  17. Apr 28, 2021
  18. May 03, 2021
    • Thibault Delavallée's avatar
      [FIX] crm: do not reset action name in convert wizard each time an option changes · d75905f7
      Thibault Delavallée authored
      
      Currently ``name`` field that holds the action type is recomputed each time
      duplicated leads are updated. However duplicated leads are often updated
      notably each time customer action (create / link / do nothing) and chosen
      customer are updated.
      
      As ``name`` compute method is mainly present to replace a default value
      its compute method is updated so that it nows compute only when not having
      a value. Once having a value user choice is kept.
      
      Task ID-2452777
      COM PR odoo/odoo#68618
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d75905f7
    • Nasreddin (bon)'s avatar
      [FIX] crm: display right partner and action when converting lead · 6915d17f
      Nasreddin (bon) authored
      Issue
      	- Create a partner with email 'aaa@test.com'
      	- In CRM settings, activate 'Leads' feature
      	- Go to CRM -> Leads and create a Lead:
      	- Set email field to 'aaa@test.com'
      	- Click on 'Convert to opportunity'
      
      	Neither the action or partner_id field is set to the right value.
      
      Cause
      
      	Due to missing 'lead_id' field in template, the partner_id field
      	is not recomputed since action is not recomputed.
      
      Solution
      
      	Add 'lead_id' field as invisible in form.
      
      opw-2439722
      Task ID-2452777
      COM PR odoo/odoo#68618
      6915d17f
  19. May 02, 2021
    • Swapnesh Shah's avatar
      [FIX] mrp: allow to select product w/o bom · eb332de4
      Swapnesh Shah authored
      
      Without this commit, User was not allowed to create Unbuild Order
      for the product without BoMs from Unbuild Orders menu.
      But User was able to create Unbuild Order using 'Unbuild Order' button
      on MO.
      
      With this commit, We are allowing user to select Products without BoMs
      to make this behavior consistent so user can create Unbuild Order from
      Unbuild Orders menu.
      
      closes odoo/odoo#70217
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      eb332de4
  20. Apr 29, 2021
    • Djamel (otd)'s avatar
      [FIX] stock_landed_costs: use the correct split method landed cost · 5da8c593
      Djamel (otd) authored
      
      Steps to follow to reproduce the bug:
      - Install Inventory and Purchase
      - In the inventory settings, Enable the "Landed Costs" option
      - Go to Purchase > create a Service type product
      - In the Purchase tab > Enable "is landed cost" option and choose "by quantity" in the default split method
      - Go to Orders > Requests for quotation > Create a new RFQ > add Any product and confirm the order
      - Validate receipt of the product
      - Create a bill > add the Service you created at the beginning
      - Create Landed Costs
      
      Problem:
      we do not use the split method landed cost of the product, we automatically set it to "equal"
      
      opw-2465753
      
      closes odoo/odoo#69973
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      5da8c593
  21. Apr 30, 2021
  22. Apr 28, 2021
  23. May 02, 2021
  24. Apr 30, 2021
Loading