Skip to content
Snippets Groups Projects
  1. Feb 06, 2019
    • RomainLibert's avatar
      [IMP] various: optimize _name_search · 5fcf891e
      RomainLibert authored
      In the overrides of _name_search we should avoid creating domains with
      huge lists of ids as it is inefficient.
      We can also make sure that we optimize the empty search as in this case
      the custom domain doesn't make sense, we can simply search on an empty
      domain and, thanks to the limit argument, still keep a fast query.
      
      Linked to task 1918906
      
      Thanks to @odony and @nseinlet
      
      closes odoo/odoo#30155
      
      closes odoo/odoo#30887
      5fcf891e
    • Nans Lefebvre's avatar
      [FIX] website_sale: select cart recovery mail template in action · c0ffeeb4
      Nans Lefebvre authored
      Fine-tuning of commit 50217184
      The selection of the cart recovery mail template would fail if there was more
      than one sale order selected.
      
      opw 1921714
      
      closes odoo/odoo#30885
      c0ffeeb4
    • Vincent Schippefilt's avatar
      [FIX] web: hang when saving then discarding · 7d1957da
      Vincent Schippefilt authored
      When editing a record, if it cannot be saved (b.e. due to required
      fields) and the user clicks on save, then on discard
      
      Before this fix, the window did nothing (seems like it is unresponsive)
      
      After this fix, the user is able to discard the form.
      
      task-id: 1937142
      
      closes odoo/odoo#30871
      7d1957da
    • qsm-odoo's avatar
      [FIX] website: remove data-editor-message attributes on save · 930839c7
      qsm-odoo authored
      When the edit mode is entered, some elements receive
      data-editor-message attributes. These were not removed on save which
      could in some cases make the attributes be saved in the database. For
      this to happen it would require an `.oe_structure.oe_empty` element to
      be put *inside* an editable element (instead of being the one which is
      editable). In that case the `.oe_structure` content would be saved in an
      inheriting view but the parent view would also be COW'd for no reason
      because of that attribute.
      
      Difficult to say if such a case exist in the current views but as it
      technically possible and that some of our tests use that configuration,
      it is worth fixing.
      Note: this fix was in fact done in the new editor in master and allowed
      to detect that one of our test was not testing a feature correctly
      because of that. This will be adapted in a different commit of this PR.
      
      closes odoo/odoo#30834
      930839c7
    • Romain Derie's avatar
      [FIX] website: specific view ID might also change on save · aef6a5aa
      Romain Derie authored
      Commit https://github.com/odoo/odoo/commit/29075a8e2c734624cec4f6009185616634f70dea
      was written while there was an incorrect behavior related to
      multi-website, oe_structure_ID and edit mode in a rare specific case
      (see the second commit from this PR for detailed explanation
      https://github.com/odoo/odoo/pull/30834).
      
      That rare case was detected in 12.0 since the tour did not work on
      master with the new editor (that fixed the incorrect behavior).
      Basically, it was COWing the edited view even if only an oe_structure_ID
      was touched.
      
      Indeed, when saving a specific view in the HTML editor, we should also
      search for its possible new ID as it could change if we also edited its
      generic parent. In that case, the view will be copied and then unlinked
      to preserve inherit order on the new specific tree.
      aef6a5aa
    • Christophe Simonis's avatar
  2. Feb 05, 2019
  3. Feb 04, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] hr_recruitment, receive email for applicant creation in right company · 44da9c91
      Lucas Perais (lpe) authored
      Before this commit, the email aliases on hr.jobs did not take into
      account the department.
      Hence, when receiving an email for an applicant through an alias,
      the object applicant was created in the wrong company
      
      after this commit, the alias is created with the right values, and the
      applicant is created in the right company and department
      
      OPW 1920085
      
      closes odoo/odoo#30818
      44da9c91
  4. Feb 05, 2019
  5. Feb 06, 2019
  6. Feb 05, 2019
    • Nicolas Lempereur's avatar
      [FIX] mail: mention special char=>link partner · d730f669
      Nicolas Lempereur authored
      This is a regression from: 10f0766b. In it the visual side was solved,
      but unexpectedly the functional side still worked on unescaped content.
      
      Thus visually a @partnèr could be seen as a link, but it was no anymore
      added as follower.
      
      Without change, modified test fails with:
      
       mentioned partners are sent to server (expected: [1], result: [])
      
      note: change is partial backport of 12.2 e2f20ffa
      
      opw-1931247
      closes #30846
      d730f669
  7. Feb 04, 2019
    • Nicolas Martinelli's avatar
      [FIX] stock_dropshipping: consolidated lines · b9e3c153
      Nicolas Martinelli authored
      - Create a SO with 2 lines of the same product (set route as Drop Ship)
      - At validation, both lines are merged into a single line in the PO
      
      As a result, one SO line will be over-delivered, and the other
      under-delivered.
      
      Two lines should be kept in the PO.
      
      opw-1928702
      
      closes odoo/odoo#30800
      b9e3c153
    • Aurélien Warnon's avatar
      [FIX] survey: fix empty date in survey could not be submitted · dcd79a54
      Aurélien Warnon authored
      Purpose
      =======
      
      A date field not marked as "mandatory" could not be left blank in the survey.
      
      That was caused by the form returning "Invalid date" instead of an
      empty value when submitting.
      
      closes odoo/odoo#30788
      dcd79a54
  8. Feb 05, 2019
    • Rishabh Jadia's avatar
      [FIX] web: prevent footer linebreak. · 13e058c5
      Rishabh Jadia authored
      The purpose is, prevent the linebreak in the phone when using the
      document layouts 'background' in the footer.
      
      opw-1920752
      
      closes odoo/odoo#30812
      13e058c5
    • Robot Odoo's avatar
      [FIX] hr_holidays: fasten creation of leaves by company · b13a2202
      Robot Odoo authored
      When creating a leave, we usually check/create activities for the
      concerned users, this is fine when creating one leave.
      However it starts to become a problem when trying to create leaves in
      batch using the by company or by department holiday_type as the number
      of leaves created in batch can become quite big.
      
      Now when we create leaves in batch, we do not check for the activities,
      which will fasten a lot the creation.
      
      Another problem is that when someone defined a leave on the very day you
      want to create such a request, then it will crash, this can lead to
      waste of time and resources.
      
      Now we raise an error before trying to create the leaves in case of
      conflict.
      
      NB: Tested with +- 320 records, took 20 seconds instead of more than 10 minutes.
      
      Task: 1934383
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#30625
      Unverified
      b13a2202
    • RomainLibert's avatar
      [IMP] hr_holidays: improve performances · 9c1b9324
      RomainLibert authored
      going from 3X seconds for 320 leaves to 20 seconds for 320 leaves
      9c1b9324
    • RomainLibert's avatar
      [FIX] hr_holidays: fasten creation of leaves by company · 8ab88811
      RomainLibert authored
      When creating a leave, we usually check/create activities for the
      concerned users, this is fine when creating one leave.
      However it starts to become a problem when trying to create leaves in
      batch using the by company or by department holiday_type as the number
      of leaves created in batch can become quite big.
      
      Now when we create leaves in batch, we do not check for the activities,
      which will fasten a lot the creation.
      
      Another problem is that when someone defined a leave on the very day you
      want to create such a request, then it will crash, this can lead to
      waste of time and resources.
      
      Now we raise an error before trying to create the leaves in case of
      conflict.
      
      Task: 1934383
      8ab88811
  9. Feb 04, 2019
    • Julien (juc) Castiaux's avatar
      [FIX] mail: delete messages on module uninstallation · 262e0010
      Julien (juc) Castiaux authored
      When uninstalling a module, the messages linked to the records
      of that module are not deleted leading to ghost messages when
      reinstalling the module.
      
      This is due to the lack of foreign keys in the definition of the
      chatter making it impossible to cascade delete.
      
      opw-1928208
      
      closes odoo/odoo#30798
      262e0010
    • Nans Lefebvre's avatar
      [FIX] purchase: fix mail templates for multi-company use · 17461127
      Nans Lefebvre authored
      Activate multi-company, deactivate the common contact book.
      Create a PO P with user U1 in company A. Switch to company B.
      User U2 in company A tries to send P by email.
      Rendering of the template fails, because it tries to access object.create_uid,
      which breaks multi-company record rules.
      
      We add a sudo in the template so that it works as intended.
      
      opw 1930521
      
      closes odoo/odoo#30789
      17461127
    • Martin Trigaux's avatar
      [FIX] base: correct case in Swedish language · c189a7c3
      Martin Trigaux authored
      Was with a lowercase S while it should be uppercase
      
      closes odoo/odoo#30814
      c189a7c3
  10. Feb 01, 2019
    • Nicolas Martinelli's avatar
      [FIX] stock_account: AVCO with MRP · 8cb2965e
      Nicolas Martinelli authored
      - Create a product P with:
        Costing Method       Average Price
        Inventory Valuation  Perpetual (automated)
      - Create a component C with, costing 10.
      - Create a BOM for P:
        1 Unit of C
      - Create a MO for P, validate
        => a journal entry of 10 is created
      - Modify the BOM for P:
        2 Units of C
      - Create a MO for P, validate
        => a journal entry of 15 is created
      
      The journal entry should be 20.
      
      opw-1928342
      
      closes odoo/odoo#30766
      8cb2965e
    • Raphael Collet's avatar
      [FIX] tools: use of savepoints in TestCursor · 266f99f5
      Raphael Collet authored
      closes odoo/odoo#30768
      266f99f5
    • Nans Lefebvre's avatar
      [FIX] project, rating: use rating last update to compute satisfaction percentage · 9d1b07f9
      Nans Lefebvre authored
      The function _compute_parent_rating_percentage_satisfaction used the creation
      date of the rating to compute the percentage.
      However when a client give a new rating, it updates the old one.
      As a result it doesn't give the recent satisfaction percentage,
      but the satisfaction percentage of recently created tickets.
      In other words recently angry clients from old projects would not appear.
      
      Similarly this method is somewhat reimplemented directly in SQL in the rating
      route, which happens to be in the project controller.
      
      opw 1921486
      
      closes odoo/odoo#30752
      9d1b07f9
  11. Feb 04, 2019
  12. Feb 01, 2019
    • Alexandre Kühn's avatar
      [FIX] mail: do not open chat window twice · e8f7770a
      Alexandre Kühn authored
      Revision on https://github.com/odoo/odoo/commit/0d87b1ccea07b952d9079008cfa3cddaf1ccdbee
      
      The commit above prevents opening a chat window when we do not have
      access to messages of the conversation. This may happen when
      receiving a notification from a document we do not have access
      rights.
      
      However, the changes in the code above has an unintended side-effect
      of opening a chat window twice when clicking on a channel preview
      from the systray messaging menu.
      
      This happens because when clicking on a preview, it detaches the
      thread and opens the chat window. Meanwhile, there is a RPC to
      notify that the chat window is detached, and the new window state of
      the channel is received on the longpolling. Two concurrent attempts
      to open a chat window occur at the same.
      It was working fine before the commit above, because the registering
      of a newly open chat window was synchronous.
      This is however no longer the case, because it fetches messages
      beforehand: it has become a requirement to open a chat window. Since
      the registering of a newly open chat window is now asynchronous,
      it was fetching messages and opening the chat window twice.
      
      This commit fixes the issue by aborting attempt to open a chat
      window if it's currently opening a chat window, as this process may
      take some time due to the `message_fetch` RPC.
      
      closes odoo/odoo#30741
      e8f7770a
  13. Feb 04, 2019
  14. Feb 03, 2019
  15. Feb 01, 2019
    • Arnold Moyaux's avatar
      [FIX] mrp: wrong domain in action_view_mos · 0336cbb5
      Arnold Moyaux authored
      Correct domain syntax
      
      closes odoo/odoo#30767
      0336cbb5
    • Jeremy Kersten's avatar
      [FIX] website: res_config_setting in multi company · bb473003
      Jeremy Kersten authored
      Before this commit, if the first website in the select was not in your current
      company, it raises a traceback.
      
      Now with filter on your own company, and support empty website selected
      removing required on related field and using attrs dynamic to make it required
      
      closes odoo/odoo#30769
      bb473003
    • Lucas Perais (lpe)'s avatar
      [FIX] account: dates can be datetime.date or strings · 7e06f1a8
      Lucas Perais (lpe) authored
      Open the customers followup report
      on a line, click on its contextual menu (the down arrow next to invoice name)
      click change expected payment date
      
      Before this commit, there was a traceback, because the new date was a string
      which has no strftime function
      
      from 03c40e31 we learn that it can
      either be a string or a date object, as Odoo in v12.0 supports this
      
      After this commit, there is no traceback
      
      OPW 1933953
      OPW 1933979
      
      closes odoo/odoo#30756
      7e06f1a8
Loading