Skip to content
Snippets Groups Projects
  1. Nov 27, 2022
  2. Nov 20, 2022
  3. Nov 13, 2022
  4. Nov 06, 2022
  5. Oct 30, 2022
  6. Oct 23, 2022
  7. Oct 21, 2022
    • Dossogne Bertrand's avatar
      [FIX] hr_holidays: fix multiple-employee leave · a0e26df6
      Dossogne Bertrand authored
      
      Before this commit, creating a leave for multiple employees
      from the manager's page allowed to create leaves regardless
      of the concerned employee's allocations.
      After this commit, an error message will be displayed to inform
      which employee cannot take that leave.
      
      Also removes unused imports.
      
      task-2995120
      
      closes odoo/odoo#103729
      
      X-original-commit: 636a8276e6797c1d8fe43da61d2fd26b558bfa45
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      a0e26df6
  8. Oct 16, 2022
  9. Oct 09, 2022
  10. Oct 06, 2022
  11. Oct 02, 2022
  12. Sep 25, 2022
  13. Sep 20, 2022
  14. Sep 02, 2022
    • mafo-odoo's avatar
      [FIX] hr_holidays: no date_from creates error · 4e6e3e62
      mafo-odoo authored
      
      Probem:
      With some time off type as default type in an allocation request
      you get a traceback as soon as you try to open the allocation
      request form.
      
      Cause:
      FIX commit [1] introduced the issue as it didn't consider the
      possibility of a false date_from
      
      Improvement 1:
      Having a date_from False sets a False in the leave request name
      displayed on the form, we change that to have an empty string
      instead
      
      Improvement 2:
      The timezone bug fix in commit [1] is only applied on a specific
      configuration, we applie it to all configuration of leave request
      name
      
      [1] 5a50dea2652cff014d9198f59265cf36a3ec1865
      
      opw-2961344
      
      closes odoo/odoo#99454
      
      X-original-commit: 3b9a012e4a0839bc5da2daf51d56591d2863b4be
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      Signed-off-by: default avatarFockedey Martin (mafo) <mafo@odoo.com>
      4e6e3e62
  15. Aug 18, 2022
    • Kevin Baptiste's avatar
      [FIX] hr_work_entry_holidays: bump query counter · 1974f1a3
      Kevin Baptiste authored
      
      odoo/odoo#96545 added an extra query - the query count needs to be bumped.
      
      closes odoo/odoo#98348
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      1974f1a3
    • Philippe Wauthy's avatar
      [FIX] hr_holidays: remove allocation_id on hr.leave · d57aba65
      Philippe Wauthy authored
      
      As part of hr_holidays B2B, the holidays allowances were moved from hr_leave_type to hr_leave_allocation.
      This didn't allow to take a leave longer than the maximum duration of an allocation. Also, despite all the
      allocations could have enough days for a certain leave, it was not possible to use all available days without
      splitting the leaves across the different allocations.
      
      This commit moves the holidays allowance to the hr_leave_type to remediate the issues described above.
      
      task-2834887
      
      closes odoo/odoo#98317
      
      X-original-commit: 8c37d5c7cc397e517c43c1ec13a131b4b35e48b7
      Signed-off-by: default avatarphwa-odoo <phwa@odoo.com>
      d57aba65
  16. Aug 16, 2022
  17. Aug 02, 2022
    • Fabien Pinckaers's avatar
      [IMP] cleanup of help messages in all modules · 3363e55c
      Fabien Pinckaers authored
      
      This commit aims at removing unuseful help message to:
      1/ reduce translators work, to focus on more useful translations
      2/ not sending unuseful information in load_views
      3/ reduce help message to useful messages, so that we can mark
         fields having a tooltip in the future UI.
      4/ some cleanup of existing messages too
      
      The main use cases:
      - REMOVED: help redundant with the field name, providing no extra info
      - MOVED TO COMMENT: technical help messages, that should not be in UX
      
      closes odoo/odoo#97279
      
      Signed-off-by: default avatarFabien Pinckaers <fp@odoo.com>
      3363e55c
  18. Jul 08, 2022
  19. Jul 05, 2022
    • Raphael Collet's avatar
      [FIX] *: cache consistency · eb67feb5
      Raphael Collet authored
      
      In module mail, invalidating 'message_ids' on a mail thread also
      invalidates its inverse field 'res_id' on messages.  If you haven't
      flushed it before, your cache will be inconsistent, as shown by the test
      /mail:TestMailgateway.test_message_process_bounce_records_channel.
      
      In module purchase_stock, add depends on report.stock.quantity.  This
      ensures that when the model is queried after changes in other models,
      the data on which the SQL view depends is flushed to the database before
      querying that model's table.
      
      closes odoo/odoo#66938
      
      Related: odoo/enterprise#16722
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      Co-authored-by: default avatarVincent Schippefilt <vsc@odoo.com>
      eb67feb5
  20. Jul 01, 2022
  21. Jun 21, 2022
  22. May 25, 2022
  23. May 11, 2022
    • William Braeckman's avatar
      [IMP] hr_work_entry_contract: prep work for multiple sources · f51afa1e
      William Braeckman authored
      Prep work to allow work entries to be created from multiple sources when
      using contracts.
      The end goal is to be able to generate work entries from attendance as
      well as the planning app.
      After that the plan is to make sure the implementation works well with
      payroll for hourly wages.
      
      This commit contains the necessary changes for the next work_entry
      modules to work.
      
      TaskId-2466871
      f51afa1e
  24. May 03, 2022
    • Victor Feyens's avatar
      [IMP] *: remove useless keys from manifests · 42bad1a6
      Victor Feyens authored
      
      Remove most values uselessly specified because giving the same value as 
      the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
      
      * auto_install is Falsy by default
      * author is Odoo SA by default
      * summary & description are empty strings by default
      * application is False by default
      * test, demo, depends and data are empty lists by default
      
      This will reduce noise/inconsistencies between manifests specifications, 
      simplify analysis of manifests content, ...
      
      closes odoo/odoo#90209
      
      Related: odoo/enterprise#26807
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      42bad1a6
  25. Apr 13, 2022
    • William Braeckman's avatar
      [FIX] hr_work_entry: fix multi calendar issue with global time off · 84d8bf81
      William Braeckman authored
      
      When creating a global time off in one resource.calendar A , it will be
      propagated on any new resource.calendar B.
      However the reverse is not true, if I delete the global time off in
      calendar A it will not be deleted in calendar B.
      During the work entry generation this is not taken into account, a
      contract using calendar A will generate leave work entries because of
      the global time off in calendar B.
      This is due to a change in PR odoo/enterprise#15091.
      
      The domain is now correct and will only fetch the right leaves.
      
      TaskId-2627378
      
      closes odoo/odoo#88725
      
      X-original-commit: 0bac1d33a25e37ebece69de030b9fd72caa43a02
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      84d8bf81
  26. Apr 01, 2022
  27. Mar 30, 2022
  28. Mar 29, 2022
    • Gorash's avatar
      [IMP] *: remove `_render` from `ir.ui.view` and simplify report · 880954eb
      Gorash authored
      There were inconsistencies in the calls to `_render`.
      * the view context could contain information that misled developers.
      Indeed, the context and value of the view are not supposed to be found
      in the rendering. Thus by calling `ir.qweb` with the name of the
      template, we ensure that there is no unwanted information and in
      addition the cache key is that of the name of the template which saves
      a query.
      * the context used for rendering was modified by a method on
      `ir.ui.view`, except this is not information used by this model. There
      is now a `_prepare_environment` method residing on `ir.qweb`. This
      method allows to modify the value dictionary as well as the context in
      which the rendering will be done. This preparation of the data as well
      as my security check is done only once per rendering. This also saves
      some queries
      * Freeze options for rendering were inconsistent. It could be that
      options on which rendering depends were not part of the cache key. Thus,
      depending on the user who generated the generation of the rendering
      function, there was or was not information in the template. For example
      for automatic branding. This is no longer possible, because it is the
      context that is used. The options serving as a cache key are only
      recorded for information (for the profiling system for example). A
      simplification of the `ir.qweb.field` models could be made.
      
      The report rendering and call `ir.qweb` instead of `ir.ui.view`.
      
      Part-of: odoo/odoo#85110
      880954eb
  29. Mar 14, 2022
  30. Mar 07, 2022
  31. Mar 02, 2022
    • Vincent Schippefilt's avatar
      [IMP] *: use _read_group instead of read_group · 05fc9a67
      Vincent Schippefilt authored
      
      This commit modifies most of the usages of read_group and uses
      _read_group instead. _read_group doesn't join automatically on the
      many2one fields when no order_by is specified, making it more performant
      when the "name" of the many2one is not relevant, which is the case for
      most back-end cases
      
      closes odoo/odoo#84908
      
      Task-id: 2479334
      Related: odoo/enterprise#24877
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      05fc9a67
  32. Feb 02, 2022
  33. Jan 28, 2022
    • Rémy Voet (ryv)'s avatar
      [IMP] base: don't prefetch translate field by default · 5a573c6f
      Rémy Voet (ryv) authored
      
      Issue
      -----
      Via the field prefetch mechanism, when we need a value of one field
      (not in cache of course), the ORM will prefetch all fields
      (which has the attribute to `prefetch=True`, the default value of this
      attribute is `True`) for all record ids in `_prefetch_ids`.
      Then, for each translate fields (where translate is not a callable)
      the ORM need to make a `LEFT JOIN` on the `ir_translation` to fetch the
      translated value. For big model, it leads to a simple `SELECT` with
      several `LEFT JOIN` on ir_translation but each LEFT JOIN have a cost
      in the planner time (a small cost in the execution time) of PostgreSQL.
      
      By example, for `product.template` (stock/sale/purchase installed),
      there are 6 LEFT JOIN to get all translated fields (5 of this
      fields are rarely used).
      
      Proposed solution
      -----------------
      Deactivate the prefetch by default for all translate fields expect if
      this field is the `_rec_name` of the model (which is more likely to
      be used).
      
      In the example on the `product.template`:
      Without prefetching the translated fields, there is only one LEFT JOIN
      (the name, which is translated but is the `_rec_name` of the model).
      With the 6 translated fields to fetch, the
      query takes 5 ms to plan and 2 ms to execute VS with 1 translate field,
      it 1 ms to plan and 1.5 ms to execute.
      
      Side change note
      ----------------
      - All translate of fields of `website.seo.metadata` should be prefetch
      to avoid lot of website errors (it is because, website put in cache data
      in sudo before reading it without sudo)
      - `description` (`mail.message.subtype`), `subject` (`mail.template`),
      `body_html` (`mail.template`) should be prefetch to avoid lot of extra
      query from mail module.
      - `vat_label` (`res.country`) should be prefetch to avoid a extra query
      for each website page.
      - Increase some queryCount (when it is legit, due to `subtitle` of
      `blog_post` or `description` of `event.type.ticket`, etc)
      
      task-2738029
      
      closes odoo/odoo#82896
      
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      5a573c6f
  34. Jan 26, 2022
  35. Jan 12, 2022
  36. Nov 25, 2021
    • Philippe Wauthy's avatar
      [IMP] hr_holidays: show conflicting time off in validation error message · b6ef46f7
      Philippe Wauthy authored
      
      Description of the issue/feature this PR addresses:
      In hr_holidays, there is no information about the conflicting time off when a second time off is scheduled at the same time.
      There is a validation error saying "You can not set 2 time off that overlaps on the same day for the same employee".
      The validation error should display the conflicting time off
      
      Current behavior before PR:
      The validation error displays the following:
      "You can not set 2 time off that overlaps on the same day for the same employee"
      
      Desired behavior after PR is merged:
      The validation error will display the following:
      "You can not set 2 time off that overlaps on the same day for the same employee.
      Existing time off: Mitchell Admin / Trip with Family : 24.00 hours / from 06/09/2021 to 08/09/2021 / To Approve"
      
      task-2641682
      
      closes odoo/odoo#76452
      
      Related: odoo/enterprise#22490
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      b6ef46f7
  37. Nov 22, 2021
Loading