Skip to content
Snippets Groups Projects
  1. May 09, 2021
  2. May 05, 2021
    • guimarc-br's avatar
      Adding the CLA Signature · 44e05cd8
      guimarc-br authored
      
      closes odoo/odoo#67198
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      44e05cd8
    • guimarc-br's avatar
      [FIX] stock: add location_out_id field domain into the Putaway Rules menu · cd7133f0
      guimarc-br authored
      [REF] models: use stock to implement location_out_id into the Putway Rules Menu
      
      Description of the issue/feature this PR addresses:
      
      On the Location/Location-ID/PutwayRule we have the fields:
      
      location_in_id = When Product Arrives
      
      locatio_out_id = Store To
      
      As the products arrives in the WH/STOCK location and due the putaway rules goes to other location then we have the fields populated like:
      
      location_in_id = WH/Stock
      
      location_out_id = location opened in the view.
      
      Due this domain setup the list is returning empty, and then the solution that I applied is to check if we have the location selected in the location_in_id or location_out_id and show the entries.
      
      Current behavior before PR:
      
      Only looking for the from into the location_in_id
      
      After PR merged :
      
      Looking for the values from the location_in_id or location_out_id.
      
      --
      
      TaskID: N/A
      Fixes : PR 67198
      Closes : PR 67198
      
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      cd7133f0
  3. May 07, 2021
  4. May 06, 2021
    • Ivan Yelizariev's avatar
      [FIX] sale: fix search "invoices is not set" for sale.order · 540b45cc
      Ivan Yelizariev authored
      
      BEFORE this commit query "invoices is not set" was tranformed to
      query "order_line.invoice_lines.invoice_id is False", which doesn't make sense,
      because invoice_id is required fields and hence always set. Hence, result of
      the query was always empty.
      
      AFTER: just check that there is no invoice_lines. Strictly speacking, is not the
      same as checking result of compute method, but because invoice_lines are
      supposed to be lines for invoices of out_* type, the result should be the same.
      
      ---
      
      opw-2516124
      
      closes odoo/odoo#70449
      
      X-original-commit: 9accf63d
      Signed-off-by: default avatarIvan Yelizariev // IEL <yelizariev@users.noreply.github.com>
      540b45cc
  5. Oct 10, 2020
  6. Mar 31, 2020
    • Swapnesh Shah's avatar
      [FIX] mrp: show uom correctly · 8e4efd98
      Swapnesh Shah authored
      
      Before this commit, field`product_uom_category_id` was related to `product_id` which is not required and will be visible when Variants are not enabled so on such conditions no `Unit of Measure` was displayed. (As product_uom_category_id is False )
      
      With this commit, we make this field related to `product_tmpl_id` which sets correct `product_uom_category_id` which thus we can see correct list of  `Unit of Measure`.
      
      closes odoo/odoo#48687
      
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      8e4efd98
  7. May 05, 2021
    • abd-msyukyu-odoo's avatar
      [FIX] web: fix kanban view progressbars related to records in another group (groupby:week) · c08f6e3e
      abd-msyukyu-odoo authored
      * IMPACTED VERSIONS
      
        12.0+
      
      * HOW TO REPRODUCE
      
      locale :  Locale is en_US (or other SUNDAY based)
      view:     CRM - My Pipeline - Kanban view
      groupBy:  date_deadline:week (Expected closing)
      records:  one record with a planned activity, on date_deadline = 2021-05-02 (SUNDAY)
                one record with no planned activity, on date_deadline = 2021-05-09 (SUNDAY)
      remark:   don't keep any other record in MAY for better visibility
      
      * PROBLEM
      
      The progressbar of the week containing 2021-05-09 displays information about the record
      from the week containing 2021-05-02
      
      * CAUSE
      
      1. PostgreSQL `date_trunc` function follows ISO8601 which essentially means that
        the start of a WEEK is always MONDAY. There is no argument to change this.
      
      2. _read_group_format_result
        https://github.com/odoo/odoo/blob/27da86a138089c1838e4b94f8a6976995b9c1fff/odoo/models.py#L2210-L2219
      
        - Computes a label for a group of records.
        - Follows the locale for the label of the week, based on a date which is
          always a MONDAY because of `date_trunc`.
      
      3. read_progress_bar
        https://github.com/odoo/odoo/blob/88957afca09662af7eaa19df1e40b3699e45e79e/addons/web/models/models.py#L167-L175
      
      
      
        - Associates a group label to a record.
        - Follows the locale for the label of the week, based on the date of a record
          which can be any day of the week. If the record is related to a SUNDAY and
          SUNDAY is the first day of the week, it would have been in a group with a
          different label in (2.) than in (3.) prior to this change.
      
      * FIX
      
      In 3., before associating a label to a record, we truncate the date to the
      ISO start of the period, so that the label is determined for a record in the
      same conditions than in 2. The locale is still used to get language-dependent
      outputs with babel, but the grouping will always follows ISO8601 (date_trunc).
      
      * TEST
      
      Added a test for this problem case
      
      TASK-ID : 2517848
      
      closes odoo/odoo#70417
      
      X-original-commit: d429573a1b9da91d627f84ecf44a1513fefae24c
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c08f6e3e
  8. Apr 19, 2021
  9. May 05, 2021
  10. May 04, 2021
  11. May 05, 2021
  12. May 04, 2021
    • Luis González's avatar
      [FIX] web: Aria attributes on buttons Export All & optional columns · 620e4cc2
      Luis González authored
      
      Some aria attributes were missing or incorrectly set on these new
      buttons:
      - The button "Export All" was missing an `aria-label` attribute
      - The button to show/hide optional columns was also missing an
        `aria-label` attribute, and its menu items (checkboxes to show/hide
        columns) were missing a proper role
      - Ever since the debug manager was added in frontend on 73327db0,
        the `aria-label` attribute was not being rendered correctly on the
        button to open developer tools
      
      closes odoo/odoo#67803
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      620e4cc2
  13. Apr 27, 2021
  14. May 03, 2021
  15. Apr 28, 2021
    • Nicolas Lempereur's avatar
      [FIX] mail.py: sanitize do not remove file icon · 7a8e29a6
      Nicolas Lempereur authored
      
      Scenario:
      
      - add a file in mass mailing editor => an icon is added linking the file
      - save
      - edit => the icon is replaced by a generic icon
      - save
      - send mail => no icon is shown in email received
      
      The system is using eg. `data-mimetype="pdf"` to show the icon, before
      12.0 this worked but in saas-12.3 the system uses mailing.mailing
      body_arch's field that is sanitizing attributes and remove it on save,
      so the icon is only working in received email if you save one and only
      one time after adding file inside the mass mailing.
      
      opw-2474053 (ticket for similar issue in 14.0)
      
      closes odoo/odoo#70042
      
      X-original-commit: 7e14515b84d8081557517df7e9dc7d8c0d17f2be
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7a8e29a6
  16. May 04, 2021
  17. May 03, 2021
    • Philémon van Helden's avatar
      [FIX] web: no error on single active_ids state load · bf9a985f
      Philémon van Helden authored
      
      In eg. 13.0 when refreshing sales analysis action of a product, we would
      get an error because we have a single active_ids which is not expected
      by the code.
      
      With this commit, we use .toString() on the jQuery BBQ parsed active_ids
      as it was done before 32b8cec5 refactoring (january 2018).
      
      The added test with the fix fails with an error:
      
        TypeError: state.active_ids.split is not a function
        at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js)
      
      opw-2471982
      
      closes odoo/odoo#70226
      
      X-original-commit: a8c731092b7aa95bca46f56f6c069e1c1a8a2292
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Co-authored-by: default avatarNicolas Lempereur <nle@odoo.com>
      bf9a985f
    • Romain Derie's avatar
      [FIX] http_routing, website: prevent crash when using `fw` in url · 878e28f9
      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#69416
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      878e28f9
  18. Apr 19, 2021
    • Nasreddin (bon)'s avatar
      [FIX] survey: display right date format in datepicker · ddfcecc6
      Nasreddin (bon) authored
      
      Issue
      
      	- Install 'Survey' app
      	- Enable "es_VE" language and activate on main website
      	- Create a survey:
      	- Add a question of type 'Date' then save
      	- Click on "TEST" button
      	- Start survey and add a date with the datepicker
      	- Submit survey
      
      	Error message / traceback.
      
      Cause
      
      	The date format is wrong because since locale params
      	only after page survey widget is loaded.
      
      Solution
      
      	Use 'session.load_translations()' to load translation.
      
      opw-2452237
      
      closes odoo/odoo#69507
      
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      ddfcecc6
  19. May 03, 2021
  20. May 02, 2021
  21. Apr 30, 2021
    • Adrien Widart's avatar
      [FIX] point_of_sale: use lot's location for SML's location source · 1fc5b57d
      Adrien Widart authored
      
      When selling a tracked product that comes from a specific place in the
      warehouse, the module will ignore this information and set the parent
      warehouse as source location.
      
      To reproduce the error:
      (Use demo data)
      1. In Settings, enable "Multi-Warehouses"
      2. Create a product P:
          - Product Type: Storable Product
          - Available in Pos: True
          - Tracking: By Unique Serial Number
      3. Update its quantity:
          - Location: WH/Stock/Shelf 1
          - Serial Number: USN01
          - Qty: 1
      4. Start a POS session
      5. Sell P
          - Enter the same serial number
      6. Go back to quantity update page for product P
      
      Error: The quantity for "WH/Stock/Shelf 1, USN01" is still 1, it should
      be 0. Moreover, a new line appeared: "WH/Stock, USN01, -1" which is
      incorrect. The POS module considered that the product sold came from
      WH/Stock instead of WH/Stock/Shelf 1.
      
      OPW-2473002
      
      closes odoo/odoo#70165
      
      X-original-commit: dd62f84e
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      1fc5b57d
    • Nicolas Lempereur's avatar
      [FIX] im_livechat: 'Visitor' translated in livechat · 3b199007
      Nicolas Lempereur authored
      
      Make translation work for "Visitor" that was appearing in livechat
      session to the visitor.
      
      opw-2504461
      
      closes odoo/odoo#70139
      
      X-original-commit: 738ef4ce8040abc7c11a578b6208162d39a686f7
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3b199007
  22. Apr 29, 2021
  23. Apr 28, 2021
    • Adrien Widart's avatar
      [FIX] purchase_stock: consider product unit price precision · a57dc071
      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#69297
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      a57dc071
    • Raf Geens's avatar
      [FIX] hw_drivers: Deadlock on double Ingenico terminal connection · 18daadc2
      Raf Geens authored
      
      This can happen if the terminal had a power reset, or a network cable
      was unplugged temporarily on the terminal or IoT box. It will try to
      reconnect, but the box wasn't aware the first connection was gone and
      would ignore the second connection. So the terminal was waiting for
      a response on the second connection and the IoT box was waiting for
      data on the first connection resulting in a deadlock.
      
      This solution closes the first connection and replaces it with the
      second.
      
      opw-2432864
      
      closes odoo/odoo#65456
      
      Related: odoo/enterprise#16099
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      18daadc2
    • lejeune quentin's avatar
      [FIX] hw_drivers: Fix port 9000 used by Ingenico in IoT · 21414074
      lejeune quentin authored
      Now we try to open a socket every 3 secondes
      It generate some issue for connection of Ingenico
      Terminal.
      
      Now we open a socket in the initialization of the socket
      interface and listen all devices that send request to
      Iot.
      
      opw-2432864
      21414074
    • Goffin Simon's avatar
      [FIX] hr_timesheet: Analytic account without company · b3dc922c
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a project P set with analytic account AA and company C
      - Allow timesheet on P
      - Let's consider a task T belonging to P
      - Set AA with comapny = False
      - Try to encode a timesheet on T
      
      Bug:
      
      A UserError was raised because the field company_id on account.analytic.line is required
      
      opw:2486034
      
      closes odoo/odoo#69841
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      b3dc922c
Loading