Skip to content
Snippets Groups Projects
  1. Jul 11, 2023
    • Walid HANNICHE (waha)'s avatar
      [FIX] website_sale_delivery: correct adress states · ce02b27a
      Walid HANNICHE (waha) authored
      Steps to reproduce:
      - set shipping methods country to mexico (empty states)
      - fill an order on website on check out select seprate shipping/billing
      - on billing set country as US
      - on shipping the only country avialable is mexico
      - avialable states are the ones from the US not mexico
      
      Bug:
      the states are set from the country of the customer even though it isn't
      an option on any carrier.
      bug was introduced by this commit[1]
      
      Fix:
      revert the mentioned commit(1) since a new commit[2] was introduced that
      correctly handles that use case too
      
      [1]:https://github.com/odoo/odoo/commit/d59fe9c58c2dcc2bf6613adb7ac3662597b50496
      [2]:https://github.com/odoo/odoo/commit/297641da69982d6c76bd591296636b479cabf657
      
      
      
      opw-3230361
      
      closes odoo/odoo#126054
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      ce02b27a
    • Nasreddin Boulif (bon)'s avatar
      [FIX] mail,test_mail: message_route; filter emails with wrong domain · 9fa128c1
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install CRM and Helpdesk modules (for test purposes)
        - Set a custom alias domain (e.g. "mydomain.com")
        - Go to CRM > Configuration > Sales Teams
        - Check that a team has en email Alias (e.g. "info@mydomain.com")
        - Go to Helpdesk > Configuration > Helpdesk Teams
        - Check that a team has en email Alias (e.g. "support@mydomain.com")
        - Email your instance with the following `to` value:
          info@mydomain.com, support@test.com
          (notice second email does not match the DB alias domain)
        - Go to CRM : A task has been created
        - Go to Helpdesk : A ticket has been created
      
      Issue:
      
        The ticket in Helpdesk should not have been created.
      
      Cause:
      
        The message_route method does not check the domain of the email
        address before creating the routes.
      
      Solution:
      
        If `mail.catchall.domain.allowed` system parameter is set, filter to
        only keep the emails address that match the allowed domains (including
        domain set in `mail.catchall.domain` system parameter).
      
        The value of `mail.catchall.domain.allowed` system parameter should
        be a comma separated list of domains. e.g. `example.com,example.org`
      
      opw-3150972
      
      closes odoo/odoo#115213
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9fa128c1
    • Gurupreet Singh's avatar
      [FIX] hr_timesheet: Fix progress bar value in project task view · c0baca3f
      Gurupreet Singh authored
      
      Description of the issue/feature this PR addresses:
      In the project task view, add initially planned hours 0.05 and assigned a
      complete value to the the task then the progress bar shows the wrong value
      
      Current behavior before PR:
      when adding the  00:05 planned hours and assigning the complete duration the
      The progress bar value is not right
      
      Desired behavior after PR is merged:
      progress bar value should be right
      
      task-3280609
      
      closes odoo/odoo#119020
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      c0baca3f
    • Saurabh Choraria's avatar
      [FIX] website_slides: prevent traceback while accessing archived embedded slide · 6d4b02ac
      Saurabh Choraria authored
      
      When user archive a slide from a course and try to access route
      '/slides/embed/<int:slide_id>' of that particular slide, user get the error.
      
      steps to reproduce:
          1. Go to Website and click on courses menu.
          2. Open a course and archive a slide in it.
          3. Then go to '/slides/embed/<int:slide_id>' route.
          4. Access that particular slide that you have archived in route.
          5. The error will occur.
      
      Applying this commit will fix this issue.
      
      sentry-4025579653
      
      closes odoo/odoo#120280
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      6d4b02ac
    • Tommy Ng's avatar
      [FIX] hr_contract: fix new contracts searching with correct state · aaf36439
      Tommy Ng authored
      
      Current behaviour:
      Next contracts searching will search incorrect state.
      
      Expected behaviour:
      Next contracts should not contain draft state contract.
      
      Explanation:
      Contracts state field new state should use the value draft.
      
      closes odoo/odoo#121335
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      aaf36439
    • Tommy Ng's avatar
      [CLA] signature for SlaveWilson · f158abd5
      Tommy Ng authored
      Part-of: odoo/odoo#121335
      f158abd5
  2. Jul 10, 2023
    • Julien (jula)'s avatar
      [FIX] website_form: prevent crashing while parsing python dict in JS · d6351108
      Julien (jula) authored
      
      __Description of the issue:__
      - The `replace` method in JS only replace the first occurrence of a
      string (unless `g` flag is used in the regex)
      - There could be an apostrophe (`‘`) in a string value which would be
      replaced by a quote (`“`)
      - There could be “None”, “False” in a string value which would be
      replaced too
      - “True” is not taken into account
      
      __Description of the fix:__
      Those regex are meant to deal with more edge cases when transforming a
      python dict to a JSON in JS. However there are still ways it could go
      wrong. For the forward port in master, it could be a good idea to
      consider converting dictionnaries directly in the backend using the
      `json` python library.
      
      __Steps to reproduce the issue:__
      1. Edit the view `website_form.contactus_form`
      (If `website_crm` is installed, either uninstall it or disable the
      `website_crm.contactus_form` view)
      2. At line 4, change the attribute `t-att-data-values` to a more
      complicated dict like:
      ```
      "{'email_to': res_company.email, 'name': 'Alice True', 'age': None, 'active': True, 'attr1': None , 'attr2': False , 'attr3': 'let\'s go'}"
      ```
      3. Go to `/contactus` on the website
      ↳ Traceback
      
      opw-3328690
      task-3340946
      
      closes odoo/odoo#124975
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      d6351108
    • Ivan Rasputin's avatar
      [FIX] mass_mailing_event_sms: add missing dependency · add78c90
      Ivan Rasputin authored
      The module `mass_mailing_event_sms` extends couple methods [1] that are defined
      in  module `mass_mailing_event` [2]. However, because of the missing dependency
      in manifest, user can uninstall `mass_mailing_event`, while keep
      `mass_mailing_event_sms` installed. This leads to error `'super' object has no
      attribute 'action_invite_contacts'` [3].
      
      Fix it by adding the missing dependency explicitly.
      
      [1]: https://github.com/odoo/odoo/blob/fd508fe436c64780a8454ddeb6b7ec8f1f80d7c5/addons/mass_mailing_event_sms/models/event.py
      
      [2]:
      https://github.com/odoo/odoo/blob/fd508fe436c64780a8454ddeb6b7ec8f1f80d7c5/addons/mass_mailing_event/models/event.py#L23
      
      [3]: https://online.sentry.io/issues/4280254156/
      
      
      
      closes odoo/odoo#127221
      
      Signed-off-by: default avatarIvan Elizaryev (iel) <iel@odoo.com>
      add78c90
    • Aurelien van Delft (avd)'s avatar
      [FIX] mail: avoid serialization errors with multiple tabs · 50f5ab70
      Aurelien van Delft (avd) authored
      
      A serialization error can happen when chatting with another
      user from the company. To reproduce:
      
      - Log into Odoo as User A
      - Open another Odoo tab in the same window as User A
      - In private mode log into Odoo as User B
      - Send a message via chat from User B to User A.
      
      A concurrent update happens in channel_fetched method when writing
      on mail_channel_partner.fetched_message_id.
      
      To fix that, update the field
      through raw SQL using FOR NO KEY UPDATE SKIP LOCKED in select subquery.
      This skips the row should it be already locked, which is fine
      as we only need to first transaction in the queue to complete.
      
      opw-3164584
      
      closes odoo/odoo#121509
      
      Signed-off-by: default avatarMatthieu Stockbauer (tsm) <tsm@odoo.com>
      50f5ab70
  3. May 15, 2023
  4. Jul 09, 2023
  5. Jul 07, 2023
    • Romain Derie's avatar
      [FIX] web_editor: avoid fetching optimized images which can't be shown · 74a79ce6
      Romain Derie authored
      
      Before this commit, when opening the media dialog, the optimized images
      would be fetched too.
      An optimized image is an image related to an original one which received
      some modification (crop etc).
      Those optimized images are hidden by default, and can only be shown when
      toggling the "Show optimized" option, which can be shown only in debug
      mode.
      
      So, fetching those images outside debug mode is:
      1. Useless, as we don't do anything with those and never show them
      2. Buggy sometimes, as a full patch of "Load more" images could be
         composed of only optimized images, meaning the "load more" will
         actually look like it did nothing, as all received images are (and
         will remain) hidden.
      
      There is a tiny exception: if the edited image is an optimized one, we
      still need to fetch it's attachment so we can show this image in the
      media dialog as selected.
      
      This fix thus filter out all the optimized images (except the one from
      the explained exception) from the `search_read()`.
      
      opw-3372811
      
      closes odoo/odoo#126817
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      74a79ce6
    • Robin Lejeune (role)'s avatar
      [FIX] website_editor: use background image on the right element · ab0ae8da
      Robin Lejeune (role) authored
      Commit [1] addressed the following situation: when we have a parallax on
      an element, it adds the background on a `<span>` child of said element
      instead of applying it directly on the element. Retargeting the `<span>`
      is needed to display all the options linked to the background image.
      
      Following [1], building blocks whose children are allowed to have a
      background image are also applied their 1st child's background when one
      of their children's background is modified. This happens because, when
      changing the background of a child item, `BackgroundOptimize` is called
      both on the child and on the main snippet due to
      `_onBackgroundChanged()` bubbling up and `_loadImageInfo()` targetting
      any child in the tree with the class `.oe_img_bg`.
      
      This commit prevents `_onBackgroundChanged()` from bubbling up and
      modifies the behavior from [1] by making sure the element identified as
      the target within `_loadImageInfo()` can only be either the original
      target or the parallax element.
      
      Steps to reproduce:
      - Drop a carousel building block
      - Change its style to bordered
      - Change the background image of the 2nd slide
      => the background of the entire snippet is also changed. It is then
      impossible to remove the image on the snippet.
      
      [1]: https://github.com/odoo/odoo/commit/31ba906
      
      
      
      task-3349669
      
      closes odoo/odoo#124083
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      ab0ae8da
  6. Jul 06, 2023
  7. Jul 05, 2023
    • Claire Bretton (clbr)'s avatar
      [FIX] l10n_ch: Swiss QRCode relax origin country constraint · 8819dc40
      Claire Bretton (clbr) authored
      
      We allow creation of QR-Bill codes when they are issued from
      another country than Switzerland.
      
      Steps to reproduce :
      1. Set a valid Swiss QR-IBAN account on your company.
      (Contact > CH Company > Accounting tab > Bank Accounts:
      Set account number to `CH21 3080 8001 2345 6782 7`.)
      2. Set the CH Company's country to something else than Switzerland.
      3. Create a Swiss partner (be sure to set all address/ZIP/city/country=CH).
      4. Create an invoice to that Swiss partner and post it.
      5. Click Print QR-BILL, it will raise an error.
      
      closes odoo/odoo#124681
      
      Task: 3359821
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      8819dc40
    • Michael (mcm)'s avatar
      [FIX] web: set valid required value in multi edit list · 90b86c07
      Michael (mcm) authored
      
      Before this commit, when the user sets a required
      numeric field to 0 in a list in multi edition or a required
      boolean field to false the value was considered as invalid
      and a warning dialog was displayed.
      Now, these values are considered as valid and the change
      is saved.
      
      task id: 3340266
      
      closes odoo/odoo#123093
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      90b86c07
    • Yolann Sabaux's avatar
      [FIX] hr_expense: set correct account_id on upload · e232f3ea
      Yolann Sabaux authored
      Steps to reproduce:
      - On the expense product by default, set an account_id
      - Upload an expense
      
      Issue:
      The account_id that we set is not the one on the newly created expense
      
      Cause:
      We don't give any account_id during creation. Therefore, the account_id by default is set:
      https://github.com/odoo/odoo/blob/7bcd64c51b2e87ece462c75a528c9ad6e1601633/addons/hr_expense/models/hr_expense.py#L31-L32
      
      
      
      opw-3343007
      
      closes odoo/odoo#126825
      
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      e232f3ea
    • Nasreddin Boulif (bon)'s avatar
      [FIX] sms: keep sms format when sending mass sms · 11503de9
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce the bug:
      
        - Install mass_mailing_sms module (for test purpose)
        - Go to Contacts and open list view
        - Select a contact and click on "Actions -> Send SMS Text Message"
        - Write a message on multiple lines and click on "Send Now"
        - Open partner form view
      
      Issue:
      
        The message is not displayed on multiple lines in the chatter.
      
      Cause:
      
        The message is converted to plain text while should be converted to
        HTML for logging.
      
      Solution:
      
        Convert the message to HTML (like it is done when sending not in mass)
      
      opw-3301577
      
      closes odoo/odoo#127346
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      11503de9
    • Adrien Widart (awt)'s avatar
      [FIX] mrp: set default dest loc of by-products · b4e28dee
      Adrien Widart (awt) authored
      
      To reproduce the issue:
      1. In Settings, enable
         - Storage Locations
         - By-Products
      2. Edit the warehouse:
         - Manufacturing: 3 steps
      3. Create four products
      4. Create a BoM:
         - Product: P01
         - Components: P02
         - By-products: P03
      5. Create a MO
      6. Add P04 to by-products
      7. Confirm the MO
      8. Open the detailed operations of P04
      
      Error: When trying to add a new SML for P04, the default destination
      location is `WH/Pre-Production`, it should be `WH/Post-Production`
      
      OPW-3340274
      
      closes odoo/odoo#127358
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      b4e28dee
  8. Jul 04, 2023
    • Arnold Moyaux's avatar
      [FIX] stock: Usererror during PO import · b2495a94
      Arnold Moyaux authored
      
      Usecase to reproduce:
      - Create and validate a PO + receipt
      - Import a file containing a different PO line quantity
      
      Expected behavior:
      The PO line is modified and the receipt has the a new move
      
      Current behavior:
      UserError asking to modify the quantity done of stock.move.line instead
      reserved quantity.
      
      Following commit 76ad7b7d
      
      The purpose is to block import with reserved quantity
      
      It happens because the PO line import trigger the creation of a new
      stock.move and reserve it (create the stock.move.line). However since
      it's created by the system the data are correct.
      
      There is no issue in multiple step since the internal step requires
      the move_orig_ids and thus the product_uom_qty is empty
      
      To fix it:
      - Relax the constraint to only consider sml having an impact on quant
      
      opw-3336131
      
      closes odoo/odoo#127245
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      b2495a94
    • Benjamin Vray's avatar
      [FIX] website: fix anchor selector not updating · c9dbfd35
      Benjamin Vray authored
      
      Steps to reproduce the bugs:
      
      - Add a banner on the homepage
      - Click on the "create a link to target this section" button.
      - Edit the anchor name to "bannerAnchor".
      - Drop the image-text snippet.
      - Double click on the button inside the snippet.
      - Choose the homepage as the URL ("/")
      - Open the "Page Anchor" select, choose "#bannerAnchor"
      - Validate the changes.
      - Double Click on the snippet button again.
      - First bug: The URL properly shows "/#bannerAnchor" but the page anchor
      select does not show anything.
      - Open the page anchor select again.
      - Second Bug: the "bannerAnchor" option does not appear as a choice.
      
      This commit fixes the two bugs described above.
      
      task-3378864
      
      closes odoo/odoo#126393
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      c9dbfd35
    • Thomas Lefebvre (thle)'s avatar
      [FIX] project: add default description with quick create · 91d6ef8a
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      -------------------
      - to be in debug mode;
      - add a description in an existing task;
      - go to Set Defaults in the debug mode;
      - add a default description;
      - add project id as a condition;
      - go to the kanban view of the project;
      - create a task;
      
      Issue:
      ------
      Default description is not present.
      
      Cause:
      ------
      The description must be added as a parameter
      to the onchange in order to be set to the default value.
      The fields passed as parameters are the view's active fields.
      Active fields are found during  parsing
      of the `quick_create_task_form` view arch.
      Unfortunately, the latter does not contain the `description` field.
      
      Solution:
      ---------
      Add `description` field to be detected as an active field
      of the quick create view.
      
      opw-3381088
      
      closes odoo/odoo#127097
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      91d6ef8a
    • Julien (jula)'s avatar
      [IMP] tools: make arch diff viewer prettier · bc188d62
      Julien (jula) authored
      When investigating an issue on a customer database, the diff view modal
      can be pretty useful. However it is not very good looking and therefore
      poorly readable.
      
      This PR improves the CSS styling of that modal so that it resemble more
      the diff view of GitHub. This is done by:
      - Increasing the width of the modal
      - Aligning the text to the top of the table cell, that way there is no
      text floating in the middle of two lines
      - Lightly coloring the whole line when there is a change on it while the
      actual change is on a darker background
      - Putting in red all types of change on the left and in green on the
      right (instead of mixing green, red and orange together)
      
      This commit is improving the tool that was made at [`96d3fa4e`](https://github.com/odoo/odoo/commit/96d3fa4e01bf8afc35dbf0b7301ce75c6bf3a5c7
      
      )
      
      closes odoo/odoo#123677
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      bc188d62
    • Pedram (PEBR)'s avatar
      [FIX] point_of_sale: prevent additional blank page in print receipt · 81feb39a
      Pedram (PEBR) authored
      
      Before this commit, when a user tried to print a receipt, sometimes
      an additional blank page was being printed. This was due to the
      printed content slightly exceeding the printable area of the page,
      leading to an unintended second page.
      
      To solve this issue, I set the height of all elements to 0 during
      printing, and explicitly set the height of the receipt container
      to auto.
      
      opw-3376131
      
      closes odoo/odoo#127191
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      81feb39a
  9. Jul 03, 2023
  10. Jul 02, 2023
  11. Jun 30, 2023
    • Josse Colpaert's avatar
      [FIX] l10n_it_stock_ddt: the date should be the date done and not the created · 04040957
      Josse Colpaert authored
      
      opw-3266332
      
      closes odoo/odoo#121445
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      04040957
    • David (dafr)'s avatar
      [FIX] stock_account: valuation layer is zero when twice return dropshipping · a7ec35ea
      David (dafr) authored
      
      To reproduce:
      1. Create a Sales Order for a product whose product category is set to
         FIFO and automated. Use route "dropship".
      2. Confirm the PO created.
      3. Deliver the products (DS transfer)
      5. Return, for example, 1 unit of product
      6. Return the return
      
      This is a continuation of commit f9a1c1d7bb8234eb96c48dddae9930a419bfb696
      If the origin of the move is a dropshipped_returned, then the error describe in the mentioned commit will still happen.
      
      opw-3283436
      
      closes odoo/odoo#126685
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      a7ec35ea
    • althaf shaik's avatar
      [FIX] account_tax_python: prevent traceback while computing python code in tax · 74642632
      althaf shaik authored
      
      Syntax Error generates when the user gives invalid python code in 'account_tax'
      module and uses that tax while creating invoice.
      
      Steps to produce:
       * Install 'account_tax_python' module
       * Go to configuration/taxes and create a new tax.
       * Select Tax Computation as 'python code' and give some special characters to
         python code field and save it.
       * Now create an invoice, add a  product and add the above created tax in taxes.
       * At this moment traceback raises.
      
      By applying these changes will resolve this issue.
      
      closes odoo/odoo#122290
      
      Sentry: 4060222060
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      74642632
    • Nshimiyimana Séna's avatar
      [FIX] hr_expense: use correct exchange rates on expense · b6408e0d
      Nshimiyimana Séna authored
      
      ## Bug
      
      Let's say you make an expense in a foreign currency on date A. Then
      you include this expense in an expense report. You set the report's
      accounting date to B and post the journal entries. The system will
      calculate the expense amounts based on the exchange rate on Date B.
      But really, it should be using the exchange rate from Date A, the day
      when the expense was made.
      
      ## Steps to reproduce
      
      * Enable multicurrency and make sure that you have different exchange
        rates configured for two different dates, which we'll refer to as
        Date A and Date B.
      * Create an expense with a foreign currency and set the expense date to
        Date A.
      * Save and click `Create Report`
      * Submit to manager, and approve the report
      * Navigate to the 'Other Info' tab and set the report's accounting date
        to Date B.
      * Save and post the journal entries
      
      Now, review the generated journal entries. You might notice that the
      expense values have been calculated using the exchange rate from Date B,
      rather than Date A.
      
      opw-3119959
      
      closes odoo/odoo#120932
      
      Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
      b6408e0d
  12. Jun 29, 2023
Loading