Skip to content
Snippets Groups Projects
  1. Nov 28, 2022
  2. Nov 27, 2022
  3. Nov 25, 2022
    • Antoine Dupuis (andu)'s avatar
      [FIX] account: Deferred income wiz - don't reconcile draft entries · e6a2cda1
      Antoine Dupuis (andu) authored
      
      When creating draft deferred entries in a reconcilable account,
      we should not attempt to reconcile them, because only posted entries
      can be reconciled.
      
      closes odoo/odoo#106565
      
      X-original-commit: edaf019e
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      e6a2cda1
    • Guillaume (gdi)'s avatar
      [FIX] website: prevent carousel indicators errors · 5a80e5d9
      Guillaume (gdi) authored
      In this commit [1] (merged in 16.0) a bugfix has been made in the
      `removeSlide` function but this one should have been applied on all
      supported versions because the bug it fixes is present on all versions.
      The bug it fixes is the following:
      - Drop a carousel block on a page
      - Remove the *first* slide
      
      => There is no active indicator.
      
      Moreover, the bugfix made in 16.0 [1] introduces another error: when a
      slide is removed from the carousel the indicators are not in a correct
      state anymore.
      
      Following the same steps with the changes of [1]:
      - Drop a carousel block on a page
      - Remove a slide
      
      => Indicators are no longer consistent with the slides so tracebacks
      appear during the carousel slides. The list of indicators must have on
      each element a `data-slide-to` attribute which must reflect the
      position of the slide (starting with 0).
      
      So this commit is to backport the fix from 16.0 [1] to 14.0 and to fix
      the new bug that [1] introduces.
      
      [1]: https://github.com/odoo/odoo/commit/f7055d3dbabfbe471f490bd65c2032f5251f3f37
      
      
      
      task-3040931
      opw-3051615
      
      closes odoo/odoo#106611
      
      X-original-commit: 16405934
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5a80e5d9
    • Guillaume (gdi)'s avatar
      [FIX] website: scroll to the next visible element · de727635
      Guillaume (gdi) authored
      
      Before this commit, the buttons to scroll to the next element might not
      work if the next element was invisible.
      Steps to reproduce the bug fixed by this commit:
      
      (Note that these steps are only reproducible from 15.0. We decided to
      merge this fix in 14.0 to be custo-friendly)
      
      - Install two languages on a website
      - Drop a cover block (1), with a height of 100% and a scroll down button
      - Drop a new block (2) only visible for language B below the block 1
      - Drop a new block (3) visible for everyone below the block 2
      - Save and go to the site in language A
      - Click on the scroll down button
      
      => No scroll at all while the user expects to scroll to the block
      visible to everyone (3). This commit fixes that by making the user
      scroll down to see the next visible element.
      
      opw-2967706
      
      closes odoo/odoo#106455
      
      X-original-commit: 076d7ac7
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      de727635
    • Nicolas Bayet's avatar
      [FIX] web_editor: check method addNeutralStyle · ce068a31
      Nicolas Bayet authored
      
      Because of css limitation, the child of a parent that define a
      text-decoration cannot "neutralize" that decoration defined by its
      parent with a css property (ie. the text-decoration cannot be
      overridden).
      
      When a block define an inline style or any tag that have a class, the
      method `formatSelection` tries to "neutralize" the style by calling
      `addNeutralStyle`. As it is impossible to "neutralize" the style for
      underline nor strikeThrough, there is no method `addNeutralStyle`
      defined for those properties.
      
      Before this commit the method `formatSelection` was crashing because
      `addNeutralStyle` was not defined.
      
      Task-3002123
      
      closes odoo/odoo#105953
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      ce068a31
    • Jinane Maksoud's avatar
      [FIX] mrp: fix the filter order in _bom_find_domain · 2a73890d
      Jinane Maksoud authored
      
      Only active boms should be returned by the domain even if
      they match a product id.
      
      closes odoo/odoo#106449
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      2a73890d
    • Donatas's avatar
      [IMP] website_sale: adds search_product to shop values · 3772da47
      Donatas authored
      
      closes odoo/odoo#106447
      
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      3772da47
    • Walid HANNICHE (waha)'s avatar
      [FIX] web: adding toggle to view with studio · 1b09a631
      Walid HANNICHE (waha) authored
      
      Steps to reproduce:
      - edit RFQ model with studio
      - add a toggle widget to the product list
      - activate/deactivate the toggle multiple times on different products
      
      Bug:
      sometimes the element on the widget is undefined when trying to rerender
      
      Fix:
      check the element is defined before trying to render it
      
      opw-3013024
      
      closes odoo/odoo#103186
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      1b09a631
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: search model: one2many search default labels · 95ef4253
      Mathieu Duckerts-Antoine authored
      
      When a one2many is used as a search default, its label has to be fetch
      via a name_get in order to get a correct display of the facet
      corresponding to that field in the search bar. It turns out that the
      search model did not wait properly the return of the name_gets before to
      start to compute the facets.
      
      closes odoo/odoo#106522
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      95ef4253
    • Julien Van Roy's avatar
      [FIX] {l10n_}account_edi_ubl_cii{_tests}: handle price_include taxes · 9a5ba15c
      Julien Van Roy authored
      
      In Factur-X, there is no way to represent a tax "price_include" because
      every amounts should be tax excluded.
      
      Currently in Factur-X, a line with a tax price_include = True will be
      incorrectly exported. Indeed, the Factur-X.xml is generated by setting the
      GrossPriceProduct as the price_unit. In Factur-X, this amount (and the others
      in the line details) should be tax excluded. Thus, it's wrong to set the
      GrossPriceProduct as the price_unit.
      
      To fix this, the GrossPriceProduct should be the price_unit if no tax
      price_include = True is set, otherwise, the gross price = price_unit/(1+tax/100).
      
      This way, the Factur-X file will be consistent with the norm.
      
      Note that the import of a Factur-X xml will thus try to pick taxes with price_include = False,
      and the price_unit will be tax excluded. If no matching tax with price_include = False is
      retrieved, a tax with price_include = True is searched, if found, the price_unit is
      recomputed accordingly. In both cases, the lines subtotals are the same.
      
      opw-3032382
      
      closes odoo/odoo#106465
      
      X-original-commit: 649e0f2d
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      Signed-off-by: default avatarJulien Van Roy <juvr@odoo.com>
      9a5ba15c
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: fix the error that the name of the line is too long · d4b91b6c
      Mathieu Duckerts-Antoine authored
      
      - Currently the label of the lines is not limited to the number of characters. When the user gives a name that is too long, the graph will not be displayed.
      - This commit limits the number of labels, if exceeded it will display as ...
      
      closes odoo/odoo#106149
      
      X-original-commit: 11dc2cec
      Signed-off-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      d4b91b6c
    • Kevin Baptiste's avatar
      [FIX] hr_holidays: take full day leaves on Day view · 6bc2a933
      Kevin Baptiste authored
      
      The default hours of a time off created from the Day view would be the
      range of hours that was selected in the calendar view, thus resulting in
      leaves of half an hour.
      
      closes odoo/odoo#106513
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      6bc2a933
    • Walid HANNICHE (waha)'s avatar
      [FIX] sale_coupon: move all discounts to the end of the sale_order · 2bb3bef3
      Walid HANNICHE (waha) authored
      update to this PR[1]
      
      BUG:
      some discounts are still displayed on the middle of the order
      
      FIX:
      move all discounts to the end
      
      [1]:https://github.com/odoo/odoo/pull/102700
      
      
      opw-2985632
      
      closes odoo/odoo#106508
      
      X-original-commit: af8cc475
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      2bb3bef3
    • Thomas Lefebvre (thle)'s avatar
      [REV] hr_holidays: check time off responsible to choose approvers · 9da57e31
      Thomas Lefebvre (thle) authored
      This reverts commit https://github.com/odoo/odoo/pull/106401/commits/bff333873c77e4879f6b991ed67ed9986f8dbf8e
      
      
      
      It was not a bug.
      Users are automatically added to the Time Off Responsible group when they are added as approvers on an employee
      If the user does not have the access rights it is because they have been manually removed.
      
      opw-3062225
      
      closes odoo/odoo#106505
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      9da57e31
    • Valentin Vallaeys (vava)'s avatar
      [FIX] payment_sips: wrong numerical code for PLN currency · d9856868
      Valentin Vallaeys (vava) authored
      
      closes odoo/odoo#106466
      
      X-original-commit: 94dd698d
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      Signed-off-by: default avatarVallaeys Valentin (vava) <vava@odoo.com>
      d9856868
    • Loan (lse)'s avatar
      [FIX] pos_adyen: JS error in loop if deleted Adyen payment line · 332ebba5
      Loan (lse) authored
      
      Before this commit:
       If we remove a payment line using an Adyen payment method,
       `pending_adyen_line()` return `undefined`.
       With the `_poll_for_response` still being executed,
       it will pop some JS traceback each call with:
       ```js
       TypeError: Cannot read properties of undefined (reading 'terminalServiceId')
       ```
      
      After this commit:
       No JS traceback loop
      
      OPW-3032391
      
      closes odoo/odoo#106431
      
      X-original-commit: 52a517ca
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      332ebba5
    • Aurélien (avd)'s avatar
      [FIX] res_currency: add order by to _select_companies_rates query · 84dee296
      Aurélien (avd) authored
      
      PG12 introduced an optimization for CTEs that automatically inlines
      CTEs if they are only refered once in the parent query. Prior to that
      CTEs were always materialzed, meaning that PG created a sort of temp
      table on the fly to store the result of the CTE's evaluation.
      
      Whereas this leads to performance improvements in general, in the
      particular case of _select_companies_rates this inlining becomes a
      performance bottleneck. This is because while the currency_rate CTE
      is only refered once in both purchase_report and product_margin,
      the join condition (cr.date_end is null or cr.date_end > ...)
      requires evaluating the CTE's date_end subquery twice. This, combined
      with the fact that in PG12 the planner goes for a Nested Loop JOIN instead
      of a HASH Join in PG10 makes the performances of the whole query
      much worse in PG12 than in PG10.
      
      Adding an ORDER BY (or an OFFSET 0, the resulting plan is the same)
      creates a kind of optimization fence that forces PG to evaluate the
      subquery first using its own plan. This removes the need to rescan the
      subquery each time the Merge JOIN filter has to be applied, which
      is a good strategy in this specific situation.
      
      The same result could be achieved by adding the keyword "MATERIALIZED"
      in the CTE definition. The issue is that this keyword did not exist
      in PG 10 so using it would require to check the PG version at runtime
      from python.
      
      Examples of query timings change before and after PR:
      
      Number of POs | Before PR | After PR
            2000    |     7s    |    345ms
            7000    |     23s   |    1.1s
      
      opw-2930578
      
      closes odoo/odoo#106086
      
      X-original-commit: 8b7a3941
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      84dee296
    • Walid HANNICHE (waha)'s avatar
      [FIX] stock_picking_batch: remove create button · 3bc3631d
      Walid HANNICHE (waha) authored
      
      Bug:
      - enable wave transfers
      - Kanban view should not have a create button
      
      Fix:
      removed the button
      
      opw-2978078
      
      closes odoo/odoo#99970
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      3bc3631d
    • William Henrotin's avatar
      [PERF] mrp,stock,purchase: sql improvement · e94937b6
      William Henrotin authored
      
      First correction: force a simple order to `read_group` in order to avoid
      useless joints on table product_template and ir_translation when the
      grouping key is a Many2One.
      
      Second correction: add an index on workorder's `state` field. The
      get_conflicted_workorder_ids() method search for ready workorders that
      are in conflict relate to their planning. The state value is searched to
      many times to not index it
      
      closes odoo/odoo#106436
      
      Task: 2852423
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      e94937b6
    • Fernanda Hernández's avatar
      [FIX] pos_restaurant: validate number of guest put by user · 0ff14cc8
      Fernanda Hernández authored
      
      The user could make the mistake to put a large number in the `Guests`
      input in the POS order and this is not validated, even an number more large
      for the capacity of an integer, raising an uncontrolled error:
      
      `psycopg2.errors.NumericValueOutOfRange: integer out of range`
      
      this commit is adding a validation error in order to limit the number of `Guests`
      with the maximum number for an integer:  2**31 - 1
      
      closes odoo/odoo#105393
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      0ff14cc8
  4. Nov 24, 2022
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr_holidays: check time off responsible to choose approvers · 0d50121f
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
          - install the "hr_holidays" module;
          - remove the "Time Off Responsible" group of a user (activate developer mode);
          Remark: the user must not be an "Administrator" or a "Time Off Officer"
          - for an employee add this user as approvers for time off;
          - with a user which matches the employee, request time off;
          - if the user, whose rights have been removed, has "Handle in Odoo" in his preferences, he will receive a notification;
          - try to approve the demand of employee leave.
      
      Issue:
          The user does not have access rights but he has been chosen as approver.
      
      Cause:
          It is possible to select any user to approve leaves without checking if he has the access rights.
      
      Solution:
          Add a domain to be able to select only users who are in the "Time Off Responsible" group.
      
      opw-3062225
      
      closes odoo/odoo#106401
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      0d50121f
    • Nicolas Martinelli's avatar
      [FIX] account: do not call `button_install` is not necessary · deba6cb3
      Nicolas Martinelli authored
      
      If the method `_auto_install_l10n` is called programmatically on a DB
      where the localization has already been installed, useless processing is
      performed by `button_install`.
      
      Do not call this method if no module need to be installed.
      
      closes odoo/odoo#106381
      
      X-original-commit: 11e9d3f1
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      deba6cb3
    • William Henrotin's avatar
      [FIX] mrp: adapt product model · 952830b1
      William Henrotin authored
      
      Commit 40b32b39 open the bom overiew
      report with a fallback to the product template in case the bom is a
      defined on a template without any variant (the product template has
      dynamic attribute variant).
      
      This commit adapts the product model (product or template) on report's
      links
      
      closes odoo/odoo#106349
      
      Related: odoo/enterprise#34314
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      952830b1
    • Yolann Sabaux's avatar
      [FIX] website_event_booth_sale: display price correction · 12113f08
      Yolann Sabaux authored
      Steps to reproduce:
      - Create a price list with different currency and discount with "show price and discount to the customer"
      - On the website select this pricelist and try to select the booth
      
      Issue:
      The displayed price will not be the correct one
      
      Note:
      This is an issue discovered during the correction of https://github.com/odoo/odoo/pull/101375 (forward-port of https://github.com/odoo/odoo/pull/85640
      
      )
      It allows to have the correct price depending of the currency of the pricelist applied.
      Now the unlink of the rate makes the new rate directlt effective. There is no need of having a `new_company` anymore.
      
      Summary:
      - view modification in `website_event_booth_sale` -> price of selected booth,  simplification of comparison for the `<del>`
      - view modification in `website_event_sale` : simplification of comparison for the `<del>`
      - backend test modification in `website_event_[booth_]sale` common: addapt the rate; take out useless `new_env`; simplified pricelists creation
      - tour test addition:  added the tour for essential use cases in event and event_booth; simplified the command so it is more readable
      
      related ticket:
      opw-2766997
      
      closes odoo/odoo#101559
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      12113f08
    • Adrien Widart (awt)'s avatar
      [FIX] delivery: add compute dependency · faaec3a6
      Adrien Widart (awt) authored
      
      The method `package_without_carrier` depends on `package_carrier_type`
      
      closes odoo/odoo#106378
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      faaec3a6
    • Fernanda Hernández's avatar
      [FIX] pos_restaurant: get all draft orders from server in one call · a98b784b
      Fernanda Hernández authored
      After this [commit](https://github.com/odoo/odoo/commit/f6ceac07a077531c873f0715b8de5c384bb06ae5
      
      ),
      when the user clicks on `Orders` in a session of a POS,
      the method is retrieving the all orders from backend to the POS
      and it's calling to the backend one time per each
      table per each floor configured in the POS.
      
      Then if you have 4 floors, with 30 tables on each floor,
      only by clicking in Orders,
      it calls 120 times the method to the backend.
      
      With this change, only one call is made to open Orders and synchronize
      the orders from server
      
      closes odoo/odoo#104930
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      a98b784b
  5. Nov 23, 2022
Loading