Skip to content
Snippets Groups Projects
  1. Sep 14, 2023
  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
    • roen-odoo's avatar
      [FIX] point_of_sale: remove 0€ payment line of orders · b45f75a3
      roen-odoo authored
      
      Current behavior:
      When an order contains a payment line with 0€, and a customer account
      payment line. Then you close the PoS and invoice the order from an other
      PoS session, you get an error.
      
      Steps to reproduce:
      - Open PoS, make a new order with a payment line of 0€ and a customer
        account payment line.
      - Close the session and open a new one.
      - Go in the paid order, and try to invoice it.
      - You get an error.
      
      Fix:
      To fix the issue we just remove the useless 0€ payment line.
      
      opw-3477486
      
      closes odoo/odoo#134702
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      b45f75a3
    • Denis Ledoux's avatar
      [FIX] sale: apply record rules on order cancellation subject and body · 64530065
      Denis Ledoux authored
      
      When rendering the sale order cancellation message,
      the rendering should apply the current user record rules,
      for instance the count of the partner sale orders should
      match the count of what the salesman can see in his ui.
      Otherwise he doesn't understand why he has a different count
      in the UI and in the cancellation message.
      
      In case you want the behavior of seeing all records
      and not just the current salesman records only,
      then you apply within the template itself the
      `sudo()`.
      
      Applying the `sudo` where you actually need it in the template,
      and not computing the full subject/body as sudo,
      offers more granularity.
      
      closes odoo/odoo#135127
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      64530065
    • Florent de Labarre's avatar
      [FIX] mail: res.users.settings have no display_name · 4155743c
      Florent de Labarre authored
      
      Before this commit res.users.settings have no display_name.
      
      closes odoo/odoo#135106
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      4155743c
    • Nishit Thakkar's avatar
      [FIX] tools : Save translation for record with no model data record · 880538db
      Nishit Thakkar authored
      
      According to standard flow when a record is created by user we do not make
      a model data entry and if he does any changes in standard record we change the
      noupdate to true on conditional bases to keep the data same while upgrading
      but in the case of user created record where there is no model data entry the
      engine should consider it as noupdate true but without the model data entry
      select query gets null resulting into engine considering it false and the update
      case are designed to consider true or else  so for null case it falls under else
      part hence creating issue in product_template name and cowed website menu
      So,we have updated the case accordingly.
      
      closes odoo/odoo#129518
      
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      880538db
    • Jinal Patel's avatar
      [FIX] tools: Avoid to delete translation for website · 2575dff9
      Jinal Patel authored
      - If default language of website is not en_US then it's
        translation will be lose after upgrade as till now we are
        considering en_US as a default language for all the records.
      
      - In this commit, we have added translation for website which
        is having different default language.
      
      Opw: 3186741, 3418725
      Part-of: odoo/odoo#129518
      2575dff9
    • Antoine Boonen's avatar
      [IMP] hr_expense: Don't hide taxes on hr.expense when product has cost · fb36b3a5
      Antoine Boonen authored
      
      Problem
      ---------
      In 15, taxes are hidden from hr.expense when the expense category has a
      cost. They can however be configured and added. The current behaviour is
      counter intuitive.
      
      Objective
      ---------
      Don't hide taxes when product has cost in v15.
      
      Solution
      ---------
      Remove the `hidden` attribute in the expense xml form as well as the
      `groups` attribute.
      
      task-3491868
      
      closes odoo/odoo#135076
      
      X-original-commit: 7ee0770fdab75cd0ffd11d73ed3ae8d91ea60477
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      Signed-off-by: default avatarAntoine Boonen (aboo) <aboo@odoo.com>
      fb36b3a5
Loading