Skip to content
Snippets Groups Projects
  1. Jul 05, 2023
  2. 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
  3. Jul 03, 2023
  4. Jul 02, 2023
  5. 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
  6. Jun 29, 2023
  7. Jun 28, 2023
    • can-odoo's avatar
      [FIX] website_mail_channel: stop discussion block disappearing on move · 9b39c52e
      can-odoo authored
      
      Before this PR, when moving the snippet's position, `d-none` gets added
      which should not.
      With this PR, the `cleanForSave` method is removed as it applied that
      `d-none` and the logic is added to the `destroy` method of the public
      widget (on page load, we make the snippet visible when discussion group
      info is processed and so it is logical to hide it again in `destroy`).
      
      task-3107451
      
      closes odoo/odoo#108790
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      9b39c52e
    • Loan (LSE)'s avatar
      [FIX] barcodes: handle `^` with `|` barcode rule patterns · 2f7ad488
      Loan (LSE) authored
      Before this commit:
       If the barcode nomenclature uses the or `|` symbol.
       The part after it would be used as a "contains" instead of a
       "start with".
       e.g: `123|456`
       would be transformed in the JS code to `^123|456` instead of:
       `^123|^456`
       As such, you would have error "can't find product with barcode" if
       you set such a rule and a product barcode contains the second part.
       For e.g: the barcode `44445666` would match, but should not!
      
      After this commit:
       Force the second (and following if any) part to start with.
      
      Note: in practice it is pretty rare to have `|` in the pattern, but
      it is the case for a default rule in version 16, see:
      https://github.com/odoo/odoo/blob/5ac58ebf983c1c02019253c0430fde3502e13e7c/addons/pos_loyalty/data/default_barcode_patterns.xml#L10
      
      
      In this case, if a regular product have `044` in its product barcode,
      the PoS will tell that there is no corresponding coupon instead of
      adding the product.
      But the issue itself still apply in version 14 in case of custom rules
      
      opw-3356951
      
      closes odoo/odoo#125390
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      2f7ad488
    • pedrambiria's avatar
      [FIX] microsoft_calendar: delete events correctly when reseting account · c4d8530c
      pedrambiria authored
      
      Before this commit, if you reset your microsoft callendar account and
      set to remove events from Odoo, it won't remove them. The problem is
      that the ('ms_universal_event_id', '!=', False) condition is not
      implemented, and it can't remove the existing events.
      
      opw-3382445
      
      closes odoo/odoo#126097
      
      Signed-off-by: default avatarArnaud Joset (arj) <arj@odoo.com>
      c4d8530c
    • Benjamin Vray's avatar
      [FIX] web: fix the scrollbar compensation for rtl pages · 9e126f7f
      Benjamin Vray authored
      In Website, since the `#wrapwrap` element is being scrolled on the
      pages, we added a function called `compensateScrollbar` (added by this
      commit [1]) that adds space on the right side equal to the width of the
      scrollbar when a modal is open or to adjust the position of the fixed
      header when a page is scrolled.
      
      However, this `compensateScrollbar` function did not handle RTL pages
      correctly, where the scrollbar is on the left instead of the right. As a
      result, on RTL language pages, this space was added on the wrong side.
      
      This commit fixes the issue by placing the space on the left instead on
      RTL pages.
      
      Steps to reproduce the bug:
      - Select Arabic as the primary language for a website.
      - In edit mode, drag and drop a popup onto a page.
      - Bug: When the popup is open, space is added on the right to compensate
      for the scrollbar, but it should be on the left instead.
      
      [1]: https://github.com/odoo/odoo/commit/ebd0c90a146145079061e79c2d4c37fa182a2975
      
      
      
      task-3102275
      
      closes odoo/odoo#126506
      
      Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
      9e126f7f
    • Adesh Jolhe's avatar
      [FIX] website_event_track: resolve issue with setting SVG as favicon · 1dd4236a
      Adesh Jolhe authored
      
      Steps to Produce:-
      - Install `Advanced Events`
      - Go to ` website` then `Configuration`
      - Open `setting`
      - Then change favicon and Select svg type file and click on save
      - Traceback is here
      
      Cause :-
      - The traceback occurs when an SVG image is passed to the ImageProcess method.
       In this scenario, the method sets the image as false, and then attempts to
      access its size, resulting in the traceback
      
      Fix :-
      - The issue has been resolved by implementing a condition check for the image
      before accessing its properties. This ensures that the image is valid before
      trying to retrieve its size, preventing the traceback from occurring.
      
      sentry-4199175498
      
      closes odoo/odoo#122300
      
      Signed-off-by: default avatarAchraf Ben Azzouz (abz) <abz@odoo.com>
      1dd4236a
  8. Jun 27, 2023
    • Alex (roal)'s avatar
      [FIX] tools: fix TypeError in literal_eval · 8fd136a3
      Alex (roal) authored
      
      A TypeError is thrown when an AST node is passed to `literal_eval`
      because a string is expected and the object has no len().
      
      Check the type of the expression and make sure it's a string before
      calling len() on it.
      
      closes odoo/odoo#126520
      
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      8fd136a3
    • Julien Mougenot's avatar
      [FIX] web: Allow TempusDominus to parse its own values · 3072cb56
      Julien Mougenot authored
      
      Before this commit, in other numbering systems than "latn", the time
      pickers did not allow to select hours/minutes/seconds. This was because
      the lib (TempusDominus) would use `parseInt` internally to retrieve the
      selected value, which was not a latin number in other numbering systems.
      
      This commit changes 2 things directly in the lib file:
      
      - allow the internal `getMoment` function to accept a second 'format'
      parameter;
      
      - use that same `getMoment` function to parse the text of the selected
      value, effectively using moment to both parse and format the values
      displayed in the picker and ensuring consistency.
      
      OPW-3258034
      
      closes odoo/odoo#125234
      
      Signed-off-by: default avatarBruno Boi (boi) <boi@odoo.com>
      3072cb56
    • Claire Bretton (clbr)'s avatar
      [FIX] l10n_ch: Fix return tax type · 7b07df87
      Claire Bretton (clbr) authored
      
      The return tax should only be used through its parent tax,
      we don't want it to be accessible directly on bills or invoices.
      
      opw-3347425 (2nd issue)
      
      closes odoo/odoo#124781
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      7b07df87
  9. Jun 26, 2023
  10. Jun 25, 2023
  11. Jun 24, 2023
    • Denis Ledoux's avatar
      [FIX] base_import_module: restore `<field file="...">` feature · 2a3ef939
      Denis Ledoux authored
      
      Revision odoo/odoo@cabb9e7e573b86cd523980588360d8514090d370 introduced a
      regression: This is no longer possible to import a data module
      using `<field file="..."/>` in their data file.
      
      This revision targets to restore the feature as expected.
      The unit tests added covers the feature, so that regression
      no longer happens in the future.
      
      It introduces a new concept of temporary directory `file_open`
      can read from.
      e.g.
      ```py
      with odoo.tools.file_open_temporary_directory(self.env) as module_dir:
         with zipfile.ZipFile('foo.zip', "r") as z:
            z.extract('foo/__manifest__.py', module_dir)
         with odoo.tools.file_open('foo/__manifest__.py', env=self.env) as f:
            manifest = f.read()
      ```
      
      Note that `file_open` will be allowed to read from that temporary
      directory only if `env` is passed to `file_open`,
      and if the `env` is part of the same transaction/request than the `env`
      passed to `file_open_temporary_directory`.
      
      This is to avoid having users, whether from other databases,
      or even the same database,
      trying to access these directories not belonging to them.
      e.g. If an admin uploads sensitive data in this temporary directory,
      no one than him must be allowed to read from these files, not even
      another user from his database.
      
      closes odoo/odoo#126278
      
      closes odoo/odoo#126337
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      2a3ef939
  12. Jun 23, 2023
    • Julien Van Roy's avatar
      [FIX] mail: UTF-8 text/xml attachment and omitted charset · b2aa5883
      Julien Van Roy authored
      When parsing an email containing an xml attachment, the `email` python
      module will decode the base64 attachment using the charset or ascii if
      the charset is missing.
      
      In some cases, the payload is in UTF-8 but the charset is omitted. This
      results in replacement characters for the non ASCII characters.
      
      The solution is to force the charset to UTF-8, since it is a superset of
      ASCII that should not be a problem.
      
      NB1: Omitting the charset for text/xml is not recommended. See the RFC
      (section 6.4): https://www.ietf.org/rfc/rfc2376.txt
      
      
      
      opw-3144519
      
      closes odoo/odoo#125628
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      b2aa5883
    • Yolann Sabaux's avatar
      [FIX] account_edi_ubl_cii: exclude note-section · fb716296
      Yolann Sabaux authored
      
      Steps to reproduce:
      - Install the lux localization
      - Configure Peppol for a customer: Select a customer > tab accounting > under "electronic invoicing":
      format: Peppol BIS Billing 3.0
      Peppol e-address: 0130 - Directorates of the European Commission
      Peppol Endpont: testendpoint
      
      - Create an invoice for the peppol customer
      - Add a section or a note in the Invoice
      - Confirm the Invoice
      
      Issue:
      Raise user error:  Odoo requires a tax for EACH LINE, instead of each product
      
      Solution:
      Exclude the section/note line
      
      opw-3354757
      
      closes odoo/odoo#124806
      
      Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
      fb716296
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: add italian EAS code for peppol Bis 3 · 030b55b2
      Julien Van Roy authored
      Currently, it's not possible to check the 'Peppol Bis 3' option on the
      journals of Italian companies, since Italy is not present in our mapping
      `COUNTRY_EAS`.
      
      The EAS for Italian companies may be the codice fiscal (code: 0210) or
      the VAT number (code: 0211). See
      https://peppol.agid.gov.it/en/news/expiration-validity-codes/
      
      
      
      Use the VAT number by default, and add it in our mapping such that the
      option now appears for Italian companies.
      
      opw-3346572
      
      closes odoo/odoo#126168
      
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      030b55b2
    • Mohit Beniwal's avatar
      [FIX] base: prevent json decoder error for default values · 0e6e322d
      Mohit Beniwal authored
      
      JSONDecoderError occurs when users enters invalid JSON format data in
      'Default Value' field inside 'User-defined Defaults' and wherever this field is
      being accessed to get default value this traceback will be generated.
      
      Steps to reproduce:
      1) Install 'Contacts' module.
      2) Open 'Settings' > 'Technical' > 'User-defined Defaults'.
      3) Click on record 'Language' > 'EDIT' button > in 'Default Value' field enter
         any improper JSON format data (e.g 'Maa' : FI ) .
      4) Now, open 'Contacts' module > click on 'CREATE' button and traceback would be
         generated.
      
      By applying this, it will check for proper JSON format.
      
      Sentry-4169062951
      
      closes odoo/odoo#124051
      
      Signed-off-by: default avatarRémy Voet (ryv) <ryv@odoo.com>
      0e6e322d
    • Enric Tobella's avatar
      [FIX] maintenance: Allow to see your created maintenances requests · df1badee
      Enric Tobella authored
      
      closes odoo/odoo#105495
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      df1badee
Loading