Skip to content
Snippets Groups Projects
  1. Sep 14, 2023
    • roen-odoo's avatar
      [FIX] point_of_sale: use correct partner_id for invoiced orders · a7ebb515
      roen-odoo authored
      
      Current behavior:
      When invoicing an order that was made in a closed PoS session, the wrong
      partner was used for the invoice. And so the total due was assigned to
      the wrong partner if you used the "Customer Account" payment method.
      
      Steps to reproduce:
      - Open PoS and make an order for a customer using the Customer Account
        payment method.
      - Close the PoS session.
      - Open the PoS session again, and invoice the order you made in the
        previous session.
      
      Fix:
      Use the commercial_partner_id of the order's partner instead of the
      partner_id directly.
      
      opw-3478670
      
      closes odoo/odoo#135007
      
      Signed-off-by: default avatarVlad Stroia (vlst) <vlst@odoo.com>
      a7ebb515
    • shsa-odoo's avatar
      [FIX] web_editor: apply font size on selected cells · 73d7d70c
      shsa-odoo authored
      
      Before this commit:
      
      -Font size does not get applied to selected cells.
      -Font style buttons were active when cells are selected.
      
      After this commit:
      
      -Font size can be applied.
      -The font styles should not all be toggle by default.
      
      task-3477490
      
      closes odoo/odoo#133188
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      73d7d70c
    • Victor Piryns (pivi)'s avatar
      [FIX] project: improve tags name_search robustness · 213b6885
      Victor Piryns (pivi) authored
      
      Description:
      The commit 05855b6b introduced a
      fast-path for the name_search on tags from the form view of tasks.
      But the implementation was too complex and wasn't handling correctly
      all possible operators (it just had a fallback on the default
      parent name_search implementation).
      The aim is to simplify the code for better robustness and
      maintainability long term.
      
      Fix:
      Convert the query to it's equivalent python code. It has a slight
      performance regression than the previous implementation (we are
      making 3 queries worse-case instead of 1), but the regression is
      non-significant and not critical.
      
      Affected versions:
      16.0 up to master
      
      Reference:
      task-3503721
      
      closes odoo/odoo#135323
      
      Signed-off-by: default avatarAudric Onockx (auon) <auon@odoo.com>
      213b6885
    • Aaron Bohy's avatar
      [FIX] web: fix randomly failing form tests · e341f592
      Aaron Bohy authored
      
      We must wait for an additional tick to be sure that the error
      dialog is displayed, because the "unhandledrejection" event is
      triggered asynchronously.
      
      Runbot issue-24690
      Runbot issue-24691
      Runbot issue-24744
      Runbot issue-24733
      Runbot issue-24742
      
      closes odoo/odoo#135426
      
      Signed-off-by: default avatarPierre Rousseau (pro) <pro@odoo.com>
      e341f592
    • Julien Carion (juca)'s avatar
      [IMP] web: easier translation for many2one · e97ec328
      Julien Carion (juca) authored
      
      This commit gathers the different parts of the content from the many2one
      confirmation dialog into a single _t in order to facilitate the foreign
      translations of the content
      
      closes odoo/odoo#135294
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      e97ec328
    • Pedram (PEBR)'s avatar
      [FIX] pos_loyalty: prevent loading a product twice · b64f9bfe
      Pedram (PEBR) authored
      
      Before this commit, if a product was set to be available in the PoS,
      and also existed in a reward, it was loaded to the PoS twice. This
      caused issues in _loadProductProduct during the assigning of pricelist
      items, and could result in missing pricelist information for a product.
      
      opw-3487702
      
      closes odoo/odoo#134835
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      b64f9bfe
    • Joseph Caburnay's avatar
      [FIX] pos_loyalty: free product rewards for order type rules · fb1b607f
      Joseph Caburnay authored
      
      The `_computeUnclaimedFreeProductQty` method was not properly computing
      reward quantities for order type rules. This commit fixes the
      computation to handle order type rules separately, allowing free
      product rewards to be granted as expected.
      
      The computation now also takes into account which rules were actually
      used when calculating points. It will ignore any rules that were not
      used in the points calculation when determining free product rewards.
      This ensures the rewards match the rules that contributed to points
      for the order.
      
      opw-3492083
      
      closes odoo/odoo#134557
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      fb1b607f
    • Julien Castiaux's avatar
      [FIX] mass_mailing: bad emoji insertion in subject · a84ed11a
      Julien Castiaux authored
      
      Go to the form view of mailing.mailing, write "hello " as the subject,
      insert an emoji, you end up with "hello:)" instead of "hello :)". The
      problem is that when the input loose the focus, it is automatically
      trim.
      
      Reconfigure the `char_emojis` widget so that is doesn't trim.
      
      task-id-3493168
      
      closes odoo/odoo#134519
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      a84ed11a
    • Martin Trigaux's avatar
      [I18N] l10n_din5008_repair: correct the translation · 9b8fb3e0
      Martin Trigaux authored
      
      closes odoo/odoo#135419
      
      Source: Larissa (lman)
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      9b8fb3e0
  2. Sep 13, 2023
    • Florent de Labarre's avatar
      [FIX] account: don't allow unlinking payment method lines used on non-accessible payments · 5086b39e
      Florent de Labarre authored
      
      In case of the user have no access to all account.payment, the record can be deleted.
      
      closes odoo/odoo#129253
      
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      5086b39e
    • Anh Thao Pham (pta)'s avatar
      [FIX] account: fix recompute of account_id on aml when changing partner · 2d5b4998
      Anh Thao Pham (pta) authored
      
      Steps to reproduce:
      - Create an invoice
      - Select a partner
      - Add an invoice line (without a product): a default account will be computed
      - Change the account
      - Add a second invoice line (with a product)
      - Change the account
      - Select another partner
      The account for the invoice line without a product will be recomputed, while
      the account for the invoice line with a product will not.
      
      The computation of the account should happen when the line is added.
      If the account has been changed, it should not be recomputed to a default one
      when changing the partner.
      The behavior for aml without product should be the same than aml with a product.
      
      opw-3474469
      
      closes odoo/odoo#135027
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      2d5b4998
    • Touati Djamel (otd)'s avatar
      [FIX] purchase: correctly calculate average price · febe8739
      Touati Djamel (otd) authored
      
      cherry-pick of a4904fb4889c16322494981f5a1be586683704bd
      
      Steps to reproduce the bug:
      - Create a storable product “P1”
          - costing method: avco
      - Create a PO:
          - Add the product “P1”:
              - Line 1: Qty= 10, price= $50
              - Line 2: Qty=1, price= $10
          - Confirm the PO and receive the product
      
      - Go to purchase → Reporting → Purchase Analysis
      
      Problem:
      The average price is incorrect, the current calculation is:
      
      (50 + 10) / 2 = 30
      
      The average should take into account the quantities purchased in each
      line, And not simply the number of line, so the correct calculation
      should be:
      
      ((10 * 50) + (10 * 1)) / 11 = 46.36
      
      The SQL query is correct, it is when applying the read_group that the
      calculation is incorrect, we should override it to make a personalized
      calculation of the average.
      
      opw-3136406
      
      closes odoo/odoo#135267
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      febe8739
    • Thomas Lefebvre (thle)'s avatar
      [FIX] event: translate ICS file · 35ca91fe
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      After registering for an event, you can download the '.ics' file.
      This file is not translated into the current user's language.
      
      Solution:
      ---------
      Use the default user language and, if public,
      use the language selected on the website.
      
      A user may wish to have his calendar in his preferred language
      by using the English website.
      
      opw-3193663
      
      closes odoo/odoo#135161
      
      X-original-commit: b06c56b9
      Signed-off-by: default avatarThomas Lefebvre (thle) <thle@odoo.com>
      35ca91fe
    • Rodolpho Lima's avatar
      [FIX] web_editor: missing record info for converted images · 9b948ff9
      Rodolpho Lima authored
      
      When the Wysiwyg is used by website, multiple editable elements are
      possible, and each of them carry the related record's model and id in
      the element's dataset.
      
      On the other hand, when the Wysiwyg is used by the html field, there's
      only one root editable element, and such information is not present in
      the editable's dataset, but in the widget's options object.
      
      Before this commit, when saving the content of an html field, modified
      images were converted to attachments without the correct reference to
      the record's model and id.
      
      This commit makes sure that such information is passed to the route that
      handles attachment creation.
      
      task-3495668
      
      closes odoo/odoo#134705
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      9b948ff9
    • Rodolpho Lima's avatar
      [FIX] web_editor: skipped image conversion to attachment in HtmlField · 743a5648
      Rodolpho Lima authored
      Commit [1] added a check for the closest ".o_dirty" editable element in
      order to define which editable is used for obtaining the model and id
      reference from its dataset, and also to avoid multiple attachment
      creation for the same image.
      
      But such check for the closest ".o-dirty" element evaluates to null when
      the Wysiwyg is used by the HtmlField component, as such class is not
      added to editable when saving/committing changes. This resulted in
      skipping the attachment creation for modified images.
      
      After this commit, attachment creation for modified images is not
      skipped if an element with the ".o_dirty" class does not exist.
      
      task-3495668
      
      [1]: https://github.com/odoo/odoo/commit/e631bff05a3588f3304b75b6a0018b096c13f68d
      
      Part-of: odoo/odoo#134705
      743a5648
    • Thomas Lefebvre (thle)'s avatar
      [FIX] web: display download button if not dirty · 3557e66a
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      -------------------
      For example:
      - add a work permit file to an employee (private information tab);
      - try to download it before saving;
      
      Issue:
      ------
      The old file is downloaded or a traceback occurs
      if there was no file before.
      
      Cause:
      ------
      When downloading, we use the `/web/content` endpoint.
      We will try to read the record in the backend via `_record_to_stream`.
      The record is not yet saved in database.
      
      Solution:
      ---------
      Disable download button if record is dirty.
      
      opw-3458842
      
      closes odoo/odoo#134521
      
      Signed-off-by: default avatarMichaël Mattiello (mcm) <mcm@odoo.com>
      3557e66a
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] web: remove properties from compatible import fields · 16912d7b
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      - Install Knowledge App
      - Create a sub-article and add them as many properties as you want.
      - Go to search to get the list view and export the article, adding both
      of the properties field (`article_properties`,
      `article_properties_definition`).
      - Now try to import the file we just exported.
      
      At this moment this issue affects knowledge properties and crm, leads
      properties (for reference see: #122817) but the proper fix is still not
      applied, and since it's implementation is complicated we are going to
      remove the properties from the export when we tick the
      "I want to update data (import-compatible export)." until the proper fix
      is done.
      
      opw-3346642
      
      closes odoo/odoo#131568
      
      Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
      16912d7b
    • Robin Lejeune (role)'s avatar
      [FIX] website: fix animations in popups without backdrop · 1b618b32
      Robin Lejeune (role) authored
      Since the scrollbar was moved from the window to .modal-content at [1],
      animations inside popups without backdrops would not be working anymore
      because the scroll was not checked against the right element.
      
      This commit fixes this by using the right scroll element's scrollTop.
      
      task-3328419
      
      [1] https://github.com/odoo/odoo/commit/cb7cf77
      
      
      
      closes odoo/odoo#122622
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      1b618b32
    • Arthur Detroux (ard)'s avatar
      [FIX] web_editor: fix images getting absolute URLs in grid mode · 3528f2c3
      Arthur Detroux (ard) authored
      [1] introduced the grid mode and with it a util that reloads lazy
      images in order to prevent a bug in Chrome which make images disappear.
      
      This util read the .src property of the image element. That property is
      the absolute URL.
      In order to keep the exact URL that was on the img attribute, one needs
      to use "getAttribute".
      
      This commit does exactly that.
      
      Steps to reproduce:
      - Drop a Image - Text snippet
      - Drag the image to enter grid mode
      => At the same time the image is reloaded with the wrong src
      
      [1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
      
      
      
      closes odoo/odoo#134019
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      3528f2c3
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] sale[_expense]: delivered quantity amplification · c1e9162c
      Andrea Grazioso (agr-odoo) authored
      
      Activate analytic accounting
      Configure a [TEST] product to create a project on order
      Create a SO with [TEST]
      Have an expense product [EXP] with reinvoice policy set
      Create an expense with [EXP] and set as analytic account the one created
      for the SO and another one
      Complete the expense flow
      Check the SO
      
      Issue: the expense line was added correctly but the quantity delivered
      is set to 2
      
      opw-3410712
      
      closes odoo/odoo#130812
      
      Signed-off-by: default avatarAndrea Grazioso (agr) <agr@odoo.com>
      c1e9162c
    • Dang Van Loc's avatar
      [FIX] mail: error odoo when /leave channel · 9f0721e0
      Dang Van Loc authored
      
      closes odoo/odoo#135246
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      9f0721e0
    • Antoine (ande)'s avatar
      [FIX] website_sale: sale ribbon not saving · 5d13fa52
      Antoine (ande) authored
      
      Current behaviour:
      When editing a product, try to add a ribbon,
      it will not save.
      
      Steps to reproduce:
      1. Go to website
      2. Go to Shop
      3. Click on Edit (top right)
      4. Select any product
      5. At Badge: Select Sale
      6. (badge is visible)
      7. Click on Save
      8. (badge is gone)
      
      Cause of the issue:
      The element was not considered "dirty"
      
      opw-3487397
      
      closes odoo/odoo#135008
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      5d13fa52
    • Rodolpho Lima's avatar
      [FIX] website: add missing flow to LinkTools tour · b8b96ea0
      Rodolpho Lima authored
      
      Before this commit, some actions related to link creation and edition
      were not tested by the LinkTools tour.
      
      This commit adds steps to the mentioned tour in order to avoid
      regressions of the issues fixed in the referred task.
      
      task-3284649
      
      closes odoo/odoo#118676
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      b8b96ea0
    • Rodolpho Lima's avatar
      [FIX] web_editor: update UI on link content change · 0b8e64fd
      Rodolpho Lima authored
      When changing a link's content, its URL (href attribute) might change
      (if the new label is a valid URL), due to a mechanism in OdooEditor.
      
      Before this commit, when a change in the link's content leads to a href
      change:
      - if the LinkTools is opened, the URL input field would become outdated
      and display an incorrect URL.
      - likewise, if the popover is shown, its content and position would be
      outdated (possibly covering the link's new content).
      
      This commit makes sure both the LinkTools URL input field and the
      popover stay up-to-date if a link's content or href changes.
      
      task-3284649
      
      Part-of: odoo/odoo#118676
      0b8e64fd
    • Rodolpho Lima's avatar
      [FIX] web_editor: update link content on URL change · 024471e3
      Rodolpho Lima authored
      If a link's content is equivalent to its URL, two problems can arise
      when its URL is changed via the LinkTools:
      - The link's content becomes outdated, showing a different URL;
      - On LinkTools destroy, the OdooEditor mechanism that updates a link's
      href on label(content) change will update the href according to the old
      label, effectively reverting the changes in the URL.
      
      This commit avoids such issues by syncing the label with the URL input
      field in such cases.
      
      task-3284649
      
      Part-of: odoo/odoo#118676
      024471e3
    • Rodolpho Lima's avatar
      [FIX] web_editor: 'mailto' to 'http' link conversion · a6978bcb
      Rodolpho Lima authored
      Before this commit:
      - URLs like "domain.com/@/page" were incorrectly detected as an email
      URL by Link(Dialog/Tools),
      - switching from an email URL to a http URL with the Link(Dialog/Tools)
      was not possible (URL remained prepended with "mailto:").
      
      This commit improves email detection from simply looking for a "@" to
      something slightly more robust, and makes switching between 'http'
      and 'mailto' links possible.
      
      task-3284649
      opw-3245501
      
      Part-of: odoo/odoo#118676
      a6978bcb
    • Rodolpho Lima's avatar
      [FIX] web_editor: auto transforming email URL · 99716f4d
      Rodolpho Lima authored
      Typing a URL + SPACE transforms the URL into a link.
      
      Before this commit, email URLs were incorrectly prepended with
      'https://'.
      
      Because it is not desirable to automatically transform email URLs, this
      commit disables link transformation for email URLs, leaving it only
      active for http URLs.
      
      task-3284649
      
      Part-of: odoo/odoo#118676
      99716f4d
    • Rodolpho Lima's avatar
      [FIX] web_editor: link update on label change · a903a311
      Rodolpho Lima authored
      OdooEditor has a mechanism to update a link's href on label change, if
      the new label is a valid URL.
      
      Before this commit, there were two issues:
      1. it did not work for email links. In fact, because this mechanism was
      incorrectly prepending email URLS with 'https://', [1] disabled it for
      'mailto:' links.
      2. when a link had a 'http' href but its label did not contain the protocol,
      upon label change (into a valid URL) the link had its href changed to 'https'.
      
      This commit:
      1. re-enables the auto update mechanism for email links and fixes it, so
      that it can correctly update both http and mailto links.
      2. fixes the 'http' to 'https' coercion issue, making sure the current
      protocol is kept when updating http(s) links.
      
      task-3284649
      
      [1]: https://github.com/odoo/odoo/commit/ea00a628969a0eeda66e06776af721a99a32cc57
      
      Part-of: odoo/odoo#118676
      a903a311
    • Rodolpho Lima's avatar
      [FIX] web_editor: persist URL-like text transformation to link · 02585442
      Rodolpho Lima authored
      Commit [1] separated the two responsabilites of _onURLInput: making
      changes to the DOM and updating the UI, taking care that only the second
      one is done at start.
      
      But this broke the following functionality:
      
      - Have a URL-like text (ex: odoo.com), select it and click the link icon
      on the sidebar.
      - The URL is deduced from the link's label.
      - Click anywhere to close the sidebar.
      
      Before [1], the link transformation would be kept. After it, it is not.
      This happens because this is a particular case in which we want to apply
      changes to the DOM at start time, as if a URL input event had happened.
      
      This commit fixes it.
      
      task-3284649
      
      [1]: 54746012
      
      Part-of: odoo/odoo#118676
      02585442
    • Miquel Raïch's avatar
      [IMP] models: only log "long name constraint" when the constraint is added · d0e65a0e
      Miquel Raïch authored
      
      This way, we avoid spamming the log each time new constraints are added in the constraint's table.
      
      closes odoo/odoo#135232
      
      X-original-commit: 8cf5fb77
      Signed-off-by: default avatarRémy Voet (ryv) <ryv@odoo.com>
      d0e65a0e
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] base: traceback on pdf read error · adf4c91f
      Andrea Grazioso (agr-odoo) authored
      
      Create a vendor bill with a specific attachment (on ticket)
      Go to vendor bill list view
      Select the created bill and another one
      Print > Original Bills
      
      Traceback due to unhandled ValueError on pdf read
      
      opw-3498898
      
      closes odoo/odoo#135075
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      adf4c91f
    • Lucas Lefèvre (lul)'s avatar
      [FIX] spreadsheet: update o_spreadsheet to latest version · 5239995a
      Lucas Lefèvre (lul) authored
      ### Contains the following commits:
      
      https://github.com/odoo/o-spreadsheet/commit/41fd4faf [REL] 16.0.18
      https://github.com/odoo/o-spreadsheet/commit/ebe6f3ba [FIX] ErrorToolTip: fix error tooltip long text Task: 3328557
      https://github.com/odoo/o-spreadsheet/commit/8b34aeed [IMP] LineChart: cumulative chart
      https://github.com/odoo/o-spreadsheet/commit/c9c9cab4 [FIX] InternalViewport: breaking spreadsheet when hiding rows/cols Task: 3414127
      https://github.com/odoo/o-spreadsheet/commit/b1b22901 [FIX] SheetPlugin: Prevent deletion of all non-frozen headers Task: 3414127
      https://github.com/odoo/o-spreadsheet/commit/34011c3d
      
       [REL] 16.0.17
      
      closes odoo/odoo#135175
      
      Signed-off-by: default avatarLucas Lefèvre (lul) <lul@odoo.com>
      5239995a
  3. Sep 12, 2023
Loading