Skip to content
Snippets Groups Projects
  1. May 24, 2023
    • niyasraphy's avatar
      [REF] phone_validation: class attribute to bypass the length validation · b89f948e
      niyasraphy authored
      
      before this commit, if user need to bypass the validation
      added for the length in custom module, the entire function
      has be rewritten in the custom module.
      
      scenario:
      
      * add the phone_mobile_search field to the name search of res.partner model
      
      * then open sale order form, and in the customer field enter any letter or digits, this user
      error will be raised
      
      after this commit, users just need to change the class
      attribute: _phone_search_min_length in the
      inherited module.
      
      closes odoo/odoo#122248
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      b89f948e
    • Hoang Tien Dung's avatar
      [CLA] signature cla for hoangtiendung070797 · dfa30236
      Hoang Tien Dung authored
      
      closes odoo/odoo#122240
      
      X-original-commit: b061cf71
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      dfa30236
    • tsm-odoo's avatar
      [FIX] mail: invalid url regex · 0dc68dcc
      tsm-odoo authored
      Since [1], comma can be included in url by the discuss regex. This
      should not be the case if the comma is at the end of the url/line
      since it could be part of a sentance.
      
      This PR applies the same logic to the dot and the semicolon character
      since they could also be used as punctuation.
      
      [1] https://github.com/odoo/odoo/pull/122093
      
      
      
      closes odoo/odoo#122227
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      0dc68dcc
    • Laurent Smet's avatar
      [FIX] account: Prevent exchange diff entry with full refund · 8c61e518
      Laurent Smet authored
      
      - create an invoice with a CABA tax
      - full refund it using 'add credit note', 'cancel' mode.
      => No CABA entry generated but an exchange difference journal entry
      has been created.
      
      This is because the CABA entry is not generated in case of full refund
      thanks to the 'move_reverse_cancel' context key. However, this key is not
      preventing the generation of the exchange journal entry for CABA.
      
      opw-3321897
      
      closes odoo/odoo#122179
      
      X-original-commit: 9823d2fc
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      8c61e518
    • Anita (anko)'s avatar
      [FIX] payment: fix multicompany payment confirmation onboarding step · 4b18c80e
      Anita (anko) authored
      
      User was not able to go through onboarding if they switched company.
      By default it tried to edit default payment provider that was conected
      to the main company so other companies were recieving Access Error.
      
      opw-3281770
      
      closes odoo/odoo#121621
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      4b18c80e
    • Nasreddin Boulif (bon)'s avatar
      [FIX] event[_sms]: send emails direclty after attendee confirmation · 7d63cda1
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install `Events` module
        - Create a new event and set it to `Autoconfirmation`
        - Create a new attendee and confirm it
      
      Issue:
      
        Mail that confirm registration is not sent to attendee.
      
      Cause:
      
        When computing the `schedule_date`, it take the value of the
        `registration_id.create_date` WITH the microseconds.
      
        When creating a new attendee, at some point we run the mail schdelure
        that compare if the `schedule_date <= now`.
        `schedule_date` and `now` have same value except for the microseconds
        (set on `schedule_date` but not on `now`).
        Therefore `schedule_date > now` and the mail is not sent.
      
      Solution:
      
        Remove microseconds from the schedule_date.
      
      opw-3079389
      
      closes odoo/odoo#122137
      
      X-original-commit: f2adca45dcec5a11daa92d07bae00615210ea0de
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      7d63cda1
    • Romain Derie's avatar
      [FIX] website: correctly target footer on popup options · 31db5fbe
      Romain Derie authored
      
      The code was assuming there would be only one `<footer/>` element in the
      dom but it's not always true.
      Our `Blockquote` snippet also contains a `<footer/>` element.
      
      While this has no impact on Odoo 14 and Odoo 15, it will crash in Odoo
      16 when trying to select "On all pages" on a popup option when there is
      a blockquote snippet on a page.
      The reason it breaks in 16 is because it uses javascript instead of
      jquery, finding only one element (the footer of the blockquote) and not
      all. The jQuery usage was then filtering out to only keep the correct
      footer due to some extra selector looked for in the elements
      (`.oe_structure:o_editable`).
      
      Still, the fix is made in Odoo 14 because it's likely that we will have
      another fix later in the snippet options, and it's also likely that
      someone will replace the jQuery usage by javascript while doing so,
      which would reveal the bug.
      
      opw-3283140
      
      closes odoo/odoo#122119
      
      X-original-commit: ca3d6e09
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      31db5fbe
    • Pieter Claeys (clpi)'s avatar
      [FIX] mrp: Update analytic lines when changing account on MO · 35e3af77
      Pieter Claeys (clpi) authored
      Upon changing/removing/adding the analytic account on a manufacturing order, only the analytic lines due to the raw material moves are updated, but not the ones for workcenter costs.
      
      To reproduce:
      - Create an MO with a workorder on a workcenter which has an operating cost set
      - Complete time on this workorder to generate the [WC] AALs on this MO
      - Change the analytic account on the MO (or delete it)
        Bug: The [WC] AALs never get correctly updated.
      
      This fix builds on https://github.com/odoo/odoo/pull/79614 to correct this behaviour and also take into account changes for the workcenter cost AALs when the analytic_account of a manufacturing order is changed.
      
      Community PR: https://github.com/odoo/odoo/pull/117308
      
      
      
      closes odoo/odoo#121891
      
      Task: 3252742
      X-original-commit: cdf28628
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      35e3af77
    • Manushi Shah (mash)'s avatar
      [FIX] mass_mailing: ensure close button is visible in mobile preview · 440c0f04
      Manushi Shah (mash) authored
      
      This commit adapts the style of the close button on the mass mailing "mobile
      preview" to ensure that it's visible in both regular mode and dark mode.
      
      Task-3326846
      
      closes odoo/odoo#121796
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      440c0f04
    • Nishant Jain (niai)'s avatar
      [IMP] l10n_in: audit trail improvement · 6c4a92f5
      Nishant Jain (niai) authored
      
      With this commit, Made the tree line clickable instead of clicking View Related
      Document Button. Updated the description, to be similar to chatter in audit trail
      tree view. Also Updated error message while deleting entries once it's posted for
      Indian Company.
      
      closes odoo/odoo#121242
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      6c4a92f5
    • stcc-odoo's avatar
      [FIX] fleet: select vehicle model on mobile · e4127e6c
      stcc-odoo authored
      
      Steps to reproduce:
      
      - Install fleet
      - Switch to mobile view
      - Create new vehicle
      - Click on model field > Select a model
      
      Issue:
      
      Clicking on a car model does not perform any action.
      
      Solution:
      
      Add class `oe_kanban_global_click` to kanban items in order to capture user clicks.
      
      opw-3188104
      
      closes odoo/odoo#121148
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      e4127e6c
    • Abdelouahab (abla)'s avatar
      [FIX] website_slides: avoid completing slide when not being a member · 885d8a18
      Abdelouahab (abla) authored
      
      To reproduce
      ============
      - add video to a course
      - remove user from course if user is enrolled
      - open video in full screen mode and play it
      - move nearly to the last part of the video so that is detected as completed
      - an error will occure
      
      Problem
      =======
      - when the video is detected to be completed we want to mark the slide as completed
      - as the user is not a member, we can't retreive the current slide which is the source
      of this issue
      
      Solution
      ========
      as the use is not a member, marking the slide as **Completed** dosen't make any sense,
      so checking if the user is member, should solve the problem.
      
      opw-3295662
      
      closes odoo/odoo#121062
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      885d8a18
    • Mehdi Bendali Hacine's avatar
      [ADD] base: Add country states for Saudi Arabia · 99d0db32
      Mehdi Bendali Hacine authored
      
      closes odoo/odoo#118765
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      99d0db32
    • moerradi's avatar
      [IMP] account: Reconciliation models UX · 6d0ffce1
      moerradi authored
      
      - Add group bys, columns, and filters to Bank Reconciliation models for better navigation and organization
      - Trigger auto-validate cron on saving Reconciliation model with auto-validate enabled
      - Restore pre-filled elements when creating Reconciliation model through bank reconciliation widget (V15.2 functionality)
      - Remove text ellipsis from Reconciliation model buttons in bank reconciliation widget for better readability
      
      closes odoo/odoo#117822
      
      Task-id: 3253304
      Related: odoo/enterprise#39393
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      6d0ffce1
    • Jérémy Hennecart (jeh)'s avatar
      [FIX] website(_slides): delete autoplay of all iframes in the iframefallback · 6be8af36
      Jérémy Hennecart (jeh) authored
      
      Delete the autoplay for all iframes in the iframefallback.
      The autoplay was causing issue where the sound of the previous video
      was played on the background. Now we delete the autoplay for all iframe
      directly.
      This happened in media_iframe_video, youtube player and vimeo videos.
      We can do this for all iframe source url directly as it impacts other
      modules like website_slides or website_event_track_live.
      
      task-3012952
      
      closes odoo/odoo#112868
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      6be8af36
    • Aurelien van Delft (avd)'s avatar
      [FIX] purchase_stock: _compute_on_time_rate optimizations · e311e8b4
      Aurelien van Delft (avd) authored
      
      Turn the call to filtered after the search on purchase.order.line
      into a call to _search. This allows to remove filtered by adding
      an additional leaf in the search domain.
      
      Add read calls to fetch fields from db and store them in cache
      on recordset batches.
      
      Example speedup: partner with 136555 POL 6.33s -> 3.42s
      
      opw-3277299
      
      closes odoo/odoo#122213
      
      X-original-commit: b3e81b09
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarVan Delft Aurélien (avd) <avd@odoo.com>
      e311e8b4
    • Paolo Gatti (pgi)'s avatar
      [FIX] l10n_it_stock_ddt: Print not printing DDT in case of Dropshipping · 8a45ae08
      Paolo Gatti (pgi) authored
      
      The visibility of the "Print" DDT button wasn't taking into
      consideration the dropshipping case.
      
      closes odoo/odoo#122034
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      8a45ae08
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] l10n_it_stock_ddt: support dropshipping in ddt · b8fe190b
      Andrea Grazioso (agr-odoo) authored
      Have an IT company configured
      Activate Dropship
      Create a Product P with dropship enabled and vendor configured
      Create a quotation to an IT customer, add P to a line, confirm.
      Purchase will be created automatically, confirm it.
      Go to dropship picking, confirm, print
      
      The DDT report does not show up correctly:
      - Warehouse address is the company address
      - Customer address is the vendor address
      
      opw-3128812
      
      Part-of: odoo/odoo#122034
      b8fe190b
    • Touati Djamel (otd)'s avatar
      [FIX] mrp: allow overviewing of bom with decimal quantity · e92bbec3
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a storable product with BoM:
          - add any product as component
          - save
          - Click on the BoM overview widget
          - Change the quantity of a BOM with a number that has a decimal
              value.
      
      Problem:
      The quantity is converted to an integer because this input does not
      accept a decimal value.
      
      opw-3288403
      
      closes odoo/odoo#121801
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      e92bbec3
    • Ahmad Khanalizadeh's avatar
      [FIX] delivery: exclude service lines from commodities · 1bd871f8
      Ahmad Khanalizadeh authored
      
      Steps to reproduce:
      configure easypost for international shipping (e.g. using USPS)
      Make a sale order for a customer in another country
      Add a discount program (e.g. 10% off)
      Attempt to add shipping and get the rates
      Get traceback:
      `Easypost returned an error: Wrong parameter type.
      - value: must be greater than or equal to 0`
      
      To fix this we need to exclude service type products when creating
      commodities from order lines (similar to creating commodities from
      stock move lines)
      
      opw-3269467
      
      closes odoo/odoo#121123
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      1bd871f8
    • Hamza (hisl)'s avatar
      [FIX] purchase : correct line id for invoice origin · e3289dec
      Hamza (hisl) authored
      
      Steps to reproduce:
      
      1. Create a bill from document,
      2. Fill in PO in auto complete, confirm, check the bills list.
      3. The source document is not populated in the list.
      
      What is the current behavior that you observe?
      The source document is in the log, but does not show up in the dashboard.
      
      What would be your expected behavior in this case?
      The PO should show up in the source document in the list
      
      OPW-3284992
      
      closes odoo/odoo#121562
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      e3289dec
  2. May 23, 2023
    • niyasraphy's avatar
      [FIX] account: traceback on creating payment method · 94a17f27
      niyasraphy authored
      
      before this commit, on creating a new payment method
      will show traceback.
      
      * using studio add a menu for payment method
      * create a payment method and hit on create
      * traceback is shown
      
      after this commit, no traceback wont be shown.
      
      closes odoo/odoo#122129
      
      X-original-commit: f8918c9e
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      94a17f27
    • Fabien Meghazi's avatar
      [FIX] sql_db: use psycopg2.extensions.parse_dsn for dsn parsing · 3573fe07
      Fabien Meghazi authored
      
      Before this patch the naive dsn parser `_dsn_to_dict` would choke
      on `application_name` containing spaces or the equal sign.
      
      closes odoo/odoo#122010
      
      Signed-off-by: default avatarFabien Meghazi (fme) <fme@odoo.com>
      3573fe07
    • Feyensv's avatar
      [FIX] sale: show custom ptav in the right order · fa252066
      Feyensv authored
      
      The value of custom ptavs is store on the sale order line.
      
      Currently, they are ordered by ptav id but they are ordered by the ptav
      sequence everywhere in Odoo.
      
      Now, on the sale order line, custom ptav are ordered by ptav sequence.
      
      opw-3234669
      
      closes odoo/odoo#122161
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      fa252066
    • Adrien Widart (awt)'s avatar
      [FIX] barcodes: prevent `enter` if barcode · a5f566b5
      Adrien Widart (awt) authored
      
      To reproduce the issue:
      (Need `stock_barcode` and a real barcode scanner)
      1. Create two products P01 and P02, each one with a barcode
      2. Barcode > Operations > Receipts, Create
      3. Scan P01
      4. Scan P02
      5. Click on the `+1` button on the line of P01
      6. Scan P02
      
      Error: Both lines are incremented. Scanning P01 should not impact the
      quantity of P01
      
      Because of step 5, the focus is still on that button when scanning
      again P02 (step 6). Moreover, the scanner ends the barcode transmission
      of P02 with an `enter` -> it will generate an event on the `+1` button,
      which explains why the quantity of P01 is also incremented.
      
      OPW-3232437
      
      closes odoo/odoo#122125
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      a5f566b5
    • Mahdi Cheikh Rouhou (macr)'s avatar
      [FIX] web : align number on right in rtl lang · 180139cd
      Mahdi Cheikh Rouhou (macr) authored
      
      Numbers should be alinged on the right in rtl langauge same as ltr langs
      
      Steps to reproduce the isse :
      1- Change the language to arabic
      2- To to the list of invoices in accounting and you can see that the numbers are aligned to the left
      
      The origin of the problem is that rtlcss reverse the alignment from right to left
      
      opw-3295573
      
      closes odoo/odoo#121689
      
      Signed-off-by: default avatarBruno Boi (boi) <boi@odoo.com>
      180139cd
    • tsm-odoo's avatar
      [FIX] mail: incomplete url regex · 9302a237
      tsm-odoo authored
      The discuss app uses an url regex in order to find links and
      transform them to html before posting a message.
      
      Before this commit, some unsafe url characters  were missing
      from this regex, resulting in incorrectly parsed url.
      
      This commit adds missing characters in order to match RFC1738
      [1].
      
      [1]: https://www.ietf.org/rfc/rfc1738.txt
      
      
      
      closes odoo/odoo#122093
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      9302a237
    • Martin Trigaux's avatar
      [IMP] *: export 16.0 source terms · 2f0928c8
      Martin Trigaux authored
      
      closes odoo/odoo#122042
      
      Related: odoo/enterprise#41329
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      2f0928c8
    • Dossogne Bertrand's avatar
      [FIX] hr_holidays: fix My Time Off access in multicompany · c0039aa4
      Dossogne Bertrand authored
      
      Before this commit, trying to access "My Time Off" was
      not possible if connected on a company while some leaves
      were created from another company.
      This commit restricts that view to the leave created from
      the companies the user is logged into.
      
      closes odoo/odoo#122039
      
      Signed-off-by: default avatarGvaladze Sopiko (sgv) <sgv@odoo.com>
      c0039aa4
    • Michele's avatar
      [IMP] core: new neutralize flag on database restore and database duplicate dialog · 616740e9
      Michele authored
      
      Before this PR:
      The only way to neutralize the database is running cli command neutralize
      
      After this PR:
      There is a new checkbox "neutralize database" in Duplicate database and Restore database dialog that neutralize the database after duplication/restore.
      I also moved the neutralization code to the external module so it can be called also outside the cli .
      
      closes odoo/odoo#121569
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      616740e9
    • Antoine Dupuis (andu)'s avatar
      [FIX] account: automatic entry wizard: avoid clashes with lock dates · 9c496321
      Antoine Dupuis (andu) authored
      
      Currently, if you use the automatic entry wizard to change the period of
      a journal item dated prior to the lock date, you'll just get blocked
      with a UserError, with no workaround.
      
      This commit changes the date of the adjustment entry to be the first end
      of month after the lock date. As a result, the adjustment entry can be
      created.
      
      Based on PR #92439
      
      closes odoo/odoo#121566
      
      Taskid: 2823170
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      9c496321
    • Antoine Dupuis (andu)'s avatar
      [REF] account: Vendor Bills: Refactor the lock date message · 5b35915d
      Antoine Dupuis (andu) authored
      At the moment, the lock date message is generated in
      _compute_tax_lock_date_message. We delegate it to a separate function
      in order to use this message elsewhere as well.
      
      Note: this refactor introduces minor changes in behaviour:
      - we remove the second part of the lock date message (that mentions
        other lock dates than the most blocking one), because it is too much
        information.
      
      - we calculate the new accounting date from the existing accounting date
        rather than from the existing invoice date. This should not change
        anything in practice, since the new accounting date will be the last
        day of the period after the lock date.
      
      task-2823170
      
      Part-of: odoo/odoo#121566
      5b35915d
    • Victor Piryns (pivi)'s avatar
      [FIX] sale_quotation_builder: checkout product w/ quote description · 23022144
      Victor Piryns (pivi) authored
      Current behaviour:
      If we add a blockquote in the `website_description` of a product on
      the e-shop, we cannot checkout the product. Silent HTTP 400 error
      code, due to an exception raised by
      https://github.com/odoo/odoo/blob/bf772181933ce5334da35c8368455963b2478399/odoo/fields.py#L1987-L1993
      
      
      
      Expected behaviour:
      You should be able to checkout products even if they have blockquote
      in their `website_description`.
      
      Steps to reproduce:
      - Install eCommerce, sale_quotation_builder (issue is present only
        after installing sale_quotation_builder)
      - On a product, with the website editor, add a `blockquote` to the
        description of the product > Save
      - In a private browser window, as public user, visit the product on
        the e-shop and try to checkout with it.
      - Observe there is no visible error, and we do not proceed in the
        checkout process.
      
      Reason for the problem:
      The exception mentioned above is triggered when there is a
      difference between the html content that is saved in the DB and after
      sanitization, meaning that someone with escalated privilege saved
      the HTML content by overriding the sanitization with
      `sanitize_overridable`. In our use case the only diff is the
      presence of the attribute `data-o-mail-quote-node` which is removed
      after the sanitization.
      
      Fix:
      This issue can be resolved two ways:
      1) Adding `data-o-mail-quote-node` to the list of save attributes,
         meaning it will not be removed during the sanitization process.
         Since this is an attribute that we add on `<blockquote>` nodes,
         it can be considered safe, just like `data-o-mail-quote`.
      2) Remove the attribute sanitization of the `website_description`,
         just like it is done in the website_sale module.
         Since the `website_description` and `quotation_description` are both
         computed from one-another, they should have the same sanitization
         level.
      I am implementing both solutions, 1) because adding the attribute to
      the safe list seems safe in general, and may prevent future
      issues of this sort. 2) because it is the root cause of the issue,
      since the bug is present only after installation of the
      `sale_quotation_builder` module.
      
      Affected versions:
      - 16.0
      - saas-16.1
      - saas-16.2
      - master
      
      opw-3297237
      
      closes odoo/odoo#120764
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      23022144
    • abd-msyukyu-odoo's avatar
      [FIX] web: rework draggable_hook scrolling · 23f67ca5
      abd-msyukyu-odoo authored
      
      In Knowledge, the scrollParent for the `Y` axis of an embedded ungrouped Kanban
      view is the article body, which contains the draggable `container` (which is
      itself contained in the scrollParent for the `X` axis).
      
      This commit introduce 2 fixes related to the `draggable_hook_builder`:
      - In `draggable_hook_builder`, `updateRects` was modifying values of the
        `containerRect` from values of the `scrollParent`. Then, the `containerRect`
        was used in `handleEdgeScrolling` to compute a scroll value to apply on the
        `scrollParent`, and when updating the dragged element position, to compute the
        boundaries for the dragged element. This commit stores values for
        `scrollParent` in `scrollParentRect` alongside the modified `containerRect`.
        `scrollParentRect` will be used to compute the scroll value based only on the
        dimensions of the scrollParent, and the modified `containerRect` will be used
        to compute the boundaries.
      - The `scrollParent` in the `X` axis can be different from the `scrollParent` in
        the `Y` axis. This commit stores both of them individually so that one is not
        neglected when higher in the DOM than the other.
      
      Task-3291771
      
      closes odoo/odoo#121089
      
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      23f67ca5
    • Stanislas Gueniffey's avatar
      [IMP] web_editor: re-run tests with mobile version · 008ab1c9
      Stanislas Gueniffey authored
      
      Some tests use methods that have two different implementations (one for
      desktop and one for mobile). So far, the only example is deleteBackward
      and its mobile counterpart deleteBackwardMobile.
      
      This commit introduces a mechanism in the web_editor tests to avoid
      duplicating such tests. When a test calls a method that has two
      implementations, it uses the desktop one by default and a flag is set
      that indicates the test should be re-run with its mobile implementation
      next.
      
      When errors are raised while the mobile version is in use, we prefix
      their message with '[MOBILE VERSION]' to ease debugging.
      
      Note that this mechanism relies on proper flag management by the
      aforementioned methods.
      
      Task-3054808
      
      closes odoo/odoo#121977
      
      X-original-commit: 712382c6ae200037c58a6677069c5f2ae783ccec
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      008ab1c9
    • Anhjean - The Bean Family's avatar
      [CLA] signature for Anhjean · c4c72dcf
      Anhjean - The Bean Family authored
      
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#121861
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      c4c72dcf
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: invoice lines could have multiple fixed taxes · 0c4bcaad
      Julien Van Roy authored
      An UBL Bis 3 xml can only contain one tax per invoice line. However,
      there might be one or more ecotaxes on invoice lines in Belgium. Do not
      block the user from generating the attachment in this case.
      
      Note that PR https://github.com/odoo/odoo/pull/121494
      
       will properly
      handle the fixed taxes upon generating UBL attachments.
      
      opw-3318969
      
      closes odoo/odoo#121854
      
      X-original-commit: 68814f52
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      Signed-off-by: default avatarJulien Van Roy <juvr@odoo.com>
      0c4bcaad
    • joda-odoo's avatar
      [FIX] tools: avoid crashes if expression is too large · 92eca3a6
      joda-odoo authored
      
      When passing a very large expression to `literal_eval`, the odoo server crashes.
      To avoid this behavior, a limit needs to be set by using the env varaible `ODOO_LIMIT_LITEVAL_BUFFER`.
      If the variable is not set, it defaults to 100Kib.
      
      closes odoo/odoo#121719
      
      X-original-commit: 0e4f3ac4
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      Signed-off-by: default avatarDalcq Jordan (joda) <joda@odoo.com>
      92eca3a6
    • oco-odoo's avatar
      [FIX] account: computation of tax_tag_invert · b72fb76d
      oco-odoo authored
      
      Two issues solved in 1 commit; as their solutions depend on one another.
      
      ** ISSUE 1 **
      
      To reproduce the issue, on a l10n with a tax report:
      - Create a misc operation with a tax on it in the same form as a sales invoice ; post it.
      - Reverse that move, and post the reverse.
      
      => Open the tax report: the amounts of the original move (for both tax lines and base lines) are doubled.
      That's not what we want ; instead, the reverse should have entirely canceled the original move.
      
      This is due to the fact the is_refund field of account.move.line is badly computed on the reverse: both tax and base lines are considered refund. Because of that, tax_tag_invert gets inverted, and ends up doubling the amount in the report instead of cancelling it. While made on a reverse move, those lines should not be considered as refunds, since they must both use the original repartition of the reversed move , unlike invoices, which would make use of the refund repartition in this case.
      
      ** ISSUE 2 **
      
      To reproduce, on a l10n with a tax report:
      - Create a cash basis tax, and set tags on its repartition lines so that it should be taken into account by the report. Make sure the refund repartition cancels the invoice repartition.
      - Create an invoice using that tax, post it
      - Click the "Add Credit Note" button, select "partial refund", and post the generated refund (which will cover the full amount of the original invoice)
      - Reconcile the refund with the invoice
      
      => Because it's a partial refund, cash basis entries will still be generated. Open the tax report to ensure they sum up to 0... And the tax lines don't !
      
      This happens because the computation of tax_tag_invert field inverts the sign of tag on cash basis entry tax lines when they have a negative tax_base_amount. In our case, when going through the "reverse" button and making a partial refund, we actually do get a negative amount in the credit note's tax_base_amount. This is inconsistent with what a refund generated from scratch does (then, you'll get a positive tax_base_amount in our case), and should only be legit when the document contains a negative line explicitly (so, a line with a negative quantity, hence inverting the meaning of debit/credit).
      
      The root of the issue is that the tax_base_amount of the tax line uses the tax_tag_invert of the base line to define its sign. And tax_tag_invert was omitting to set copy=False. When reversing a move, the first step is to copy it. Because of the missing copy=False, tax_tag_invert was copied, and never recomputed (since it's a computed editable field) on the base line, giving it an inconsistent value, and ending up inverting the sign of tax_base_amount on the tax line. In turn, the tax line got a wrong tax_tag_invert because of that, and would propagate that to the cash basis entry when generating it.
      
      This commit adds the missing copy=False to tax_tag_invert, but also fixes the computation of tax_tag_invert so that in does not rely on tax_base_amount anymore. This way, existing data will also benefit from the fix without having to recompute the field. Additionnally, there are currently plans to remove tax_base_amount in master, so this would have had to be done eventually anyway.
      
      OPW 3255511
      
      closes odoo/odoo#121605
      
      Related: odoo/enterprise#41162
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      b72fb76d
    • Mahdi cheikh rouhou (macr)'s avatar
      [FIX] sale : get correct button title invoice email · f1ceae57
      Mahdi cheikh rouhou (macr) authored
      
      When we have automatic invoicing enabled , the email sent to the user
      when he confirms his payment online will contain a button 'View Journal
      Entry'
      
      To reproduce the error :
      1- Install accounting, website, ecommerce, sales apps
      2- Go to website settings and activate automatic invoice
      3- Install test payment method and activate it
      4- Log out of the current account
      5- Make a purchase of any item and confirm the payment
      6- You will receive 2 emails , the second one will have the invoice and
      it will contain a button View journal entry
      
      The origin of the problem is not providing model_description when
      sending the invoice so it will take the display_name of the model
      'account.move' by default which is Journal entry.
      
      opw-3271345
      
      closes odoo/odoo#121525
      
      X-original-commit: 8d791167
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      Signed-off-by: default avatarMahdi Cheikh Rouhou (macr) <macr@odoo.com>
      f1ceae57
Loading