Skip to content
Snippets Groups Projects
  1. Apr 26, 2023
    • thsh-odoo's avatar
      [FIX] crm: improve layout of conversion modal · 07263c78
      thsh-odoo authored
      
      When converting a lead to an opportunity and merging with existing
      opportunities, the list view showing opportunities is very tiny.
      
      This is caused by the field not having the correct colspan, as its label is
      hidden with the "nolabel" attribute.
      
      This commit fixes it by assigning a colpan of 2.
      
      Task-3179173
      
      closes odoo/odoo#119689
      
      X-original-commit: 6a003a12
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      07263c78
    • Audric Onockx (auon)'s avatar
      [FIX] project: allow subsequent update · 02868fff
      Audric Onockx (auon) authored
      
      Steps:
      Say 3 existing tasks :
      t0 (from which the recurrence has been created), t1, t2;
      and t4 (not created yet).
      When you change t0, t4 is updated as expected.
      
      Issue:
      But when you change t1, t4 doesn't take it into account.
      
      Cause:
      `ProjectTaskRecurrence._create_next_task` takes
      `recurrence.task_ids[-1]` as template to create the next occurence.
      Yet ProjectTask is ordered by "priority desc, sequence, id desc".
      All occurrences being likely to have the same priority and sequence,
      we the result ordered by id desc. So `recurrence.task_ids[-1]` has the
      smallest id and so it is the oldest one.
      
      Fix:
      Take the task with the max id.
      
      opw-3237168
      
      closes odoo/odoo#119700
      
      X-original-commit: 61bbd8e6
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      02868fff
    • Ricardo Gomes Rodrigues (rigr)'s avatar
      [FIX] stock_account: prevent stock account update on product change when using... · 2fcfa05d
      Ricardo Gomes Rodrigues (rigr) authored
      [FIX] stock_account: prevent stock account update on product change when using manual stock valuation
      
      If the category of a product is using manual stock valuation, when changing the product on an invoice line,
      the account should not be set to the `property_stock_account_input_categ_id`. It should be the case only if
      we use automatic/real-time stock valuation.
      
      opw-3226536
      
      closes odoo/odoo#119662
      
      X-original-commit: 1f888943
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      Signed-off-by: default avatarRicardo Gomes Rodrigues (rigr) <rigr@odoo.com>
      2fcfa05d
    • Nshimiyimana Séna's avatar
      [FIX] account: allow sending invoice to partner other than the customer · 1b72fde2
      Nshimiyimana Séna authored
      
      ## Bug
      
      When sending an invoice to a recipient who is not the customer, they are
      unable to view the invoice in the customer portal and are prompted to
      log in.
      
      ## Steps to reproduce
      
      1. Create and validate an invoice
      2. Click on the Send & Print button, then add a recipient who is not the
         customer associated with the invoice.
      3. Proceed to send the invoice.
      4. Access the email that was sent to the added recipient (who is not the
         customer)
      5. Using an incognito or private browsing window, open the link
         `View Invoice`
      
      => you should see that you are asked to log in, instead of being
      directed to the customer portal.
      
      opw-3114579
      
      closes odoo/odoo#119644
      
      X-original-commit: 95c585f6
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      Signed-off-by: default avatarNshimiyimana Serge Séna (sesn) <sesn@odoo.com>
      1b72fde2
    • Xavier Morel's avatar
      [FIX] base, crm: uninstallation · 1dc316ad
      Xavier Morel authored
      
      Uninstallation does not cope well with `setup_models` being performed
      unconditionally as those will dramatically alter registry states, and
      resurrect computes which the uninstallation has disabled: rather than
      try to update registry models in-place (which is rather fraught) the
      uninstallation deletes the columns, tables, and `ir.*` reflection
      records and only after all of that is done does it reset the registry.
      
      This means while it does fix up the registry caches (`field_depends`
      and `field_triggers`) as it goes, resetting those may cause the
      recomputation of fields whose columns have been deleted, possibly
      based on dependencies whose columns have also been deleted.
      
      As such these kinds of manipulations should either be performed in
      `@ondelete` methods which don't get executed during uninstallation, or
      they should be gated behind an uninstallation check.
      
      In crm the latter is necessary, as `ondelete` runs before `unlink`
      actually executes, and the registry reset would run too early (and
      unnecessarily).
      
      In base, only the latter is possible as we're not in `unlink` itself,
      instead `IrModelFields._prepare_update` is called *during*
      uninstallation and its trailing `setup_models` causes the issue.
      
      closes odoo/odoo#119606
      
      Related: odoo/enterprise#40284
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      1dc316ad
    • Xavier Morel's avatar
      [FIX] mail: uninstallation · ec83293c
      Xavier Morel authored
      When modules get uninstalled, first the uninstall process will drop
      all the fields (removing all the columns) then it drops all the
      models (removing the tables).
      
      When uninstalling mail, this means the various (res_)model(_id) fields
      don't exist anymore by the time we're deleting models, so the queries
      blow up.
      
      Skip this step if we're unlinking the mail models, it means the tables
      have already been dropped, so there's nothing to delete anymore. This
      should not use `ondelete` because we *do* want to delete records from
      those tables when deleting modules which depend on mail, and thus have
      mail stuff associated with their own models which we're deleting.
      
      Part-of: odoo/odoo#119606
      ec83293c
    • Xavier Morel's avatar
      [FIX] core: flush after every uninstall hook · 63e83183
      Xavier Morel authored
      Confusion between uninstall hooks can apparently trigger errors during
      uninstallation as two hooks can confuse one another?
      
      In this here case, the issue triggered during the uninstall hook of
      `account_accountant`, which apparently combines with the uninstall
      hook of `industry_fsm_sale` to trigger an invalid in-memory state for
      `project_project`. An implicit flush during the hook then blows up
      with a check constraint error.
      
      Flushing at the end of the `industry_fsm_sale` hook or at the start of
      the `account_accountant` hook fixes the issue, so might as well flush
      after each hook to ensure whatever they did using models is pushed to
      the database and in good shape (hopefully).
      
      Part-of: odoo/odoo#119606
      63e83183
    • Adrien Widart (awt)'s avatar
      [FIX] delivery,stock: always hide length UoM · 3685a823
      Adrien Widart (awt) authored
      [1] hides the length UoM if the package is related to a specific
      carrier (BPost, Fedex, etc). However, there will still be an issue when
      the carrier is not defined: if the length UoM of the database is `ft`,
      so will the length UoM of the package type. Moreover, the dimensions
      fields are integer:
      https://github.com/odoo/odoo/blob/b1012175393ca5612899c1a0f1d3803ed8d4fe94/addons/stock/models/stock_package_type.py#L19-L21
      
      
      As a result, it will be impossible for a user to encode a package type
      with a length equal to 10in
      
      [1] 9250accb
      
      OPW-2865471
      
      closes odoo/odoo#119519
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      3685a823
    • Mylyna Hy's avatar
      [FIX] stock_account: search journal by code · f33b61a4
      Mylyna Hy authored
      
      Problem: When the user installs Inventory and uninstalls it,
      the Inventory Valuation journal still exists in the database.
      The user is unable to re-install Inventory
      if the database not in English.
      
      Example: Client's db is in Spanish
      In method "_configure_journals" ,
      it searches for the Inventory Valuation journal based on the name translated in Spanish.
      However, the journal "Inventory Valuation" is not translated to Spanish in the database.
      Therefore, no journal would be found
      and an error "Journal codes must be unique per company" will be thrown
      because it will try to create another "Inventory Valuation" journal with code  'STJ'.
      
      Solution:
      Since journal codes have to be unique, it is more logical to search for an
      existing journal based on its code instead of the name
      since it is possible to have multiple journals with the same name but different codes.
      
      opw-3277498
      
      closes odoo/odoo#119023
      
      X-original-commit: 680ff54c
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      f33b61a4
  2. Apr 25, 2023
    • Achraf's avatar
      [FIX] google_calendar: Change logger type from error to exception · e7977125
      Achraf authored
      In sentry we receive like 2k syncing issue from google_calendar.
      
      This commit converts `_logger.error` to `_logger.warning` because we don't
      need an erro for that
      
      sentry-4121123364
      https://online.sentry.io/issues/4121123364
      
      
      
      closes odoo/odoo#119616
      
      Signed-off-by: default avatarArnaud Joset <arj@odoo.com>
      e7977125
    • Nasreddin Boulif (bon)'s avatar
      [FIX] website_slides: Raise error if not responsible on invite · 0d0fb3a4
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
      - Install `E-learning` module
      - Create a user X with only "Officer" as rights for `E-learning`
      - Login with user X
      - Go to `E-learning` and open any course
      - Ensure that the user X is not the responsible and that the course
        enroll policy is set to "On invitation"
      - Invite any user not already a member
      
      Issue:
      
        No user was invited (not added as member) and no warning message
        raised.
      
      Cause:
      
        Due to the ir.rule "Channel: officer: create/write own only", the
        `Officer` user can only edit (and therefore invite members) on
        courses where he is responsible.
      
      Solution:
      
        In the wizard, we check if the user has the rights to invite members
        on the course when sending the invitation. If not, we raise an error.
      
      opw-3133733
      
      closes odoo/odoo#119607
      
      X-original-commit: d341efaf
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      0d0fb3a4
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account,point_of_sale: payment reconciliation line order · 46974c0f
      Andrea Grazioso (agr-odoo) authored
      
      Create 3 invoices for customer (A: $100, B: $300, C: $200)
      Have a customer payment of $500
      Reconcile the payment, in the widget add the line in the order:
      - Payment line
      - Invoice A
      - Invoice B
      - Invoice C (partial payment)
      Reconcile
      Check invoices
      
      Issue:
      C will be fully paid, the partial payment will be applied to B
      After 5b2c1d24
      We order the lines by amount currency but the user provided order is
      lost. Moving the original fix to point of sale
      
      opw-3240586
      
      closes odoo/odoo#119477
      
      Related: odoo/enterprise#40173
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      46974c0f
    • odoo's avatar
      [FIX] project: fix recurrence boolean should be hidden issue · df6048ec
      odoo authored
      
      Description of the issue/feature this PR addresses:
      In project module, when sub-tasks is created then recurrence boolean field
      should not be visible in that task. It only visible in parent tasks.
      
      Current behavior before PR:
      recurrence field is visible in sub-tasks.
      
      Desired behavior after PR is merged:
      recurrence field is not visible in sub-tasks.
      
      task-3252521
      
      closes odoo/odoo#118561
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      df6048ec
    • Mathieu Walravens's avatar
      [FIX] http: rewind file upload on serialization failure · 27b86439
      Mathieu Walravens authored
      
      Before this commit:
      When uploading a file, if the transaction fails due to a serialization
      failure, Odoo will retry the request. However, if a file upload is read
      during the transaction, the file pointer will be at the end of the file,
      and calling `.read()` again returns an empty bytes object.
      
      After this commit:
      Upon retrying the request, rewind uploads to the beginning of the file,
      if the file supports it.
      
      opw-3228200
      
      closes odoo/odoo#119613
      
      X-original-commit: a856c465
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      Signed-off-by: default avatarWalravens Mathieu (wama) <wama@odoo.com>
      27b86439
    • Yolann Sabaux's avatar
      [FIX] purchase: prevent unnecesary change of currency · 026f77ec
      Yolann Sabaux authored
      Steps to reproduce:
      - put the currency of the bill to eur
      - change the partner with a partner with no purchase currency set
      
      Issue:
      The bill is re-set to usd
      
      Note:
      addendum to https://github.com/odoo/odoo/pull/116852
      
      
      
      opw-3233527
      
      closes odoo/odoo#119624
      
      X-original-commit: 647e289c
      Signed-off-by: default avatarCedric Snauwaert <csn@odoo.com>
      Signed-off-by: default avatarYolann Sabaux (yosa) <yosa@odoo.com>
      026f77ec
    • Deependra Solanki's avatar
      [FIX] web_editor: fix line merge on color change · 0473dbd0
      Deependra Solanki authored
      
      Before this commit:
      
      When using shift+enter to move to a new line, now applying bold, italics,
      underline, etc and then trying to add a color to both lines would result in
      lines merging.
      
      After this commit:
      
      Now when the both lines are bold and then applying a color to both the lines
      would no longer merge.
      
      closes odoo/odoo#118698
      
      Task: 3269922
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      0473dbd0
    • Stanislas Gueniffey's avatar
      [IMP] web_editor: improve focus() for LinkDialog · 70649465
      Stanislas Gueniffey authored
      
      Previously, LinkDialog always focused on the first editable input field.
      
      This commit introduces a new option in the LinkDialog constructor,
      `focusField`, that allows to designate a specific field to focus on.
      
      This option is now used to focus on the second editable input field when
      the first one is already filled (for example, from the user selection).
      
      task-3224551
      
      closes odoo/odoo#116555
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      70649465
    • Saurabh Choraria's avatar
      [FIX] base_import: prevent traceback of Unsupported file format text/csv · 221323f0
      Saurabh Choraria authored
      When we try to import bank statement CSV file with all required columns and
      set the encoding format as koir8_r we get (ValueError: Unsupported file format
      text/csv, import only supports CSV, ODS, XLS and XLSX) this error.
      
      steps to reproduce:
          1. Go to accounting and then import bank statement.
          2. Select a csv file to import with all required columns.
          3. Set Encoding format as koir8_r and then click on 'TEST' or 'IMPORT'.
          4. The error will occur.
      
      see this traceback: https://tinyurl.com/24bxk7bt
      
      
      
      Applying this commit will fix this issue.
      
      sentry-4049996747
      
      closes odoo/odoo#118615
      
      Signed-off-by: default avatarAchraf <abz@odoo.com>
      221323f0
    • Nasreddin Boulif (bon)'s avatar
      [FIX] google_calendar: sync the right description · 21f3f9aa
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install 'CRM' module (for test purpose)
        - Configure the google calendar credentials on Odoo
        - Go to CRM -> Configuration -> Activity Types and create a new one
        - Set 'Meeting' as Action
        - As default note, add some bullet points:
          ```
          Hello :
            - First point
            - Second point
            - Third point
          ```
        - Open any Opportunity and create a new Activity (in the chatter)
        - Select 'Meeting' as activity type and open the calendar
        - Add a new event (description should be field with the default note)
        - Open the event (on Odoo and/or Google Calendar)
      
      Issue:
      
        The description of the event is broken (bullet points missing).
      
      Cause:
      
        When syncing the event from Odoo to Google Calendar, the description
        is converted to plain text (using `html2plaintext` function).
        Then, when syncing the event from Google Calendar to Odoo,
        the description is also updated locally with the remote one.
      
      Solution:
      
        Don't convert the description to plain text but use
        `tools.html_sanitize` on the html content instead to sanitize it.
      
      opw-3105194
      
      closes odoo/odoo#115304
      
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      21f3f9aa
    • Camille Spiritus's avatar
      [FIX] account/l10n_ch: QR-Bill - remove border outside of printing zone · 5464eae5
      Camille Spiritus authored
      
      In Switzerland, it is mandatory, when a QR bill is printed, to use a line to separate both the QR part from the rest of the page and, within the QR zone, the receipt from the payment part.
      
      This was done using dotted lines on the bill.
      
      However, while generating the PDF caused no problem, the snailmail provider can't print the bottom, far left and far right borders since those are outside of the printing zone.
      
      After further research it does however seem that those are not mandatory, unlike the two separations aforementioned.
      
      Removed those to allow for snailmail printing.
      
      opw-3223714
      
      closes odoo/odoo#119524
      
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      5464eae5
    • Mehdi Bendali Hacine's avatar
      [IMP] base_vat: add TIN validation for KSA · efbaf72c
      Mehdi Bendali Hacine authored
      
      closes odoo/odoo#119018
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      efbaf72c
    • Benjamin Vray's avatar
      [FIX] website: fix animations on rtl pages · 64ffe361
      Benjamin Vray authored
      
      Steps to reproduce the issue:
      
      - Open a website page in edit mode.
      - Drag and drop several snippets onto the page.
      - Add a 'Fade In Right' animation to an element on the page.
      - Exit edit mode.
      - Change the website language to Arabic to display the scrollbar on the
      left.
      - Test the animation.
      - Bug: the scrolling (using the mouse wheel) becomes stuck or very slow
      during the animation.
      
      The issue only occurs with Chrome or Edge browsers and seems to be a
      browser display issue. It happens only when animated elements overflow
      to the left.
      
      This commit fixes the problem by adding an 'overflow: hidden' to the
      main element during RTL page animations. This is not the best solution
      because the animated elements become non-visible outside the main
      element, creating a difference, for example, with the 'Framed' page
      layout.
      
      opw-3260399
      
      closes odoo/odoo#118892
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      64ffe361
    • Jinjiu Liu's avatar
      [FIX] web_editor: don’t delete table cell when its left cell has content · 9b599cb1
      Jinjiu Liu authored
      
      Reproduction:
      1. Create a 1 by 3 table, input something in the first cell
      2. Go to the second cell, hit backspace
      3. The second cell is deleted and the third cell is moved to the second
      cell
      
      Note: in 15, we don’t have the table selector to remove a row of the
      table but that is another issue
      
      Fix: when we try to delete the table cell and the offset is 0, nothing
      should be done. Also added a test to make sure the cell is unchanged
      when we try to delete in an empty cell which has a cell with content
      at the left. Also we skip the rejoin block step if there's a table cell
      element is invoivled because the cells are not deleted and rejoining
      them is not needed
      
      Task-3171904
      
      closes odoo/odoo#114895
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      9b599cb1
    • Benoit Socias's avatar
      [FIX] web_editor: force Chrome to display image when it loses it · 730db1ab
      Benoit Socias authored
      
      In some situation, Chrome "loses" an already loaded lazy-loaded image
      when it is moved across nodes in the DOM. This typically happens when
      wrapping an image inside a link.
      Note that the DOM is actually correct: if the page is saved it then
      displays it correctly.
      
      This commit detects if this problem happens when adding a link on an
      image, and forces Chrome to re-display the image by re-specifying its
      `src` attribute. No alternative solution was found.
      
      Steps to reproduce:
      - Use a brand new incognito Chrome window. (Make sure you closed any
      previously opened incognito Chrome window before)
      - Drop a "Text - Image" snippet.
      - Save.
      - Edit.
      - Select image.
      - Press "CTRL+K".
      => The image was not displayed anymore.
      
      task-2962619
      
      closes odoo/odoo#98889
      
      closes odoo/odoo#118432
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      730db1ab
  3. Apr 24, 2023
  4. Apr 23, 2023
  5. Apr 21, 2023
Loading