Skip to content
Snippets Groups Projects
  1. May 15, 2020
    • Author Name's avatar
      [FIX] website_event: event registration in edit mode · d515e423
      Author Name authored
      
      The event registration form is made up of a public widget that
      instantiates an internal normal widget. All public widget are
      automatically destroyed when entering in edit mode as well as the widget
      it created. Therefore, it's main element is removed from the DOM when
      the widget is destroyed. Here, we're detaching the main element from the
      internal widget before the widget is destroyed so that we avoid to
      destroy his main element from the DOM when entering in edit mode.
      
      task-2210733
      
      closes odoo/odoo#48215
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d515e423
  2. Jun 04, 2020
  3. Jun 03, 2020
  4. May 14, 2020
    • Antoine Prieels's avatar
      [FIX] hw_drivers,hw_escpos: Check pyusb version · e5475ae8
      Antoine Prieels authored
      
      The `get_string` method from the `pyusb` package has changed its
      signature after version 1.0.0b1 so we used to force the IoT Box to use
      this version to avoid an error. The problem is that version 1.0.0b1
      has dependencies that raise DeprecationWarings in Raspbian Buster.
      We then want to update the version of pyusb that is installed on the
      IoT Box in 14.0.
      
      As the Driver might be loaded to old versions of the IoT Box as well
      as new ones, we need to check what version of the package is present
      on the IoT Box before calling `get_string`.
      
      This check will be removed in 14.0, as people will have to use the
      latest version of the IoT Box.
      
      closes odoo/odoo#51230
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      e5475ae8
  5. Jun 03, 2020
    • Goffin Simon's avatar
      [FIX] sale: smart button "Sales" · 512f30d8
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a customer company partner P
      - Let's consider, P1, a child partner of P
      - Create a SO for P1
      - Archive P1
      
      Bug:
      
      The SO count in the smart button Sales of P was 0 instead of 1
      
      opw:2267828
      
      closes odoo/odoo#52324
      
      X-original-commit: 31ded31d
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      512f30d8
    • Nicolas Martinelli's avatar
      [FIX] crm: default partner lang · f27b8394
      Nicolas Martinelli authored
      
      - Create a lead and set a language
      - Convert to opportunity and choose 'Create a new customer'
      
      The new customer created doesn't have the language of the lead set.
      
      This is more logical to set the same language to the new customer.
      
      opw-2270321
      
      closes odoo/odoo#52342
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      f27b8394
    • Nasreddin (bon)'s avatar
      [FIX] mrp: float division by zero · ab780a9d
      Nasreddin (bon) authored
      Cause
      
      	When kit BOM line quantity is equal to zero in a sale order, it raise error
      	because trying to divide bom_line_data['qty'] / bom_line_data['original_qty']
      	when computing kit quantities.
      
      Solution
      
      	As BoMs allow components with 0 qty, a.k.a. optionnal components,
      	we simply skip those to avoid a division by zero.
      
      Cherry-pick of #38890
      
      opw-2262540
      
      closes odoo/odoo#52192
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      ab780a9d
    • Jorge Pinna Puissant's avatar
      [FIX] hr_attendance: multi-company rule · 0e8f8679
      Jorge Pinna Puissant authored
      
      Before this commit, a user with attendance administrator rights can see
      the attendances of all users of all companies and not only the companies
      he is allowed.
      
      Now, the administrator will only see the attendances of the users of the
      companies he is allowed.
      
      opw-2263577
      
      closes odoo/odoo#52339
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      0e8f8679
  6. Jun 02, 2020
  7. May 26, 2020
  8. May 19, 2020
  9. Jun 02, 2020
  10. May 28, 2020
  11. Jun 02, 2020
    • Swapnesh Shah's avatar
      [FIX] base: Wrong 'default_type' on create kanban stage grouped by 'Customer' · 43aeb92c
      Swapnesh Shah authored
      
      Issue
      
      	Step done with "CRM" since main kanban view can be
      	grouped by 'res.partner' model:
      
      	- Install "CRM" app
      	- Go to crm and group by "Customer".
      	- Add a Column.
      
      	Traceback is raised.
      
      Cause
      
      	Wrong "default_type" in context ('opportunity' in this case)
      	when creating new kanban stage and grouped by "Customer".
      
      Solution
      
      	On "default_get" for "res.partner", if "default_type" is in
      	context and not in 'type' selection choices field; then
      	remove it from context.
      
      Cherry-pick of #47723 in 12.0
      
      opw-2256905
      
      closes odoo/odoo#52272
      
      X-original-commit: e5796429
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      43aeb92c
    • Raphael Collet's avatar
      [FIX] core: prefetching of context-dependent fields · cd62d5ac
      Raphael Collet authored
      
      Consider a context-dependent field, and successively access it on a
      recordset with different contexts.  On the first context, the field is
      correctly computed in batch.  After that, the field is always computed
      one by one.
      
      The bug is in the method that determines which records in a given set
      have no value in cache.  On the first context, the cache is empty for
      the field, so all records are returned.  After that, the method
      considers that all records have a value in cache: they do, but for
      another context key!  Simply using the context key when looking up the
      cache fixes the issue.
      
      closes odoo/odoo#52266
      
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      Co-authored-by: default avatarXavier-Do <xdo@odoo.com>
      cd62d5ac
    • Xavier-Do's avatar
      ad40a136
    • Laurent Smet's avatar
      [IMP] account,l10n_fi: Allow custom COA in accounting test suite · 161498cf
      Laurent Smet authored
      
      - A custom COA could be passed as parameter.
      - Merge the invoice setup to the generic suite like it is in master.
      
      closes odoo/odoo#52140
      
      Related: odoo/enterprise#10855
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      161498cf
    • Julien Castiaux's avatar
      [FIX] base_import: ensure reloaded file is valid · 30be09cd
      Julien Castiaux authored
      The *Reload File* import functionality stands on an undefined behavior
      or the HTML File API. The API is not clear about what should done in
      case the underlying file change on the filesystem after it has been
      imported in the browser.
      
      It turns out the actual behavior vary among browsers and even among
      OSes. The *Reload File* button only works as intended when importing
      files via Chrome on Linux.
      
      In other cases, the browser may refuse to send the file or may send it
      in a corrupted HTTP request. Such malformed request is rejected in the
      best cases by the backend web application but there is chance it hangs.
      
      Security-wise, this problem is not much likely to happen as it requires
      an authenticated user with importation privileges to perform the
      operation. When it comes to the severity, it is possible to exhaust the
      available workers by forcing every one of them to hang.
      
      As there is a security impact, we decided to disable the *Reload File*
      functionality.
      
      Steps to reproduce
      ------------------
      
      1) Import a CSV or XLSX document in any model.
      2) Wait for the data visualization to come back to the browser.
      3) Change the file on disk to
        a) remove a few lines
        b) add a few more lines.
      4) Click the Reload button.
      
      Wrong `size` attribute on Firefox.
      ----------------------------------
      
      Impact: Firefox
      
      The advertised `Content-Length` HTTP header in the POST request is
      a) *greater* than the actual body length. The backend web application
         hangs on a `socket.recv` like function waiting for those missing
         bytes.
      b) *smaller* than the actual body length. The request is truncated
         and futher processing is impossible.
      
      The malformed request should have been detected and reported by the http
      web application as requested by the HTTP/1.1 spec [1]:
      
      > When a Content-Length is given in a message where a message-body is
        allowed, its field value MUST exactly match the number of OCTETs in
        the message-body. HTTP/1.1 user agents MUST notify the user when an
        invalid length is received and detected.
      
      Mitigating the issue is possible using nginx as reverse-proxy. The
      connection is closed after one minute if data are missing.
      
      Invalid `ERR_UPLOAD_FILE_CHANGED`
      ---------------------------------
      
      Impact: Chrome on Windows
      
      Chrome prevent sending the XHR due to a `ERR_UPLOAD_FILE_CHANGED` error,
      this error should only happens when the underlying file content have
      been changed the second before the request. On Windows, the error
      is triggered as soon as the file have been changed, not considering the
      modification time.
      
      [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
      
       Section 4.4
      
      opw-2252440
      
      closes odoo/odoo#52246
      
      X-original-commit: aacd95a8ec0952d2b04432aebd1cd469c19f2618
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      Signed-off-by: default avatarJulien Castiaux <Julien00859@users.noreply.github.com>
      30be09cd
  12. May 28, 2020
  13. May 29, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: avoid hiding 'Amount Matching' · ccaddfef
      Andrea Grazioso (agr-odoo) authored
      
      Go to Reconciliation Models > Invoices Matching Rule
      Set the parameter 'Amount Matching'
      Set 'Partner Is Set & Matches'
      Save
      Edit
      Unset 'Partner Is Set & Matches'
      
      'Amount Matching' will switch to invisible but is not disabled.
      Removing the invisibility check so that the field is always
      editable
      
      This also reverts commit 61f1ca63.
      Due to a misunderstanding this solution was chosen while the real
      intention was to always show the field
      
      opw-2261134
      
      closes odoo/odoo#52153
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      ccaddfef
  14. May 21, 2020
  15. May 28, 2020
    • Thomas Dieuzeide's avatar
      [FIX] sale_margin: compute fields performance at install · 62c1d0a5
      Thomas Dieuzeide authored
      
      Installing sale_margin module on a db with a lot of sale.order was impossible.
      
      This commit significantly improves performances.
      Went from many hours (forecasted) to 15 minutes on a db with 300k orders
      
      For sale.order:
        - Duplicating logic between edit mode and non edit mode
        - Edit mode logic stays the same as before
        - Non edit mode uses read_group to speed up the computation
      
      closes odoo/odoo#52010
      
      X-original-commit: 554fb1e3
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      62c1d0a5
  16. May 31, 2020
  17. May 29, 2020
  18. May 28, 2020
    • Nicolas Martinelli's avatar
      [FIX] mrp: display owner and package on move line · 7f84ef7c
      Nicolas Martinelli authored
      
      When owner and/or packages are activated, a MO doesn't give the
      possibility to set the proper owner/package of the reserved products.
      
      We add the fields in the view, and set them as optional.
      
      Important note: this will only work with the move lines created during
      the reservation. If additional move lines are created manually, this
      won't work. Indeed, it would be necessary to add both fields to
      `raw_workorder_line_ids`, hence to `mrp.abstract.workorder.line`.
      
      opw-2260450
      
      closes odoo/odoo#52042
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      7f84ef7c
  19. May 29, 2020
    • jev-odoo's avatar
      [FIX] stock: correctly apply scheduled_date · 7f59fc89
      jev-odoo authored
      
      Inverse fields are stored in a `set` and `set` is not ordered. It depends on the memory address of its elements which change each time the registry is rebuilt.
      
      Inverse `_set_move_ids_without_package` set the .move_lines on the record
      Inverse `_set_scheduled_date` set the scheduled_date on the move_lines
      
      If `_set_scheduled_date` is called first, then the record doesn't contain any move_lines, the scheduled date is ignored and set to default (now)
      
      This fix ensures that if a scheduled_date is set, it is applied after `_set_move_ids_without_package`.
      
      OPW-2212391
      
      closes odoo/odoo#51502
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      7f59fc89
  20. May 28, 2020
  21. May 27, 2020
  22. May 28, 2020
  23. May 26, 2020
  24. May 28, 2020
    • Goffin Simon's avatar
      [FIX] stock: No sequence defined on Operations Types dropship · 25ae1f69
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Go to settings => Purchase
      - Enable Dropshipping
      - Go to Inventory => Configuration => Warehouse Management => Operations Types
      - Open Dropship
      - Remove the sequence (field is not required)
      - Go to Inventory => Master Data => Products
      - Let's consider product P (Inventory tab: Check "Dropship" and "Buy" and vendor V as supplier)
      - Create Quotation Q with customer C and product P
      - Confirm Q (a PO has been created for V)
      - Confirm PO
      
      Bug:
      
      A traceback was raised because the sequence was not defined on Operation Type dropship
      
      opw:2263799
      
      closes odoo/odoo#52049
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      25ae1f69
    • jvm-odoo's avatar
      [FIX] web: fix IE/Edge dropdown clear · 513ab157
      jvm-odoo authored
      
      Issue
      
      	- Have IE 11 or not chromium-based Edge
      	- Install Contacts
      	- Add a salesperson on any contact
      	- Save
      	- Try to remove the salesperson with
      	  the cross icon on the input
      	- Save
      
      	The value comes back
      
      Cause
      
      	We do not handle this feature in dropdowns
      
      Solution
      
      	Remove the dropdown cross icon
      
      OPW-2262749
      
      closes odoo/odoo#52071
      
      X-original-commit: cdb07237
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      513ab157
Loading