Skip to content
Snippets Groups Projects
  1. Apr 21, 2023
  2. Apr 20, 2023
    • Arnold Moyaux's avatar
      [FIX] stock: prevent the import of stock.move.line with reserved quantity · 1a264d7d
      Arnold Moyaux authored
      
      Use case: Create an import file for a picking with stock.move.line directly in
      it and add some reserved quantity on the stock.move.line.
      
      The import of stock.move.line is not possible directly via a
      stock.move.line menu but it still possible on a picking or
      mrp.production import. However the create does not expect that
      and never reserve the quants. So it result with quant <-> sml
      inconcistencies in the data and the error can not reserve more
      than you have in stock.
      
      opw-3277938
      
      closes odoo/odoo#119201
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1a264d7d
    • Alvaro Fuentes's avatar
      [FIX] core: fix majorless upgrade · 9ae7a7d1
      Alvaro Fuentes authored
      
      When we compare majorless scripts we must ignore the Odoo version.
      Otherwise a module upgrade without major Odoo upgrade would fail to run
      local scripts majorless scripts. That's what happens for example when
      users click the upgrade button of a module.
      
      Example: upgrade from `11.0.1.0` to `11.0.2.0`, with a local `2.0` folder
      for upgrades.
      ```
      11.0.1.0 < 11.0.2.0 < 11.0.2.0 -> False (check before this patch)
           1.0 <      2.0 <=     2.0 -> True  (check with this patch)
      ```
      While still: upgrade from `11.0.2.0` to `12.0.2.0`
      ```
      11.0.2.0 < 12.0.2.0 < 12.0.2.0 -> False (before this patch)
           2.0 <      2.0 <=     2.0 -> False (with this patch)
      ```
      
      closes odoo/odoo#119148
      
      X-original-commit: 84ab74c62a19d08de8b6c7c4e3f3300d7e79bcf9
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      9ae7a7d1
    • Soukéina Bojabza's avatar
      [FIX] website_sale: fix cart popover on hover for all header templates · ecefa679
      Soukéina Bojabza authored
      
      Before this commit, when hovering the shopping cart in the "Boxed" and
      "Centered Logo" header templates, the cart popover was not appearing.
      
      This happened because the `websiteSaleCartLink` public widget was never
      started with these templates and so, hovering the cart had no effect.
      This is due to this widget selector which targeted a cart link located
      inside an element with id `#top_menu`, which is not the case in these
      templates where the cart link is located outside of it.
      
      This commit fixes this widget selector, in order for the cart link to be
      reachable in all header templates.
      
      opw-3267114
      
      closes odoo/odoo#118822
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      ecefa679
    • Daniel Kosky (dako)'s avatar
      [FIX] stock: don't replace product/inventory view groups · 43c888bb
      Daniel Kosky (dako) authored
      
      The current view replaces the existing groups attribute of the inventory
      page in the product template form view with two specified groups (with
      only one of these groups being newly introduced in stock).
      
      This commit changes the product view to utilise an xpath that adds the
      single new group (stock.group_stock_user), instead of replacing the
      content of the attributes.
      
      closes odoo/odoo#119200
      
      Related: odoo/enterprise#40074
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      43c888bb
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: if no VAT PartyTaxScheme should appear · 02f820fb
      Julien Van Roy authored
      
      If a partner has no VAT number (for instance: a public administration),
      the xml tag `PartyTaxScheme` should not appear for UBL Bis 3.
      
      opw-3263542
      
      closes odoo/odoo#119094
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      02f820fb
  3. Apr 19, 2023
  4. Apr 18, 2023
  5. Apr 17, 2023
    • Guillaume (gdi)'s avatar
      [FIX] website: add a robust utility to enter in edit mode · e02c3a18
      Guillaume (gdi) authored
      
      This commit creates a new util which clicks on edit and waits for the
      edit mode to be started. This way, we make sure that the edit mode is
      enabled before testing the next step of the test. This avoids race
      conditions during tests.
      
      Note that we leave the old clickOnEdit util as it could be used in
      custom codes and we don't want to break them.
      
      task-3203820
      
      closes odoo/odoo#116490
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      e02c3a18
    • Benoit Socias's avatar
      [FIX] web_editor: deselect snippet when clicking on empty content · fc720940
      Benoit Socias authored
      
      When clicking on the pseudo-block that appears in an empty page, the
      snippet icons bounce. However, if a snippet is selected it is not
      deselected and the icons are not visible.
      This is a problem after the previous commit because if an item is
      selected within an "On Hover" mega menu when this pseudo block is
      clicked, the mega menu is closed, but the snippet remains selected.
      
      This commit removes the snippet selection before bouncing the icons to
      avoid this problem.
      
      Steps to reproduce:
      - Add a mega menu.
      - Set "Sub Menus: On Hover".
      - Select an element inside the mega menu.
      - Click on the "DRAG BUILDING BLOCKS HERE" pseudo-block.
      
      => The mega menu was closed, but its inner element remained selected.
      
      task-2825376
      
      closes odoo/odoo#110258
      
      Signed-off-by: default avatarVray Benjamin (bvr) <bvr@odoo.com>
      fc720940
    • Benoit Socias's avatar
      [FIX] website: disable mega menu hover mode while editing · 4a1de8b6
      Benoit Socias authored
      When a mega menu "Sub Menus" are configured as "On Hover", it becomes
      very difficult to edit its content.
      
      This commit changes the behavior of the "On Hover" while the page is
      being edited:
      - it disables the hide on exit (`mouseleave`)
      - it prevents the show on hover if another dropdown is already opened
      - it hides the menu when the page is clicked outside of the opened menu
      
      This commit also disables the preview of the "Show Sign In" option
      which is not previewed anyway, so that it does not deselect the mega
      menu when hovering the options.
      
      task-2825376
      
      Part-of: odoo/odoo#110258
      4a1de8b6
    • Matheus Leal Viana (malv)'s avatar
      [FIX] purchase: Do not display notes/sections in purchase reporting · 8eab549c
      Matheus Leal Viana (malv) authored
      
      The issue is when we create a new PO with notes/sections and these notes/sections are showed on purchase reporting and only the products were supposed to appear there.
      
      This issue happens because the SQL query wasn't applying any filter to the lines. The solution is apply a filter by display_type.
      
      Steps to reproduce:
      1) Go to Purchase App -> Purchase Orders -> Create a new PO with notes/sections
      2) Go to Reporting -> View as pivot
      3) You'll be able to see the section/notes you just created
      
      closes odoo/odoo#118020
      
      Opw: 3245933
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      8eab549c
    • roen-odoo's avatar
      [FIX] point_of_sale: Add sales description to pos invoice · fcf0fe54
      roen-odoo authored
      
      Current behavior:
      If you add a sale description to a product, it will not be added to the
      invoice created from the PoS.
      
      Steps to reproduce:
      - Add a sale description to a product
      - Create a PoS order with this product
      - Create an invoice from the PoS order
      - The sale description is not added to the invoice
      
      opw-3221481
      
      closes odoo/odoo#117974
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      fcf0fe54
  6. Apr 16, 2023
  7. Apr 14, 2023
    • niyasraphy's avatar
      [FIX] transifex: update transifex project url · c79164f6
      niyasraphy authored
      
      from april 3, the transifex has changed domain
      from www.transifex.com to app.transifex.com
      
      after this commit, the transifex project url
      in the system parameter will be updated to
      the new domain
      
      closes odoo/odoo#118574
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      c79164f6
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr: add private contact to employee's followers · 17740f1d
      Thomas Lefebvre (thle) authored
      
      When creating an employee with a private contact,
      the contact will not be automatically added to the employee's followers.
      
      The desired behavior is that the contact is added
      to the followers even if it has a private address.
      Commit: 8760a4d0
      
      However, this behavior will not be possible because
      adding a contact with a private address is forbidden.
      Commit: 20536e1b
      
      Solution:
      The solution is to use the private method `_message_subscribe`.
      This is not a problem in the business case.
      Indeed, the people who have access to the employee's file
      also have access to the private contacts.
      Moreover, the access rights of the public method `message_subscribe`
      do not concern this business case.
      
      opw-3249646
      
      closes odoo/odoo#118572
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      17740f1d
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] stock: use the domain selection for actions in StockOrderpointListView · 32962841
      Hubert Van de Walle (huvw) authored
      
      Steps to reproduce
      ==================
      
      - Go to Inventory > Operations > Replenishment
      - On the top right, set the pager to 1-1
      - Select the only record
      - Click on Select All
      - Click on Order/snooze
      
      The action is only called for the records in the current page
      
      Cause of the issue
      ==================
      
      The `getSelectedRecords` function only returns records on the current page
      Use the `getSelectedIdsWIthDomain` function
      
      opw-3259642
      
      closes odoo/odoo#117894
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      32962841
  8. Apr 13, 2023
    • Benoit Socias's avatar
      [FIX] web_editor: allow aligning pictograms to the right in cards · f0ea36dc
      Benoit Socias authored
      
      When replacing an image by a pictogram inside columns, the pictogram
      right-alignment is neutralised by the fact that the section of the card
      inside the column spans over 100% width.
      
      This commit makes pictograms in those sections rely on their auto width
      instead - thus letting the right-alignment happen as expected.
      
      Steps to reproduce:
      - Drop a "Columns" block.
      - Replace an image by a pictogram.
      - Select the pictogram.
      - Click on the "Float Right" icon in the toolbar.
      => Pictogram remained aligned to the left.
      
      task-2841127
      
      closes odoo/odoo#90410
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      f0ea36dc
    • Benoit Socias's avatar
      [FIX] web_editor: align image to the right · 041b50b1
      Benoit Socias authored
      Align images to the right by using an auto left margin.
      
      Steps to reproduce:
      - Drop a "Columns" block.
      - Select an image.
      - Resize image to 50%.
      - Align image to the right.
      => Image did not get aligned to the right.
      
      task-2841127
      
      Part-of: odoo/odoo#90410
      041b50b1
    • roen-odoo's avatar
      [FIX] point_of_sale: change hardcoded pricelist id · ce5ed0d4
      roen-odoo authored
      
      Change hardcoded pricelist id to avoid test failures.
      
      opw-3206618
      
      closes odoo/odoo#118477
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      ce5ed0d4
    • Tom De Caluwé's avatar
      [FIX] hr_holidays: ignore unconfirmed leaves in current leave status · 37f2fc5c
      Tom De Caluwé authored
      
      As of this commit, only confirmed leaves will be considered when computing the
      current leave or absence of an employee. Additionally, a bug in the is_absent
      search implementation was fixed: before this commit, the same results were
      returned for absent and non-absent searches.
      
      opw-2877328
      
      closes odoo/odoo#105451
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      37f2fc5c
    • Guillaume (gdi)'s avatar
      [IMP] web: add TikTok icon · 515915b9
      Guillaume (gdi) authored
      
      This commit patches the font awesome library to add an icon for the
      TikTok social network. Users are now able to add these icons with the
      media dialog. Now, the TikTok icon works like all other font awesome
      icons, with the new class introduced by this commit: `fa-tiktok`.
      
      Technical note:
      In order to add this new icon, a new font that contains only the TikTok
      logo has been created.
      
      task-3235451
      
      closes odoo/odoo#116383
      
      Signed-off-by: default avatarVray Benjamin (bvr) <bvr@odoo.com>
      515915b9
  9. Apr 12, 2023
    • Nasreddin Boulif (bon)'s avatar
      [FIX] mail_thread: save attachment from mail in same encoding · 7874c388
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Configure incoming mail server and set it to create X record
          on incoming mails (X can be any model with a chatter)
        - Create a CSV file and set the encoding to UTF-16
        - Send the CSV file through Gmail to the Odoo instance
        - Go to model X and open the created record
        - In the chatter, click/download the CSV file
        - Open the downloaded file with Geany (or any file editor that can
          show the file encoding)
      
      Issue:
      
        The file encoding is not the same as the original file (utf-8 instead
        of utf-16).
        Working with Outlook.
      
      Cause:
      
        The difference between Outlook and Gmail is that Gmail provides the
        charset of the file.
      
        The content of the mail is retrieved using `email` python lib.
        The lib will try to retrieve the charset of the file and fallback
        on `ASCII` if not available, then return the decode content.
      
      ```python
        def get_text_content(msg, errors='replace'):
          content = msg.get_payload(decode=True)
          charset = msg.get_param('charset', 'ASCII')
          return content.decode(charset, errors=errors)
      ```
      
        Example:
        content = b'd\x00a\x00,\x00,\x00,\......'
        Outlook:
        charset = 'ASCII'
        return => 'd\x00a\x00,\x00,\x00...'
        Gmail:
        charset = 'UTF-16LE'
        return => 'da,,,,,\n,,,,,\....'
      
        In the post process of the attachment, the content is encoded in
        'utf-8' (to then encoded in base64) before creating the attachment
        record.
      
        Content encoded to 'utf-8':
        Outlook: b'd\x00a\x00,\x00,\x00...'
        Gmail:  b'da,,,,,\n,,,,,\n....'
      
        Therefore, when writing the file on the disk, the encoding is based
        on the binary content.
      
      Solution:
      
        When parsing the mail, add the encoding charset to the `info` variable.
        Then, when creating the attachment, use the charset in `info` (or
        fallback on 'utf'8' if no charset set) to encode the content.
      
      opw-3089009
      
      closes odoo/odoo#111298
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7874c388
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr_timesheet: display timesheets without task in portal · 50280240
      Thomas Lefebvre (thle) authored
      
      Issue:
      When a project is shared with portal users,
      only timesheets that are linked to tasks will be displayed.
      
      Solution:
      Change the domain that selects the timesheets to be displayed
      to take into account timesheets that are not linked to a task,
      but are in a project to which the portal user has access.
      
      opw-3253632
      
      closes odoo/odoo#118329
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      50280240
  10. Apr 11, 2023
    • MerlinGuillaume's avatar
      [FIX] mail: disable the tracking of binary fields · 8506b9d6
      MerlinGuillaume authored
      
      Tracked binary fields do not produce any message in the chatter
      
      Steps to reproduce:
      1. Install Sales and Studio
      2. Open any quotation
      3. Trigger Studio and add a signature field to the form
      4. With debug mode enabled, edit the field (by clicking on MORE when the
         field is selected) and set the Enable Ordered Tracking to 1
      5. Close Studio
      6. Edit the signature and save
      7. No message appears in the chatter to track the value
      
      Solution:
      Remove the `tracking` field from binary fields to prevent the user from
      trying to track it
      
      Problem:
      We shouldn't track binary data in the chatter and we cannot use the
      filenames
      
      opw-3055108
      task-3255810
      
      closes odoo/odoo#117821
      
      Signed-off-by: default avatarGuillaume Merlin (megu) <megu@odoo.com>
      8506b9d6
    • Xavier-Do's avatar
      [FIX] tests: check test tags *_install · c4e6f090
      Xavier-Do authored
      
      Making a test post_install using @tagged should always remove the
      at_install tag.
      
      The main reason for that is that runbot split config select if an
      at_install or post_install tests should be executed is using negation:
      `--test-tags -post_install`. The reason for that is that giving a positive tag will
      replace the "standard" tag and non standard tag could be executed if
      giving `--test-tags at_install` (without negation)
      
      Since runbot tests in parallel builds, one of them using
      `--test-tags -post_install` and the other `--test-tags -at_install`,
      a test that is both post install and at install wont be executed at all.
      
      Also, a tests with both tags will be executed twice
      in a normal flow, usually not intended.
      
      The correct way to make a test post_install is to use
      
      @tagged('post_install', '-at_install')
      
      closes odoo/odoo#118042
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      c4e6f090
    • Mahamadasif Ansari's avatar
      [FIX] web_unsplash: accept premium image URL · 1852571a
      Mahamadasif Ansari authored
      "ERROR: Unknown Unsplash URL!" is generated when we try to add premium
      Unsplash images. This is because when we add the unsplash image, it accepts the
      image whose URL starts with "https://images.unsplash.com/" but the premium
      image URL starts with "https://plus.unsplash.com/
      
      ".
      
      This commit solves the above issue by checking that the premium splash
      image link starts with the correct format.
      
      sentry-4075507166
      
      closes odoo/odoo#118147
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      1852571a
    • niyasraphy's avatar
      [FIX] stock: remove quick_add from picking calendar view · c06f88c2
      niyasraphy authored
      
      before this commit, on clicking the picking calendar view, it allows the quick adding from the calendar view and entered value is going to the name field of stock.picking model.
      
      after this commit, quick adding will be disabled and on clicking form will be opened with selected date.
      
      closes odoo/odoo#112605
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      c06f88c2
    • kir-odoo's avatar
      [FIX] delivery: exclude neg qtys from shipping weight · 4f5cfbd9
      kir-odoo authored
      
      This commit prevents inclusion of negative qty SO products from
      the calculation of its estimated shipping weight. Negative qtys can
      indicate a return, which would be a separate picking from the delivery
       => we shouldn't subtract their weight from the delivery. This
      subtraction, may have resulted in shipping rates being calculated as
      lower than they should have been within the SO.
      
      Additionally fixes the following use case (requires Fedex connector):
      - create a SO with 2 products with the same weight
      - set 1st product qty = 1
      - set 2nd product qty = -1
      - add shipping => Shipping Method = Fedex US
      - click on "Get Rate"
      
      An error will occur because the SO._get_estimated_weight() = 0, and
      you cannot have a rate for weight = 0
      
      TaskId - 3028023
      
      closes odoo/odoo#104658
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      4f5cfbd9
    • niyasraphy's avatar
      [FIX] gamification: copy False for user karma · b1be3262
      niyasraphy authored
      
      before this commit, while duplicating an user,
      karma points is also getting copied to newly
      created user
      
      after this commit, the copying of karma on
      duplicating an user will be stopped.
      
      closes odoo/odoo#118155
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      b1be3262
  11. Apr 09, 2023
  12. Apr 07, 2023
    • Denis Ledoux's avatar
      [IMP] core: models `__repr__` should show when ids is wrong · ca263767
      Denis Ledoux authored
      
      As a developer,
      when you craft your records set manually,
      and wrongly use the API and set something weird in `ids`,
      something else than a tuple of integers,
      `repr` should help you to understand you did something wrong.
      
      e.g.
      
      before
      ```py
      In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar')
      Out[1]: res.partner(1,)
      ```
      
      after
      ```py
      In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar')
      Out[1]: res.partner'(1,)'
      ```
      
      We could put an assert in `_browse` to make sure `ids`
      is a tuple of integers, but this is considered a non-stable
      change, as it will suddenly crashes when you will update
      Odoo while it wasn't the case before.
      
      closes odoo/odoo#118076
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      ca263767
Loading