Skip to content
Snippets Groups Projects
  1. Jun 22, 2023
    • Stanislas Gueniffey's avatar
      [FIX] web_editor: do not remove default styles · e8fd1c36
      Stanislas Gueniffey authored
      Previously, when copy-pasting HTML with styles on styleable tags, those
      styles could still be removed by the editor if they had a default value.
      This was supposed to be a way to keep the DOM clean and lighter.
      
      However, styles with default values still serve a purpose when
      overriding non-default values inherited by their parents. Therefore,
      removing them was a conceptual mistake.
      
      One example in the editor where this purpose can be served is in
      tables where spans can override the style of the cell or parent span.
      
      This commit ensures we no longer remove style attributes because of
      their default value.
      
      Task-3332955
      
      X-original-commit: 0c097311
      Part-of: odoo/odoo#124527
      e8fd1c36
    • thsh-odoo's avatar
      [IMP] web: adapt the kanban "Remove" button label · 008f3e79
      thsh-odoo authored
      
      Remove button is shown when the view of our field is in kanban mode.
      
      When our field is one2many it will delete the record and when our field is
      many2one it will remove the record.
      
      So many times user get confuse that they are deleting the record or removing
      the record.
      
      So to clear out the confusion this commit changes the label of remove to
      to delete if the field is one2many.
      
      A test was added to ensure this ux change.
      
      Task-3185967
      
      closes odoo/odoo#118702
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      008f3e79
  2. Jun 21, 2023
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr: prevent launch plan for archived employee · ecc32425
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      The "Launch Plan" button appears for an archived employee.
      It causes a traceback.
      
      Solution:
      ---------
      Do not display the button for an archived employee.
      
      opw-3366815
      
      closes odoo/odoo#125896
      
      X-original-commit: 6536a88b
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      ecc32425
    • Deependra Solanki's avatar
      [FIX] mass_mailing: added 1rem padding top to footer · 2085057a
      Deependra Solanki authored
      
      Before this commit:
      
      The mass mailing footer had no padding top.
      
      After this commit:
      
      Added 1rem / 16px of padding top to the footer.
      
      Task - 3323881
      
      closes odoo/odoo#121248
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      2085057a
    • Bastien (bvdn)'s avatar
      [FIX] project: avoid traceback on stat button click · 2ccfa8ce
      Bastien (bvdn) authored
      
      - steps to reproduce bug:
        In project.task sharing form view, When clicking on any of the stat buttons (subtasks or parent task)
        when you arrive on the actual task formview a MissingError saying 'missing record' appears
      - Issue:
        The record loads accordingly but the Missing Error shouldn't appear
      
      - Cause:
        It is coming from the project_sharing_form_compiler which gave the projectSharingId props to the ChatterContainer element
        but the projectSharingId is equal to the "props.record.context.active_id" of the action, and in the context of the
        chatter we want the active_id to be equal to the project_id, which was the case when we are coming from the KanbanView and
        sub-list views but when coming from the task stat button the active_id is equal to the task_id and the env can't find
        the document 'project.project' with the id of the task. (in portal.py _document_check_access())
      - Fix:
        We simply change the projectSharingId to take the "props.record.contect.active_id_chatter" the give an
        active_id_chatter= active_id in the Project Sharing task_action which will always equal the Id of the project
      
      Task-3284755
      
      closes odoo/odoo#119832
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      2ccfa8ce
    • Guillaume Dieleman's avatar
      [IMP] web_editor: add touchscreen support for the editor · 142684db
      Guillaume Dieleman authored
      
      Before this commit, website and email editing was very limited on
      devices that have a touchscreen. The blocks tab, the we-lists, ... were
      unusable.
      Example of issues (on a device that has a touchscreen):
      - The users cannot drag & drop snippets in the page.
      - The users cannot reorder the values of a multiple checkboxes field.
      - ...
      
      This commit allows to handle touchscreen events by translating them
      into mouse events to allow users to fully use the editor.
      
      opw-3195487
      
      closes odoo/odoo#114485
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      142684db
    • Florian Charlier's avatar
      [FIX] website_forum: fix tag posts count dependencies · 4bd34c28
      Florian Charlier authored
      
      Post counts were not updated when a post was created or deleted
      because of missing dependencies in the _compute.
      
      Note that while "active_test" is included when counting without
      specifying it, the field must be explicitly added to the `_compute`'s
      dependency list to trigger it.
      
      Task-3358143
      
      closes odoo/odoo#125869
      
      X-original-commit: f09291da
      Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
      4bd34c28
    • Romain Derie's avatar
      [IMP] website: make website_nightly build work before 16.4 · e4609309
      Romain Derie authored
      We have introduced a new tag `website_nightly` which is linked to a
      custom build on the nightly.
      It has been introduced with this commit [1].
      
      The goal is to extract the `external` tagged tests linked to the website
      app to another special build linked to the website team.
      Otherwise, we would not see when the test fail, as the `external` build
      of the nightly is always red and we don't check why all the time.
      
      Encapsulating this in a new build and linking to our team means that
      whenever the test fail in a nightly, we will be visually warned on the
      runbot homepage by a red warning, see screenshot on the PR of this
      commit.
      
      Sadly, before 16.4, as there is not yet `website_nightly` tours, the
      build is considered failed, showing the error.
      Another solution would have been to somehow disable this tour on Odoo
      versions < 16.4 but it we opted for this solution as:
      - It's simpler, no need to add yet another custom stuff in runbot
      - It will work out of the box should be introduce such a test in those
        versions: we won't need to ask runbot to activate the test in another
        version, should we even think about it..
      
      [1]: https://github.com/odoo/odoo/commit/a0d0afb20594aa103eb1d0476d53012b9821e861
      
      
      
      closes odoo/odoo#125847
      
      X-original-commit: 2402ce27
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      e4609309
    • clesgow's avatar
      [FIX] purchase_requisition: Add missing data on report · 926c6b4a
      clesgow authored
      
      On the Blanket Order PDF (as well as other purchase agreements), the
      vendor isn't specified on the report while it is a required and
      significative field on the purchase agreement.
      Added it like in the purchase order PDF.
      
      Also added in the Custom Description field into the PDF as it may
      contain useful information as well.
      
      Task-3358385
      
      closes odoo/odoo#125554
      
      X-original-commit: ee92e8c8
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      Signed-off-by: default avatarQuentin Wolfs (quwo) <quwo@odoo.com>
      926c6b4a
    • Arthur Detroux (ard)'s avatar
      [FIX] web: mitigate navigation error on iOS/iPadOS devices · ff78ee49
      Arthur Detroux (ard) authored
      
      Ever since iOS 16.4, going back and forth through a website with the
      cache enabled, creates an error in the console which Odoo tries to
      handle but fails to do so. Therefor a generic CORS error message
      appears.
      
      There is unfortunately no proper way to fix this bug on our end so
      instead, this commit tries to mitigate the error by returning early and
      not showing the traceback dialog.
      
      I (ARD) have submitted a feedback through Apple's Feedback Assistant app
      and will subsequently remove this commit when Apple releases an update
      that fixes this.
      
      opw-3281727
      
      closes odoo/odoo#125463
      
      X-original-commit: 2981378e
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      ff78ee49
    • Benoit Socias's avatar
      [FIX] website: avoid failing switching mode while image is selected · 3860d576
      Benoit Socias authored
      Since [1] an error is raised when switching the Mode of an Images Wall
      from Float to Grid or Masonry while an image is selected.
      The display of the size of the image is being updated while its option
      panel is not there anymore.
      
      This commit prevents this error from happening by setting up the grid
      layout with clones of the images instead of the images themselves.
      This leads to the construction of a new editor for the new image.
      
      Steps to reproduce:
      - Drop an Images Wall snippet.
      - Switch Mode to Float.
      - Select an image.
      - Switch Mode to Grid.
      
      => Traceback.
      
      [1]: https://github.com/odoo/odoo/commit/2cbb691a84ce186ddd34a2a4c76d95671ed6e834
      
      
      
      task-2990053
      
      closes odoo/odoo#125396
      
      X-original-commit: ef3d8aa2
      Signed-off-by: default avatarBenjamin Vray (bvr) <bvr@odoo.com>
      3860d576
    • roen-odoo's avatar
      [FIX] pos_sale: downpayment refund correctly added to origin order · b772cb4e
      roen-odoo authored
      
      Current behavior:
      When you refund a downpayment in the PoS, the downpayment is not added
      to the original order.
      
      Steps to reproduce:
      - Create an order in the sales app
      - Open the PoS and make a downpayment for the order
      - Refund the downpayment you just made
      - Go back to the original order in the sales app, the downpayment is
        correctly added, but the refund of the downpayment is not added.
      - The order should contain : The original product, the downpayment and
        the refund of the downpayment.
      
      opw-3275708
      
      closes odoo/odoo#125357
      
      X-original-commit: 02a67b42
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      Signed-off-by: default avatarRobin Engels (roen) <roen@odoo.com>
      b772cb4e
    • Ryan Cen's avatar
      [FIX] hr_expense: Add inverse on total_amount to update unit_amount · ae5c782e
      Ryan Cen authored
      
      The customer was having an issue where they would create an expense from an email with the wrong cost on the expense.
      Then when they would try to change the price on the expense record it would seem find all the way up until the journal was posted.
      
      Issue:
      When creating an expense from an email the unit_amount is updated instead of the total_amount.
      This would cause issues if you had an attachment because when you would attempt to change the amount through the front-end this unit_amount would never get updated because it was set and there was an attachment (line 265).
      However, when you would create a journal entry from this expense, because it has the unit_amount != 0 it would provide the unit_amount instead of the total_amount.
      Thus propogating the original number from the email even if it was updated between the time of posting and the creation of the expense from the email.
      
      Solution:
      Implement an inverse function on total_amount that will update the unit_amount to total_amount_company.
      This will cause the unit_amount to stay up to date with the total_amount while also taking into account currency.
      
      opw-3286372
      
      closes odoo/odoo#122012
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      ae5c782e
    • Saurabh Choraria's avatar
      [FIX] base_geolocalize: update log when request to openstreetmap fails · 9f828ef2
      Saurabh Choraria authored
      
      When the user will not get an HTTP response as 200 while retrieving the location
      using OpenStreetMap Nominatim service, the logger error will occur.
      
      The logger is updated to use the 'warning' level instead of the 'error' level.
      This change reflects a less severe logging level for cases where a request to
      OpenStreetMap fails.
      
      sentry-4151622143
      
      closes odoo/odoo#125809
      
      X-original-commit: a73a65ef
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      9f828ef2
    • Jurgen (jugj)'s avatar
      [IMP] hr_recruitment : Hide create employee on applicant if not hired stage · ab5584d0
      Jurgen (jugj) authored
      
      task-3372999
      
      closes odoo/odoo#125209
      
      Related: odoo/enterprise#42656
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      ab5584d0
    • Harald Panten's avatar
      [ADD] l10n_es: new tax IRPF 24 rendimientos del capital · 01dfc368
      Harald Panten authored
      
      closes odoo/odoo#124897
      
      X-original-commit: 39f23ac5
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      01dfc368
    • Arthur Detroux (ard)'s avatar
      [FIX] website: Fix footer Slide Hover glitching on Safari · 9920d428
      Arthur Detroux (ard) authored
      
      Prior to this commit, when using the "Slide Hover" reveal effect on the
      footer, Safari would glitch it scrolls and could result in unreadable
      content.
      
      This commit fixes this by a weird hack that seems to work. Adding an
      element with a background-image and a background-attachment set to
      fixed seems to resolve the issue.
      
      task-3302302
      
      closes odoo/odoo#125260
      
      X-original-commit: 5766aefcd354e89094c8e650b29529301e39d49d
      Signed-off-by: default avatarDieleman Guillaume (gdi) <gdi@odoo.com>
      Signed-off-by: default avatarArthur Detroux (ard) <ard@odoo.com>
      9920d428
    • MerlinGuillaume's avatar
      [FIX] web: reposition popover when image is loaded · 60a72cfd
      MerlinGuillaume authored
      
      When hovering over an employee's photo (without edit rights) and the
      image hasn't been loaded in the cache, the popover is positioned to the
      right of the image. With a big image, the popover can be outside of the
      page.
      
      Steps to reproduce:
      1. Install Employees and set a 4k image to any employee
      2. Remove all the rights of Marc Demo on Employees
      3. Connect as Marc Demo
      4. Open the form of the employee with the 4k image
      5. Hover on the employee photo
      6. The image position is off
      
      Solution:
      Update the position of the popover when the image is loaded and restrict
      the image width in the popover to the popover width
      
      Problem:
      When we try to find the best position to display the popover and the
      image is not loaded, we will find that there is some room for the
      popover on the right because the image has no height or width
      
      opw-3281649
      
      closes odoo/odoo#124794
      
      Signed-off-by: default avatarBruno Boi (boi) <boi@odoo.com>
      60a72cfd
  3. Jun 20, 2023
    • Antoine Guenet's avatar
      [FIX] web_editor: properly convert svg shapes · 3e9fa219
      Antoine Guenet authored
      
      When converting inline svg shapes to images, we checked if the source
      ended with ".svg", which is not enough, as it can include query
      parameters (eg, .svg?color=red). We now simply check if it includes
      ".svg" instead.
      
      We also need to make sure we didn't make a clone of the image in an mso
      before converting it, as the source wouldn't get converted in the mso.
      
      closes odoo/odoo#125764
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      3e9fa219
    • xO-Tx's avatar
      [FIX] web_editor: keep the observer active while adding link hint class · ce2ea13d
      xO-Tx authored
      After preventing "async" code on link tools update in [1], the
      `'link_tools'` test is still failing because of another race condition
      issue:
      
      The click on "save" after setting the link style to secondary triggers
      an event handler that destroys the link tools widget (see `Wysiwyg` >
      `destroyLinkTools()`), leading to calling the `_removeHintClasses()`
      method first (both `_addHintClasses()` and `_removeHintClasses()` will
      disable the editor observer while adding / removing the link hint
      class to prevent their mutations to be recorded...).
      
      Since the observer is inactive, the changes made to the link using the
      link tools will not be processed, and the block will not be set as
      `.o_dirty`.
      
      As mentioned previously, (and starting from [2]) the editor observer is
      inactive (while handling the `.oe_edited_link` class) in order to
      prevent recording the mutations... But since [3], the editor had the
      ability to prevent some classes (including `.oe_edited_link`) from being
      taken into consideration in the `filterMutationRecords()` method...
      
      The goal of this commit is to fix this race condition issue by simply
      keeping the observer activated while handling the link hint class...
      
      Remarks:
      
      - These changes are supposed to fix the `link_tools` test that fails on
      16.0+, but 15.0 was targeted here since the `.oe_edited_link` class is
      ignored by the editor starting from 15.0 and also to prevent any future
      issue linked to disabling the observer...
      
      - Adding and removing the `active` class should not affect the history,
      since it targets the `linktTools` toolbar button...
      
      [1]: https://github.com/odoo/odoo/pull/109250/commits/f42715fdc89a6a88446c5f88ecec29e6a9c96fe1
      [2]: https://github.com/odoo/odoo/pull/90064/commits/26377710a6e3ad61a8c266e9f7c0b8ade98f657d
      [3]: https://github.com/odoo/odoo/commit/1c25ddb42393b136cac2a0ee0b9b7280fd803e7d
      
      
      
      runbot-18747
      
      closes odoo/odoo#125755
      
      X-original-commit: 6a15cbe7
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      ce2ea13d
    • Arnold Moyaux's avatar
      [FIX] mrp: merge moves in pick before manufacturing · 119f04d3
      Arnold Moyaux authored
      
      Use case:
      It happens that a product is consumed in different operations.
      So it needs two distinct BoM lines. Since commit [1] the stock.move
      in pbm are not merged. However [1] was design for kit.
      In our case we would like to have only one stock.move for all the
      quantities.
      
      The fix is not perfect because it won't work if we confirm at the
      same time a move with a kit and without it. But at least it will let
      people using MO without kit has the correct behavior
      
      + remove a duplicate of the function
      
      [1] commit 741d2fe9
      
      closes odoo/odoo#125733
      
      X-original-commit: f7414901
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      119f04d3
    • Mathieu (mano)'s avatar
      [FIX] *: minor settings spacing issues · 2484cb13
      Mathieu (mano) authored
      
      The purpose of this commit is to review the responsiveness and spacing
      of some settings that were visually broken.
      
      The nested checkboxes were growing too much on smaller screens
      making the content overflow.
      
      This commit adapts these checkboxes settings to make them more readable
      and consistent.
      
      Task-3113372
      
      closes odoo/odoo#108902
      
      Related: odoo/enterprise#35323
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      2484cb13
    • Guillaume (gdi)'s avatar
      [IMP] test_website: add a test of multi websites settings · dd0ccfd5
      Guillaume (gdi) authored
      
      In the website settings, one of the fields allows you to switch settings
      from one website to another. Unfortunately, as soon as the user did this
      the record was considered to have changed (dirty) and therefore required
      a save when it wasn't necessary. The previous commit prevents the header
      settings (like the website switcher) from dirtying the record. This was
      really necessary because as soon as a user had several websites, it was
      impossible for him to access certain settings on all these websites
      (except the first one). As soon as the setting performed an action, a
      save was required (because the record was dirty) and the user was
      redirected to the settings again.
      Steps to reproduce the issue before the previous commit:
      
      Install website
      Have multiple websites
      Go to Settings > Website Settings
      Change the website
      => The user is notified that the record has changed and needs to be
      saved, which is not true. So far it's annoying but not critical, but if
      the user continues:
      
      Activate the "Extra step during checkout" option
      Click on "Configure Form"
      => The Save/Discard dialog appears because the record is dirty.
      
      Click on "Save"
      => The user is redirected to the settings page again and cannot access
      the form configuration of the second website. (it is the same issue for
      most of actions).
      
      The previous commit fixes the issue and this commit adds a test to
      ensure that the users are able to change settings of multiple websites.
      
      task-3265100
      
      closes odoo/odoo#125550
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      dd0ccfd5
    • jpp-odoo's avatar
      [FIX] web: Settings headers should not be dirty · 50421af7
      jpp-odoo authored
      
      When a user changes a header setting, the record should not be marked as
      dirty. If the user clicks on a button, the save dialog should not be
      shown.
      
      Next commit will bring a functional test and "steps to reproduce" of
      this issue in website.
      
      task-3265100
      
      Part-of: odoo/odoo#125550
      Co-authored-by: default avatar"Guillaume (gdi)" <gdi@odoo.com>
      50421af7
    • Josse Colpaert's avatar
      [FIX] l10n_sa_edi: tests · aed2f6a6
      Josse Colpaert authored
      
      closes odoo/odoo#124901
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      aed2f6a6
    • Mehdi Bendali Hacine's avatar
      [ADD] l10n_sa_edi: Implement Saudi ZATCA invoicing standards · e5dd9dd2
      Mehdi Bendali Hacine authored
      The ZATCA edi has an onboarding process which happens per journal.
      A private key is generated for the company and with the data from
      the company and journal a CSR is made to get a certificate to sign the
      invoices.  In that process that contains multiple steps (see account_journal.py),
      we also have to send the compliance files which are some example (simplified or not)
      invoices/debit and credit notes.  We have a separate folder with those files
      and also use them in the tests.  For the onboarding, they still need to be signed however.
      
      For the sending of the customer invoices themselves, UBL 2.1 is used, but
      with ZATCA style adaptations.  That is why we inherit from that class
      to be able to add those specific adaptations.  This UBL needs to be
      signed XadeS and in this case we need to do the hash with the sign information
      present but with empty tags.
      
      For ZATCA invoices, as is the case with Ticketbai, the previous hash is needed
      for the next invoice and is stored per journal.  (so we have a chain of hashes)
      
      Tests written by Simon (smdc)
      
      Part-of: odoo/odoo#124901
      e5dd9dd2
    • Mehdi Bendali Hacine's avatar
      [IMP] account_edi_ubl_cii: Add function to apply filter on tax values · 65c564b9
      Mehdi Bendali Hacine authored
      For SA, we need to be able to filter on the taxes exported, as
      certain taxes should simply not be reported in the UBL.
      
      Part-of: odoo/odoo#124901
      65c564b9
    • Mehdi Bendali Hacine's avatar
      [IMP] l10n_sa: Update QR code & Rename 15% tax group to VAT Taxes · 84adbb6e
      Mehdi Bendali Hacine authored
      + to comply with ZATCA provide a better demo VAT number
      
      Part-of: odoo/odoo#124901
      84adbb6e
    • Hugo Carlier (Huca)'s avatar
      [FIX] project: avoid warning when selecting tags of a task · 104ac540
      Hugo Carlier (Huca) authored
      
      Currently, when selecting tags for a task with no project (private
      task) on mobile, a warning is displayed. On top of that, the amount
      available tags is way more limited than in classical view and the
      selection of some exesting tags is impossible.
      
      Steps
      =====
      1. Warning when selecting tags
      - Install module project
      - In mobile view, go to the view "Tasks -> My Tasks"
      - Open or create a private task (task with no project)
      - Click on the tags field
      
      A warning is displayed (on the server logs) stating:
      "The domain term '('project_ids', 'in', False)' should use the '=' or
      '!=' operator."
      
      2. Limited tag choice
      - Install module project
      - In mobile view, go to the view "Tasks -> My Tasks"
      - Open or create a private task (task with no project)
      - Click on the tags field
      - The tags that are only related to project(s) are not displayed in this
        view
      - Try to create a tag with the same name than an existing tag that does
        not appear.
      - A traceback is displayed because this tag already exists.
      
      Cause
      =====
      As noted from the test of expression.py, M2M fields in the domain should
      be compared to list of elements. It is not the case here. When a
      project_id exits in the context, nothing happens, but there exists a
      check in the ORM to ensure that '=' or '!=' operator is used if the
      second element of the domain leaf is a boolean. In this case, there is
      not project_id set in the context for private task, resulting in
      the previous warning (False used instead of project_id).
      
      Fix
      ===
      We use the improved implementation of _name_search to get the ordered
      list of id of records project.tags to display. This list has the
      advantage to not be restricted to the current project, while still
      presenting the tags of the current project at the top of the list. The
      mobile view uses the method search_read to get the list of project.tags
      record values, therefore we call the _name_search in this method and use
      an optimized sorting function to sort the resulting records accordingly.
      
      task-3302370
      
      closes odoo/odoo#110814
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      104ac540
    • Antoine Guenet's avatar
      [FIX] mass_mailing: update iframe size on pick template · 387c4fb8
      Antoine Guenet authored
      
      When picking a mailing template, the size of the contents of the iframe
      changes but we failed to signal it so the iframe could resize as well.
      
      closes odoo/odoo#125740
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      387c4fb8
    • Saurabh Choraria's avatar
      [FIX] event_sms: check model of sms template · 745bcab5
      Saurabh Choraria authored
      
      When notification type is set as sms we need to check whether the template
      which is referenced is coming from a correct model or not.
      
      Applying this commit will fix this issue.
      
      sentry-4195133685
      
      closes odoo/odoo#125709
      
      X-original-commit: 6cb268230cab571fe39ee755b06b24a2a3cd5579
      Related: odoo/enterprise#42827
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Signed-off-by: default avatarSaurabh Choraria (sauc) <sauc@odoo.com>
      745bcab5
    • Martin Maes's avatar
      [FIX] stock,mrp: formatting numbers >= 1000 is wrong · c8a73861
      Martin Maes authored
      In https://github.com/odoo/odoo/pull/123074
      
      , the fix done did not take the formatting of numbers
      bigger (or equal) than 1000 into account.
      For example, 1000 become "1.000,00" and parsing it again will return a 1.
      
      To fix this, simply modified the thousandsSep to an empty array
      
      closes odoo/odoo#124963
      
      Signed-off-by: default avatarSteve Van Essche <svs@odoo.com>
      c8a73861
    • mega-odoo's avatar
      [FIX] web_editor: prevent error when edit the float, monetary section in website · df36c838
      mega-odoo authored
      
      'replace() argument 1 must be str, not bool' is generated if the user edit a
      float or monetary section in the website view.
      
      Steps to Reproduce
      
      - Make debugger mode ON.
      - Go to Settings > Translations > Languages.
      - Remove the value of the 'Thousands Separator' field from the current user
      language.
      - Install the 'eCommerce' module.
      - Go to the website.
      - Go to the shop menu, and click any product from the product list.
      - Click on the Edit button and try to edit any float or
      monetary section like a product price (eg. change a product price from 750 to
      70) and click on the Save button.
      
      And traceback will be generated.
      
      Applying this commit will resolve this issue.
      
      sentry-4148693017
      
      closes odoo/odoo#125667
      
      X-original-commit: b895175c
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      df36c838
    • Géry Debongnie's avatar
      [FIX] sale: sol_product_many2one should not crash · 328f0ae8
      Géry Debongnie authored
      
      The `sol_product_many2one` field is a sub many2one field that should
      open the proper configuration system, such as the product configurator.
      
      Before this commit, when inputting some data, then clicking on another
      notebook tab, we would often see a crash, because the field has been
      destroyed (since it is no longer in the current tab) and it tries to
      open the configurator, which requires rpcs.
      
      It is usually a problem when a destroyed component tries to perform some
      work. Note that it happens at creation and update. Also, the field
      overrides some many2one methods that display confirmation dialog. To fix
      this, this commit simplifies the field by only calling the configuration
      methods when its value has changed. This is a different strategy that
      does not interfere with the many2one basic features. Also, it does not
      crash since it will only call the configuration methods on patched, so
      it is guaranteed to be alive.
      
      It is certainly not a complete solution, since we should probably move the
      code somewhere else not in a field widget, but this would require a
      redesign of the code, so it is not appropriate in a bug fix anyway.
      
      Note that the tour had to be adapted, since now the methods
      _onProductUpdate/_onProductTemplateUpdate are now called in an effect
      (so after a render), which is slightly later than before. But the tour
      would click on confirm even before the product update code was executed,
      which means that the product was not properly configurated.
      
      This is clearly a concurrency problem: the product configuration code
      should be properly coordinated with the basic model, but doing so is a
      significative change. Also, in practice, it is not worse than before
      this commit.
      
      opw 3178297
      
      closes odoo/odoo#123264
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      328f0ae8
    • Saurabh Choraria's avatar
      [FIX] base: prevent traceback when Portal User Template is not found · f1906f4b
      Saurabh Choraria authored
      
      When user deletes 'Portal User Template' record from 'res.users' model and when
      'action_open_template_user' function is executed at that time traceback is
      generated on the user side as well as in the log.
      
      Steps to reproduce:
          1. Install Website module.
          2. Go to settings > Users&Companies > Users.
          3. Remove Internal Users from default filter.
          4. Add Inactive Users in filter and delete Portal User Template.
          5. Go to Website Settings > Privacy > Customer Account.
          6. Click on Free sign up and then on Save button.
          7. Now in Website Settings click on Default Access Rights button.
          8. The error will occur.
      
      Applying this commit will fix this issue.
      
      sentry-4184456381
      
      closes odoo/odoo#121757
      
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      f1906f4b
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: orm: protect webSearchRead · a60a477b
      Mathieu Duckerts-Antoine authored
      
      The values for the key "async" found in some services is used to declare
      async methods that should be "protected". The hook "useService" makes sure
      that no code used to process results of those protected methods is
      executed by a destroyed component. The orm method "webSearchRead" was
      not protected due to a "typo".
      
      closes odoo/odoo#125679
      
      X-original-commit: 2899888a
      Signed-off-by: default avatarGéry Debongnie <ged@odoo.com>
      a60a477b
  4. Jun 19, 2023
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: orm: protect nameGet · c2b9f14f
      Mathieu Duckerts-Antoine authored
      
      The values for the key "async" found in some services is used to declare
      async methods that should be "protected". The hook "useService" makes sure
      that no code used to process results of those protected methods is
      executed by a destroyed component. The orm method "nameGet" was
      not protected due to a "typo".
      
      closes odoo/odoo#125627
      
      Signed-off-by: default avatarGéry Debongnie <ged@odoo.com>
      c2b9f14f
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: search panel: fields should not be added in search bar · 7c56a518
      Mathieu Duckerts-Antoine authored
      
      Let us consider the search arch
      
          <search>
              <field name="foo"/>
              <searchpanel>
                  <field name="bar"/>
              </searchpanel>
          </search>
      
      The two tags "field" are supposed to generate different objects:
       - the first one should generate an entry in the search bar autocompletion
       - the second one should generate a search panel section.
      
      It turns out that the second field did also generate an entry in the
      search bar. This is of course wrong. We fix that problem and add a test.
      
      closes odoo/odoo#125594
      
      X-original-commit: 15aefa56
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      Signed-off-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      7c56a518
    • William Henrotin's avatar
      [FIX] point_of_sale: apply cogs on delivery picking only · e6587794
      William Henrotin authored
      
      Commit 1e82e273 adds cogs account move lines for 'ship later'
      config at the picking validation. The issue appears if the delivery flow
      is in multiple steps. The account move lines will be created for each
      pickings.
      
      This commit ensure the last one actually create the aml only
      
      closes odoo/odoo#125358
      
      Opw: 3324972
      X-original-commit: b7e3db6f16e0ce42b226fecce05dfa5b586190fd
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      e6587794
    • William Henrotin's avatar
      [FIX] point_of_sale: use correct account in ship later pickings · c6048244
      William Henrotin authored
      Commit 1e82e273 makes ship later option create additionnal account
      move line for Cogs at delivery validation. The issue is the accounts was
      not correct. The desire result should be the following for a product of
      cost 10, sale price 11 and 15% taxes.
      
       At PoS Closing                             | Debit | Credit
      -------------------------------------------------------------
      215000 Taxes 15%                            |  0.00 |   1.50
      200000 Pos account                          |  0.00 |  11.00
      600000 Expenses                             |  0.00 |   0.00
      101200 Account Receivable                   | 11.50 |   0.00
      110300 Stock interim (delivered)            |  0.00 |   0.00
      -------------------------------------------------------------
                                                  |       |
       At delivery validation (manually created)  |       |
      -------------------------------------------------------------
      110300 Stock interim (delivered)            |  0.00 |  10.00
      600000 Expenses                             | 10.00 |   0.00
      -------------------------------------------------------------
                                                  |       |
       At delivery validation (from stock layers) |       |
      -------------------------------------------------------------
      110100 Stock valuation                      |  0.00 |  10.00
      110300 Stock interim (delivered)            | 10.00 |   0.00
      
      Opw: 3324972
      X-original-commit: b7e3db6f16e0ce42b226fecce05dfa5b586190fd
      Part-of: odoo/odoo#125358
      c6048244
Loading