Skip to content
Snippets Groups Projects
  1. Feb 08, 2019
  2. Feb 07, 2019
  3. Feb 06, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] mail: create partner from template in right company · a46138cb
      Lucas Perais (lpe) authored
      Before this commit, when creating a partner automatically when creating
      a message with a template, the company on the partner was wrongly set
      
      After this commit, we try to retrieve the company from the model on the template
      
      OPW 1934392
      
      closes odoo/odoo#30893
      a46138cb
    • Lucas Perais (lpe)'s avatar
      [FIX] point_of_sale: resuscitate onchange amount all · 314088a5
      Lucas Perais (lpe) authored
      Make a return on a pos_order. A new pos_order is created.
      On the latter, remove a pos_orde_line.
      
      Before this commit, there was a traceback, due to a KeyError
      It was introduced by 5f6a4912
      which intended to optimize migration process
      
      We keep the logic of that commit here, in a new helper method
      while restoring the original onchange,
      since it wasn't compliant with onchange specs
      
      OPW 1934129
      
      closes odoo/odoo#30897
      314088a5
    • qsm-odoo's avatar
      [FIX] auth_signup: properly disable sign up button on click · 1a299e88
      qsm-odoo authored
      The feature introduced with https://github.com/odoo/odoo/commit/67d1173bf381befc136d840e232514c2c9ef7e1b
      was broken by https://github.com/odoo/odoo/commit/b78b9c87c95acdf6fcf4f4eb3a80efa0e90eae09#diff-2d8ecbf95567bb339109e9552cbc68a3
      because a class was removed by mistake.
      
      This commit does not reintroduce the class so that no view is modified
      in stable versions but rather review the JS to target the same button
      another way.
      
      Bug revealed while working on https://github.com/odoo/odoo/pull/29442
      
      closes odoo/odoo#30896
      1a299e88
    • Toufik Ben Jaa's avatar
      [FIX] crm: avoid crash when merging leads · fe03f7b6
      Toufik Ben Jaa authored
      - When merging leads that creates a partner, an error could be thrown
        due to the `res.partner` `default_get` method that reads values from the
        lead that creates the partner.
        The issue is due to the fact that the `crm.lead` record is merged (and
        unlinked), trying to read it will cause an error since the records
        doesn't exists anymore.
      
        This fix checks that the `crm.lead` we are trying to read from exists.
      
      closes odoo/odoo#30895
      fe03f7b6
    • Nans Lefebvre's avatar
      [FIX] survey: support custom server date format in (frontend) surveys · 98d04248
      Nans Lefebvre authored
      The library moment.js does not support custom date formats anymore.
      The following warning is given:
      Deprecation warning: value provided is not in a recognized ISO format.
      As a result, the moment contains 'Invalid Date',
      which would remove possibility to complete a survey containing a date
      in any format different than the default.
      
      opw 1930152
      
      closes odoo/odoo#30894
      98d04248
    • Aaron Bohy's avatar
      [FIX] web: only call name_get when necessary · 495d475d
      Aaron Bohy authored
      For many2one fields, 'default_get' only returns the id, whereas
      'onchange' (like 'read') returns an array with id and display_name.
      
      Before this rev., when creating a new record, we always called
      'name_get' for all many2ones, whether or not their value was
      obtained by 'default_get' or 'onchange', i.e. even if their
      display_name was already known.
      
      It may just look like unnecessary RPCs, but those RPCs could
      actually cause a crash when the user has access to the main model
      (and thus can access the display_name of the many2one thanks to
      related sudo), but doesn't have access to the many2one comodel.
      
      closes odoo/odoo#30892
      495d475d
    • 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
  4. Feb 05, 2019
  5. 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
  6. Feb 05, 2019
  7. Feb 06, 2019
  8. 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
  9. 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
  10. 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
  11. 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
Loading