Skip to content
Snippets Groups Projects
  1. Jul 05, 2018
    • Martin Trigaux's avatar
      [FIX] mail: multi-company access to TZ · a978a364
      Martin Trigaux authored
      - Create 2 Companies A & B
      - Set User B in Company B
      - Record some `mail.activity` for User B on a lead belonging to Company
        B.
      - With a manager user in Company A, go to Kanban view of leads and
        remove filters => all leads, including leads in Company B, are
        displayed
      
      An access error occurs.
      
      `read_progress_bar` method, tries to access the field `activity_state`
      which is: `states = record.activity_ids.mapped('state')`. The state of
      a `mail.activity` is using the tz of the partner. To read the
      `activity_state` of a lead, one needs to access
      `record.activity_ids.user_id.partner_id.tz`
      => multi-company security rules raised
      
      opw: 1850984, 1859470
      a978a364
    • len-odoo's avatar
      [FIX] web: handle onchange on a on2many with an embedded one2many on multiple pages · 7764db7a
      len-odoo authored
      Suppose there is a one2many field embedded in a one2many,
      (say we are viewing record A with one2many field B itself with a one2many C).
      Furthermore, there is a second page of the one2many field B.
      If an onchange is applied on B, then the server replies with a 1 command for all
      B records attached to the currently viewed object A.
      This includes a list of commands [[5], [4, C_id]*] for each B record,
      in particular B records that are on the second page.
      Since they are on the second page, they might not have been fetched by the
      frontend; in that case the corresponding C_ids are thus unknown.
      As a consequence, on save the frontend sends a command 0 to create the records
      for all unknown C_ids.
      Since it doesn't have any value to give to the 0 command, the row creation
      usually crash in the backend.
      
      Another wrong behaviour is fixed at the same time: if the server sends an update
      on the list of C ids with 4 commands.
      In that case, if the record has not been prefetched, we have no way to know
      if the list changed or not.
      
      To solve this, when we receive the 4 commands by the server, we send back 4
      commands.
      
      coauthored by @aab-odoo
      
      opw 1835936
      7764db7a
    • Alexandre Kühn's avatar
      [FIX] web: no concurrent reload on basic model · 7af09db8
      Alexandre Kühn authored
      Before this commit, there was a traceback in the following scenario:
      
      Let's have a kanban view with groupby and a domain.
      If we clear the domain then clear the groupby, there could be a crash.
      
      This crash occurs because when we clear the groupby, it performs a `reload`,
      and assumes that the datapoint contains grouped data. However, if this
      computation takes some time, it is possible to overwrite the datapoint so that
      there is no longer grouped data.
      
      This commit fixes the issue by enforcing at most 1 execution of the method
      `reload` active at any time. Consequently, successive reloads operations are
      now much slower.
      
      Note that it uses the single non-reentrant mutex on the basic_model to enforce
      this rule, which means:
      
        - No more concurrent `reload` and `save`.
        - If an execution having the mutex in `reload` come accross the same mutex,
          it is blocked forever. This is hopefully not the case at the moment,
          however a reentrant mutex should be considered in the future.
      7af09db8
    • Nicolas Lempereur's avatar
      [FIX] barcodes: documentation in description · b27d009a
      Nicolas Lempereur authored
      The barcodes modules had documentation only available on apps.odoo.com,
      following a recent change, odoo modules are not displayed on
      apps.odoo.com anymore.
      
      Thus this commit merges the documentation onto the module description so
      it is available on the module page.
      
      opw-1846035
      closes #25621
      b27d009a
    • Romain Derie's avatar
      [FIX] website: new content links not triggered · 21f1a593
      Romain Derie authored
      Clicking outside the new content options should close the overlay.
      Every options are triggering a JS event (mostly opening a modal) that works
      fine.
      
      But the 'New Job offer' options is simply a href link which is not going
      through anymore since there was a call to `preventDefault`.
      
      opw-1860196
      21f1a593
  2. Jul 04, 2018
  3. Jul 03, 2018
    • Cédric Snauwaert's avatar
      [FIX] account: fix select partner problem in reconciliation widget · 775fbcda
      Cédric Snauwaert authored
      Problem: create a bank statement with a line that has a positive amount
      and a line that has a negative amount. Both line does not have a partner
      Then click on reconcile to open the reconciliation widget, notice the
      message stating that we have to select a partner or choose a counterpart.
      
      Select a partner on both line, behavior is different for the line with
      credit > 0, the message still says "select partner or choose counterpart"
      
      This commit fixes this problem.
      775fbcda
    • Florent de Labarre's avatar
      [FIX] account:with -0.0 amount_total it raised · d3b42bd9
      Florent de Labarre authored
      Steps to reproduce the bug:
      
      - Create an invoice with positive lines and negative lines and with a total equal to zero
      
      Bug:
      
      In some cases total amount is equal to -0.0 and it raised:
      "You cannot validate an invoice with a negative total amount"
      
      The field amount_total is a monetary field, so it's computed in the precision
      of the currency of the invoice.
      
      opw:1862439
      d3b42bd9
    • Goffin Simon's avatar
      [FIX] web: Email attachment issue · af36063d
      Goffin Simon authored
      Steps to reproduce the bug:
      
      - Go on a SO and click on "Send by email"
      - Remove the attachment and click on "Add an attachment"
      - Choose an attachment A and remove it by clicking on the cross
      - Click on "Add an attachment" and choose the attachment A
      
      Bug:
      
      The attachment didn't appear in the modal.
      
      opw:1862482
      af36063d
  4. Jul 02, 2018
  5. Jul 01, 2018
  6. Jun 29, 2018
  7. Jun 28, 2018
    • Carlos Dauden's avatar
    • Nicolas Martinelli's avatar
      [FIX] mail: Render mail in the template language · 5a0dcd3c
      Nicolas Martinelli authored
      On an optimization done for not rendering each time the template, the possibility
      of sending the template in the proper language when multiple recipients was lost.
      
      This is being refactoring in master, but for this version, Odoo won't merge a
      change in the behavior, although it's the correct one as in previous versions.
      
      Extracted by pedrobaeza from https://gist.github.com/nim-odoo/8a9749037370343f05c7e6681324f576
      
      (cherry picked from commit 386a936d)
      5a0dcd3c
    • Swapnesh Shah's avatar
      [fIX] stock: stock.move.line: write · ef0907d5
      Swapnesh Shah authored
      When updating the reservation of an partially available or available
      move line, use the current record of the loop and not the whole
      recordset.
      
      Closes #25445
      ef0907d5
    • Martin Trigaux's avatar
      [FIX] auth_signup: display meaningfull error message · c02fe10a
      Martin Trigaux authored
      Similar as 676022e3 for reset form
      Unverified
      c02fe10a
    • Nicolas Lempereur's avatar
      [FIX] account: batch deposit in reconcile uncut · 8c250b73
      Nicolas Lempereur authored
      The CSS of reconciliation highly uses `overflow: hidden` to hide
      elements, but this cut the bottom part of the "Select a Batch Deposit"
      list of deposits.
      
      There is no possible overflow in this situation anyway, since in the
      given circumstances the `max-height` is set to none.
      
      opw-1859408
      closes #25524
      8c250b73
    • Nicolas Martinelli's avatar
      [FIX] sale_stock: performance · fa1f0502
      Nicolas Martinelli authored
      In some undertermined circumstances, a `KeyError` might appear in:
      https://github.com/odoo/odoo/blob/f9737d79e77e9abf634c8eaa4b6ea331e2aa814d/odoo/models.py#L4898-L4904
      
      Despite the lack of reproducible use case, it seems that this was
      introduced from 59b010ac. In the meantime, other
      optimizations were introduced in the prefetching of related fields, and
      it seems that the fix is not necessary anymore.
      
      Running the same script than described in
      https://github.com/odoo/odoo/issues/19536#issuecomment-333118947 , we
      observe the following performances:
      
      Before the fix:
      ```
      On change with 10 lines (10 new, 0 existing) took 0.306
      On change with 20 lines (10 new, 10 existing) took 0.221
      On change with 30 lines (10 new, 20 existing) took 0.208
      On change with 40 lines (10 new, 30 existing) took 0.271
      On change with 50 lines (10 new, 40 existing) took 0.306
      On change with 60 lines (10 new, 50 existing) took 0.319
      On change with 70 lines (10 new, 60 existing) took 0.354
      On change with 80 lines (10 new, 70 existing) took 0.382
      On change with 90 lines (10 new, 80 existing) took 0.506
      On change with 100 lines (10 new, 90 existing) took 0.503
      ```
      
      After the fix:
      ```
      On change with 10 lines (10 new, 0 existing) took 0.238
      On change with 20 lines (10 new, 10 existing) took 0.259
      On change with 30 lines (10 new, 20 existing) took 0.250
      On change with 40 lines (10 new, 30 existing) took 0.233
      On change with 50 lines (10 new, 40 existing) took 0.287
      On change with 60 lines (10 new, 50 existing) took 0.325
      On change with 70 lines (10 new, 60 existing) took 0.345
      On change with 80 lines (10 new, 70 existing) took 0.451
      On change with 90 lines (10 new, 80 existing) took 0.496
      On change with 100 lines (10 new, 90 existing) took 0.423
      ```
      
      The fix doesn't seem to be necessary anymore, so we go back to the
      previous implementation of the computed field.
      
      Closes #25448
      Fixes #19536
      opw-1861468
      fa1f0502
    • Nicolas Lempereur's avatar
      [FIX] mail: discuss smileys on several lines · f6d36d81
      Nicolas Lempereur authored
      
      In the discuss composer on google chrome, when when the smileys have
      more width than available, they stayed on one line and would increase
      page size (adding an horizontal scrollbar).
      
      This happened really easily in saas-11.3 because we have more smileys,
      but still happened in 11.0 depending on the screen size.
      
      opw-1861191
      closes #25507
      
      Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
      f6d36d81
    • Nicolas Martinelli's avatar
      [FIX] stock: fix test setup · a0173bbb
      Nicolas Martinelli authored
      a0173bbb
    • Nicolas Martinelli's avatar
      [FIX] stock: search route name · 50a10fd7
      Nicolas Martinelli authored
      opw-1862275
      50a10fd7
  8. Jun 27, 2018
Loading