Skip to content
Snippets Groups Projects
  1. Jun 23, 2023
    • 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
    • Guillaume (gdi)'s avatar
      [FIX] website_links: support foreign language for links graphs · e690da6e
      Guillaume (gdi) authored
      
      When a user creates a link that is tracked, an interface with graphs is
      presented to him so that he can track the performance of his tracked
      link. Unfortunately, these graphs did not work when the site was in a
      foreign language. This was due to the fact that the code had not been
      designed to handle this. This commit fixes the code so that it works in
      all languages.
      
      Note that the data is received via RPC and the python code format the
      dates for the current language of the website. So we had to do a little
      hack to make it work properly.
      
      Steps to reproduce the issue:
      - Install website_links module
      - Go to the website app
      - Click on Promote > Link Tracker
      - Create a tracked link
      - Visit the link
      - Install Arabic (Syria) for your website
      - Check the stats of your link in Arabic
      
      => There is a traceback and the data is not displayed.
      
      task-3289167
      
      closes odoo/odoo#119375
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      e690da6e
  2. Jun 22, 2023
    • Benoit Socias's avatar
      [IMP] website: test unsplash beacon · a5abc766
      Benoit Socias authored
      
      This commit ensures that the unsplash beacon calls home when an unsplash
      image appears on a page.
      
      To achieve this it patches the RPC call when the test URL contains the
      test name as parameter. The patch cancels the actual beacon call to
      avoid polluting data during the test, but marks the image as having had
      its beacon message sent. The test then simply checks if this marker
      appears on the image.
      
      task-3360109
      
      closes odoo/odoo#125028
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      a5abc766
    • Saurabh Choraria's avatar
      [FIX] partner_autocomplete: update log when sending partner to sync fails · c1b608c2
      Saurabh Choraria authored
      
      In the start_sync method, 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 sending a partner to sync fails.
      
      The changes have been made to reduce the noise level in the sentry.
      
      sentry-3955309841
      
      closes odoo/odoo#123827
      
      Signed-off-by: default avatarLouis Baudoux (lba) <lba@odoo.com>
      c1b608c2
  3. Jun 21, 2023
  4. Jun 20, 2023
  5. Jun 19, 2023
    • Romain Derie's avatar
      [IMP] website: make website_nightly build work before 16.4 · 231a7d63
      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#125662
      
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      231a7d63
    • mega-odoo's avatar
      [FIX] web_editor: prevent error when edit the float, monetary section in website · b895175c
      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#124245
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      b895175c
  6. Jun 18, 2023
  7. Jun 16, 2023
  8. Jun 15, 2023
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: no xml declaration with the send & print · d89f5cb2
      Julien Van Roy authored
      
      Issue: the xml declaration "<?xml version='1.0' encoding='UTF-8'?>" is
      lost when opening the send & print wizard with existing xml attachments.
      
      Explanation: When opening the send and print wizard, the PDF are
      generated and postprocessed by `_postprocess_pdf_report`. In the
      `_postprocess_pdf_report` override in `account_edi_ubl_cii`, the xml
      attachments are parsed through `tree = etree.fromstring(xml)`, then the
      base64 PDF is inserted, and the etree is converted to a bytes through
      `etree.tostring(cleanup_xml_node(tree))` and the resulting bytes is
      written back on the attachment, but the xml declaration disappeared.
      
      Solution: include the arguments `xml_declaration=True, encoding='UTF-8'`
      in the `tostring` function when converting the etree to a bytes.
      
      opw-3144519
      
      closes odoo/odoo#125223
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      d89f5cb2
    • Arthur Detroux (ard)'s avatar
      [FIX] web: mitigate navigation error on iOS/iPadOS devices · 19e484b6
      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#124828
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      19e484b6
    • Arthur Detroux (ard)'s avatar
      [FIX] website: Fix footer Slide Hover glitching on Safari · a6307448
      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#122029
      
      Signed-off-by: default avatarDieleman Guillaume (gdi) <gdi@odoo.com>
      a6307448
    • Antoine Dupuis (andu)'s avatar
      [FIX] l10n_it_edi: Generate correct XML for negative invoice lines · 17f336e4
      Antoine Dupuis (andu) authored
      
      When creating an invoice with a positive line and a negative line, with
      different taxes, the DatiRiepilogo node for the tax of the negative
      line contained positive amounts when they should be negative.
      
      This is because we were applying `abs()` too naively in the XML template
      and in the code of _l10n_it_edi_prepare_fatturapa_tax_details.
      
      This bugfix commit changes the logic to no longer use abs().
      
      We also include a test to check that the XML is correctly generated for
      credit notes.
      
      Back-port of #121933
      
      opw-3316300
      
      closes odoo/odoo#122928
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      17f336e4
    • flvr-odoo's avatar
      [FIX] tools : removing html comments · e3906018
      flvr-odoo authored
      
      This commit fixes the malformed comment that would sometimes comment out
      the rest of the html resulting in an improper display.
      
      this is due to the new html5 notation --!> not behing understood by
      our parser.
      
      this commit replaces any --!> into -->.
      
      this commit also remove  <!--> or <!--->
      
      opw-2812488
      
      closes odoo/odoo#123041
      
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      e3906018
    • Mayurrajsinh Rathod's avatar
      [FIX] website_slides: prevent copy of a attendee in course · 13f03853
      Mayurrajsinh Rathod authored
      
      Before this commit:
      
      Duplicating the contact that is linked to an attendee of a course also
      creates a copy of an attendee as well.
      
      After this commit:
      
      It does not create duplicate attendee in course.
      
      Task-3253983
      
      closes odoo/odoo#118015
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      13f03853
  9. Jun 14, 2023
    • Robin Lejeune (role)'s avatar
      [FIX] web_editor: adapt options' icons in RTL · f65a9bff
      Robin Lejeune (role) authored
      
      The triangle pointing towards an option in the editor is pointing
      right. In a RTL setting, this does not make sense and should be
      mirrored.
      
      task-3284274
      
      closes odoo/odoo#120134
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      f65a9bff
    • Benoit Socias's avatar
      [FIX] web_editor: fix border width options on zoomed browser · 6398b0c7
      Benoit Socias authored
      
      When the browser is zoomed, the value of the `border-width` CSS
      properties obtained through `getComputedStyle` are impacted by the
      zoom. Because of this, entering a "10px" border in a Chrome zoomed at
      125% turns it into "9.6px" when leaving the input field.
      
      This commit neutralizes the zoom effect by rounding the value up.
      The rounding operation was empirically determined by observing values,
      see table below.
      
      When zoomed out this does not always work: e.g. at 50% zoom, a value
      of 11px becomes 10px. But zooming out is an unxpected use case, that
      situation is therefore not handled by this fix.
      
      Observed values of the border-width property:
      Set value => `getComputedStyle`
      ```
      Value  Chrome 125%  Firefox 120%
        1px        0.8px     0.83333px
        2px        1.6px     1.66667px
        3px        2.4px     2.50000px
        4px        4.0px     3.33333px
        5px        4.8px     5.00000px
        6px        5.6px     5.83333px
        7px        6.4px     6.66667px
        8px        8.0px     7.50000px
        9px        8.8px     8.33333px
       10px        9.6px    10.00000px
       11px       10.4px    10.83333px
       12px       12.0px    11.66667px
      ```
      
      Steps to reproduce:
      - Drop a "Text - Image" block.
      - Select the text column.
      - Zoom with ctrl+mouse wheel or ctrl-plus.
      - Set a 10px border.
      - Leave input field.
      
      => Border option field displayed a different size.
      
      task-3172235
      
      closes odoo/odoo#119084
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      6398b0c7
    • Eric Antones's avatar
      [FIX] l10n_ch: a QR report is generated although the option is disabled · 7b433492
      Eric Antones authored
      
       This takes into account the option that allows to disable/enable the QR file generation
      
       Closes #85283
      
      closes odoo/odoo#124995
      
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      7b433492
    • Louis (loco)'s avatar
      [FIX] web_editor: correctly display custom filter options · ba2d6d40
      Louis (loco) authored
      Steps to reproduce the bug:
      - Add a "Cover" snippet on the website.
      - Add a "Custom" filter on the image.
      - Put the "Blur" setting to the maximum.
      - Save and edit.
      -> The "Blur" setting is not on maximum anymore.
      
      Since [1], the dataset of background images is first filtered (by the
      elements inside of the `BACKGROUND_IMAGE_ATTRIBUTES` set) before being
      copied into the dataset of `this.img`. Because `filterOptions` was
      missing in the set, the values of the custom filter were not displayed
      correctly (see `_computeWidgetState()`).
      
      [1]: https://github.com/odoo/odoo/commit/31ba9060723f365d16d51d3de0acf42c5e95f63b
      
      
      
      task-3358051
      
      closes odoo/odoo#124227
      
      Signed-off-by: default avatarDieleman Guillaume (gdi) <gdi@odoo.com>
      ba2d6d40
    • Merel Geens (mege)'s avatar
      [FIX] stock_account: don't create 0 amount COGS lines · 5de5023d
      Merel Geens (mege) authored
      After creating a sales order for a product with cost 0, automatic
      inventory valuation and AVCO, and validating the delivery, no account
      move is created for the stock move. If an invoice is then created from
      the sales order, it will create 0 amount COGS lines. Automatic
      reconciliation of the invoice with the corresponding stock account move
      will fail because no such entry exists, resulting in unreconciled lines
      remaining in the invoices.
      
      This issue can be prevented by either creating a 0 amount journal entry
      for the stock move, or preventing the creation of the 0 amount COGS
      lines on the invoice. Not creating unnecessary COGS lines is preferable
      and this was also the solution used for the same problem with purchase
      order invoices: https://github.com/odoo/odoo/pull/106785
      
       .
      
      So this fix does the same for sales order invoices.
      
      opw-3000320
      
      closes odoo/odoo#124125
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      5de5023d
    • Thomas Lefebvre (thle)'s avatar
      [FIX] website_hr_recruitment: prevent applying for unpublished job · 508f373f
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      When we have the link to the form to apply for a job,
      even if the job is not published, we can still apply.
      
      Solution:
      ---------
      Check that the job is published before the creation of the record
      in the `website_form_input_filter`.
      
      opw-3331717
      
      closes odoo/odoo#124399
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      508f373f
  10. Jun 13, 2023
    • Benjamin Vray's avatar
      [FIX] website: fix the scrolling of table of content in website slides · 1ac274c3
      Benjamin Vray authored
      
      Steps to reproduce the bug:
      
      - Install the Website Slides module.
      - Got to the /slides page.
      - Click on a course.
      - Click on the "Add Content" button.
      - Choose "Web Page" in the modal.
      - Once in edit mode, drag and drop a "Table of Content" snippet onto the
      page.
      - Save the page.
      - Scroll the page and observe that the navbar items are updated as you
      scroll.
      - Click on the "Fullscreen" button.
      - Bug: When scrolling the page, the navbar items are no longer updated
      as you scroll.
      
      This commit fixes the issue by detecting the scrolling element by
      traversing up the ancestors from the 'table of content' snippet, instead
      of using the 'getScrollingElement' function, which always returned the
      '#wrapwrap' when a Website Slides page is in fullscreen.
      
      opw-3302118
      
      closes odoo/odoo#124459
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      1ac274c3
    • Hamza (hisl)'s avatar
      [FIX] hr_timesheet : update effective_hours for progress_hours computation · 3b1316e7
      Hamza (hisl) authored
      
      Steps to reproduce the issue:
      
      Add a project and create a task with a timesheet in it
      set the allocated hours to 00:03
      add a line in the timesheet with hours spent 00:03
      Current Behaviour:
      The percentage calculated would be 96%, even though the time allocated and time spent are equal.
      
      Desired Behaviour:
      The percentage should be 100 as both values i.e. time spent and time allocated are equal.
      
      This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.
      
      Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.
      
      OPW-3270858
      
      closes odoo/odoo#121168
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      3b1316e7
    • Harald Panten's avatar
      [ADD] l10n_es: new tax IRPF 24 rendimientos del capital · 39f23ac5
      Harald Panten authored
      
      closes odoo/odoo#124688
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      39f23ac5
  11. Jun 12, 2023
    • Walid's avatar
      [FIX] point_of_sale: apply quantity bracode nomenclature · 36459d26
      Walid authored
      
      Steps to reproduce:
      1) Have Barcode Installed and have Barcode Nomenclature set
      2) edit 1st rule(Price Barcodes 2 Decimals) to type Quantity
      3) Create a product with barcode 2380201000008
      4) Open POS and scan barcode 2380201010007
      
      Bug:
      error popup product not found because the callback for this rule
      is not set
      
      Fix:
      apply same callback as weight (set product quantity)
      
      opw-3213595
      
      closes odoo/odoo#123924
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      36459d26
    • yhu-odoo's avatar
      [FIX] stock_account: valuation layer is zero when return dropshipping · 3b88958f
      yhu-odoo 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)
      4. Create the customer invoice
      5. Return, for example, 1 unit of product
      6. Add a credit note to the invoice for that 1 unit returned (reset to
         draft then change qty and post)
      Issues:
      The value on the valuation layers of the returned picking is 0, posted
      entries for COGS and stock interim (delivered) account for credit note
      is also 0.
      
      Since #85751, When create valuation layer for return, we take all svls
      of origin_returned_move_id into account to calculate the price unit.
      However, then dropshiping, 2 svls are created for the original move, and
      the sum of them is 0 since there is no impact of the stock when
      dropshiping. So when return, the price unit will be calculated as 0.
      
      To fix, when calculate price unit for return of dropshiping, we only
      take non-negative svls into account. Note that we use non-negative ones
      instead of positive ones because when subcontract dropshiping,
      additional negative svls will be added for the cost of the components.
      
      opw-3283436
      
      closes odoo/odoo#123529
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      3b88958f
    • Xavier Morel's avatar
      [FIX] test_mail: mutlicompany systray test · 54dce61e
      Xavier Morel authored
      
      odoo/odoo#122354 added this test but didn't handle that other models
      might trigger systray activities.
      
      On June 12th, the test started failing because calendar has a "Pricing
      Discussion" demo calendar event on the 12th of every month. It
      probably would have also failed on the 3rd and 22nd which both have
      demo meetings for the admin.
      
      Fix by looking up specifically activities of the test model we're
      concerned with.
      
      closes odoo/odoo#124586
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      54dce61e
    • Guillaume (gdi)'s avatar
      [FIX] website_forum: enlarge answer textarea · d5c985e8
      Guillaume (gdi) authored
      
      This commit permits to enlarge the answer textarea in the forum.
      
      Steps to reproduce the "issue" resolved by this commit:
      - Go to /forum
      - Click on a thread
      - Click on "Answer"
      
      => The textarea is too small to write a long answer.
      
      task-2865782
      
      closes odoo/odoo#118519
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d5c985e8
Loading