Skip to content
Snippets Groups Projects
  1. Apr 27, 2023
  2. Apr 26, 2023
  3. Apr 25, 2023
    • Benjamin Vray's avatar
      [FIX] website, website_form: fix anchor link redirects · fb087dbe
      Benjamin Vray authored
      Before this commit, links scrolling to an anchor with a special
      character did not work and displayed a traceback. The issue was that to
      check that the anchor is valid, we don't need to check that the anchor
      is a valid url as we have been doing since these commits [1], [2]. But
      we only need to check if the jQuery selector is valid to correctly
      target the element to which the page must scroll.
      
      Indeed, the anchor widget returns stuff like 'ok%C3%A9%25' when typing
      'oké%' wich is not valid jQuery selector. It has to be encoded to
      '#ok\\%C3\\%A9\\%25' to be valid and that's what this commit does.
      
      We also changed the way to display a new anchor to the user in this
      commit. Before, we showed the anchor unencoded in a notification and now
      we show it encoded. That way, if the user copies the anchor from the
      notification, it's the real anchor.
      
      Also, this commit detect if the success URL of the redirect of a from is
      the current page to perform a scroll to the anchor instead of a
      redirect. To make this comparison, we needed to add the url code of the
      language of the current page to the session info.
      
      Also, before this commit, the page froze when we clicked on the "submit"
      button of a form that redirected to an anchor that did not exist.
      
      [1]: https://github.com/odoo/odoo/commit/0abfaeda96c2eaa868cc7fc5fa1926dfa90fc420
      [2]: https://github.com/odoo/odoo/commit/b492bde6a121be1c15ed90ce0827fcfd72a12f5c
      
      
      
      task-2172312
      
      closes odoo/odoo#82059
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      fb087dbe
    • Audric Onockx (auon)'s avatar
      [FIX] project: allow subsequent update · 61bbd8e6
      Audric Onockx (auon) authored
      
      Steps:
      Say 3 existing tasks :
      t0 (from which the recurrence has been created), t1, t2;
      and t4 (not created yet).
      When you change t0, t4 is updated as expected.
      
      Issue:
      But when you change t1, t4 doesn't take it into account.
      
      Cause:
      `ProjectTaskRecurrence._create_next_task` takes
      `recurrence.task_ids[-1]` as template to create the next occurence.
      Yet ProjectTask is ordered by "priority desc, sequence, id desc".
      All occurrences being likely to have the same priority and sequence,
      we the result ordered by id desc. So `recurrence.task_ids[-1]` has the
      smallest id and so it is the oldest one.
      
      Fix:
      Take the task with the max id.
      
      opw-3237168
      
      closes odoo/odoo#118979
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      61bbd8e6
    • thsh-odoo's avatar
      [FIX] crm: improve layout of conversion modal · 6a003a12
      thsh-odoo authored
      
      When converting a lead to an opportunity and merging with existing
      opportunities, the list view showing opportunities is very tiny.
      
      This is caused by the field not having the correct colspan, as its label is
      hidden with the "nolabel" attribute.
      
      This commit fixes it by assigning a colpan of 2.
      
      Task-3179173
      
      closes odoo/odoo#119215
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      6a003a12
    • Ricardo Gomes Rodrigues (rigr)'s avatar
      [FIX] stock_account: prevent stock account update on product change when using... · 1f888943
      Ricardo Gomes Rodrigues (rigr) authored
      [FIX] stock_account: prevent stock account update on product change when using manual stock valuation
      
      If the category of a product is using manual stock valuation, when changing the product on an invoice line,
      the account should not be set to the `property_stock_account_input_categ_id`. It should be the case only if
      we use automatic/real-time stock valuation.
      
      opw-3226536
      
      closes odoo/odoo#119535
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      1f888943
    • Josse Colpaert's avatar
      [FIX] l10n_es_edi_sii: the 21% ISP tax in itself is not isp · ab03b50c
      Josse Colpaert authored
      The tax 21% ISP actually behaves like a normal 21% tax
      (it gets reported in the same lines, ...)
      
      But the reason for its existence is that in case of the
      fiscal position Revendedor ISP...  it gets mapped to the
      0% ISP tax (which needs to be 0)
      
      Before, if you would however send a 21% ISP tax to the SII,
      it would be set as ISP and you would get an error telling
      that the tax rate should be 0 in case of ISP.  (but now, it
      will be reported as S1 and not trigger the error)
      
      See also discussion in
      https://github.com/odoo/odoo/pull/119339#issuecomment-1519720558
      
      
      
      closes odoo/odoo#119603
      
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      ab03b50c
    • Nshimiyimana Séna's avatar
      [FIX] account: allow sending invoice to partner other than the customer · 95c585f6
      Nshimiyimana Séna authored
      
      ## Bug
      
      When sending an invoice to a recipient who is not the customer, they are
      unable to view the invoice in the customer portal and are prompted to
      log in.
      
      ## Steps to reproduce
      
      1. Create and validate an invoice
      2. Click on the Send & Print button, then add a recipient who is not the
         customer associated with the invoice.
      3. Proceed to send the invoice.
      4. Access the email that was sent to the added recipient (who is not the
         customer)
      5. Using an incognito or private browsing window, open the link
         `View Invoice`
      
      => you should see that you are asked to log in, instead of being
      directed to the customer portal.
      
      opw-3114579
      
      closes odoo/odoo#118766
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      95c585f6
    • Yolann Sabaux's avatar
      [FIX] purchase: prevent unnecesary change of currency · 647e289c
      Yolann Sabaux authored
      Steps to reproduce:
      - put the currency of the bill to eur
      - change the partner with a partner with no purchase currency set
      
      Issue:
      The bill is re-set to usd
      
      Note:
      addendum to https://github.com/odoo/odoo/pull/116852
      
      
      
      opw-3233527
      
      closes odoo/odoo#118350
      
      Signed-off-by: default avatarCedric Snauwaert <csn@odoo.com>
      647e289c
    • Mathieu Walravens's avatar
      [FIX] http: rewind file upload on serialization failure · a856c465
      Mathieu Walravens authored
      
      Before this commit:
      When uploading a file, if the transaction fails due to a serialization
      failure, Odoo will retry the request. However, if a file upload is read
      during the transaction, the file pointer will be at the end of the file,
      and calling `.read()` again returns an empty bytes object.
      
      After this commit:
      Upon retrying the request, rewind uploads to the beginning of the file,
      if the file supports it.
      
      opw-3228200
      
      closes odoo/odoo#117669
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      a856c465
    • Nasreddin Boulif (bon)'s avatar
      [FIX] website_slides: Raise error if not responsible on invite · d341efaf
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
      - Install `E-learning` module
      - Create a user X with only "Officer" as rights for `E-learning`
      - Login with user X
      - Go to `E-learning` and open any course
      - Ensure that the user X is not the responsible and that the course
        enroll policy is set to "On invitation"
      - Invite any user not already a member
      
      Issue:
      
        No user was invited (not added as member) and no warning message
        raised.
      
      Cause:
      
        Due to the ir.rule "Channel: officer: create/write own only", the
        `Officer` user can only edit (and therefore invite members) on
        courses where he is responsible.
      
      Solution:
      
        Add a context key to the 'Invite' buttons in the `Form` and `Kanban`
        views of `slide.channel` model so that we can raise an error only in
        these flows if the user does not have the rights to invite members.
      
      opw-3133733
      
      closes odoo/odoo#111642
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      d341efaf
  4. Apr 24, 2023
  5. Apr 23, 2023
  6. Apr 21, 2023
  7. Apr 20, 2023
    • Arnold Moyaux's avatar
      [FIX] stock: prevent the import of stock.move.line with reserved quantity · 1a264d7d
      Arnold Moyaux authored
      
      Use case: Create an import file for a picking with stock.move.line directly in
      it and add some reserved quantity on the stock.move.line.
      
      The import of stock.move.line is not possible directly via a
      stock.move.line menu but it still possible on a picking or
      mrp.production import. However the create does not expect that
      and never reserve the quants. So it result with quant <-> sml
      inconcistencies in the data and the error can not reserve more
      than you have in stock.
      
      opw-3277938
      
      closes odoo/odoo#119201
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1a264d7d
    • Alvaro Fuentes's avatar
      [FIX] core: fix majorless upgrade · 9ae7a7d1
      Alvaro Fuentes authored
      
      When we compare majorless scripts we must ignore the Odoo version.
      Otherwise a module upgrade without major Odoo upgrade would fail to run
      local scripts majorless scripts. That's what happens for example when
      users click the upgrade button of a module.
      
      Example: upgrade from `11.0.1.0` to `11.0.2.0`, with a local `2.0` folder
      for upgrades.
      ```
      11.0.1.0 < 11.0.2.0 < 11.0.2.0 -> False (check before this patch)
           1.0 <      2.0 <=     2.0 -> True  (check with this patch)
      ```
      While still: upgrade from `11.0.2.0` to `12.0.2.0`
      ```
      11.0.2.0 < 12.0.2.0 < 12.0.2.0 -> False (before this patch)
           2.0 <      2.0 <=     2.0 -> False (with this patch)
      ```
      
      closes odoo/odoo#119148
      
      X-original-commit: 84ab74c62a19d08de8b6c7c4e3f3300d7e79bcf9
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      9ae7a7d1
    • Soukéina Bojabza's avatar
      [FIX] website_sale: fix cart popover on hover for all header templates · ecefa679
      Soukéina Bojabza authored
      
      Before this commit, when hovering the shopping cart in the "Boxed" and
      "Centered Logo" header templates, the cart popover was not appearing.
      
      This happened because the `websiteSaleCartLink` public widget was never
      started with these templates and so, hovering the cart had no effect.
      This is due to this widget selector which targeted a cart link located
      inside an element with id `#top_menu`, which is not the case in these
      templates where the cart link is located outside of it.
      
      This commit fixes this widget selector, in order for the cart link to be
      reachable in all header templates.
      
      opw-3267114
      
      closes odoo/odoo#118822
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      ecefa679
    • Daniel Kosky (dako)'s avatar
      [FIX] stock: don't replace product/inventory view groups · 43c888bb
      Daniel Kosky (dako) authored
      
      The current view replaces the existing groups attribute of the inventory
      page in the product template form view with two specified groups (with
      only one of these groups being newly introduced in stock).
      
      This commit changes the product view to utilise an xpath that adds the
      single new group (stock.group_stock_user), instead of replacing the
      content of the attributes.
      
      closes odoo/odoo#119200
      
      Related: odoo/enterprise#40074
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      43c888bb
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: if no VAT PartyTaxScheme should appear · 02f820fb
      Julien Van Roy authored
      
      If a partner has no VAT number (for instance: a public administration),
      the xml tag `PartyTaxScheme` should not appear for UBL Bis 3.
      
      opw-3263542
      
      closes odoo/odoo#119094
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      02f820fb
  8. Apr 19, 2023
  9. Apr 18, 2023
  10. Apr 17, 2023
    • Guillaume (gdi)'s avatar
      [FIX] website: add a robust utility to enter in edit mode · e02c3a18
      Guillaume (gdi) authored
      
      This commit creates a new util which clicks on edit and waits for the
      edit mode to be started. This way, we make sure that the edit mode is
      enabled before testing the next step of the test. This avoids race
      conditions during tests.
      
      Note that we leave the old clickOnEdit util as it could be used in
      custom codes and we don't want to break them.
      
      task-3203820
      
      closes odoo/odoo#116490
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      e02c3a18
    • Benoit Socias's avatar
      [FIX] web_editor: deselect snippet when clicking on empty content · fc720940
      Benoit Socias authored
      
      When clicking on the pseudo-block that appears in an empty page, the
      snippet icons bounce. However, if a snippet is selected it is not
      deselected and the icons are not visible.
      This is a problem after the previous commit because if an item is
      selected within an "On Hover" mega menu when this pseudo block is
      clicked, the mega menu is closed, but the snippet remains selected.
      
      This commit removes the snippet selection before bouncing the icons to
      avoid this problem.
      
      Steps to reproduce:
      - Add a mega menu.
      - Set "Sub Menus: On Hover".
      - Select an element inside the mega menu.
      - Click on the "DRAG BUILDING BLOCKS HERE" pseudo-block.
      
      => The mega menu was closed, but its inner element remained selected.
      
      task-2825376
      
      closes odoo/odoo#110258
      
      Signed-off-by: default avatarVray Benjamin (bvr) <bvr@odoo.com>
      fc720940
Loading