Skip to content
Snippets Groups Projects
  1. May 04, 2021
  2. Apr 27, 2021
  3. May 03, 2021
  4. May 04, 2021
  5. May 03, 2021
  6. Apr 19, 2021
  7. 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
  8. 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
  9. 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
  10. Apr 28, 2021
  11. 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
  12. Apr 28, 2021
  13. 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
  14. 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
  15. 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
  16. Apr 30, 2021
  17. Apr 28, 2021
  18. May 02, 2021
  19. Apr 30, 2021
  20. Apr 19, 2021
  21. Apr 29, 2021
    • Adrien Widart's avatar
      [FIX] point_of_sale: post journal entries of cash in/out · 985f1bf5
      Adrien Widart authored
      
      When closing a POS session, if there was no sale, the journal entries of
      cash in/out will not be posted.
      
      To reproduce the error:
      (Need account_accountant)
      1. In Point of Sale, open Shop's settings:
          - Enable "Advanced Cash Control"
      2. Start a new session:
          - Open POS
          - Close, Confirm
      3. Close session
      4. Click on "End of Session"
      5. Add a "Cash In/out"
          - +$10
      6. Set Closing Cash
      7. Close Session & Post Entries
      8. Accounting > Cash
      
      Error: The $10 line is present but its status is "New". It should be
      "Processing".
      
      Since there was no sale during the POS session, the module ignores all
      the accounting part. When the session is closed, the accounting part is
      ignored because there were no sales. As a result, it does not post the
      cash in and out.
      
      OPW-2456395
      
      closes odoo/odoo#70101
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      985f1bf5
  22. Apr 30, 2021
  23. Apr 29, 2021
  24. Apr 28, 2021
    • oco-odoo's avatar
      [FIX] account: cash basis taxes: generate correct exchange difference when... · 3e07ebf2
      oco-odoo authored
      [FIX] account: cash basis taxes: generate correct exchange difference when using the same cash basis taxes on multiple lines
      
      To reproduce the bug:
      1) Create a cash basis tax for 42%
      2) Make an invoice with two lines at 100$, each using this tax
      3) Post and register full payment of the invoice
      
      ==> An exchange difference has been generated, doing +100 -100. One of its two line has tax_ids set, while the other does not. This makes the base amount shown in the generic tax report wrong: 100 instead of 200.
      
      Actually, this exchange difference entry shouldn't have existed in the first place, as there is no rounding issue to compensate for here. It happens because the grouping keys computed for the two base lines are the same, and the second line overwrites the totals of the first one instead of adding them to its own.
      
      closes odoo/odoo#70034
      
      Related: odoo/enterprise#18019
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      3e07ebf2
Loading