Skip to content
Snippets Groups Projects
  1. Apr 13, 2023
    • 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
  2. 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
  3. 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
  4. Apr 09, 2023
  5. 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
    • niyasraphy's avatar
      [FIX] website_profile: remove duplicated import in init · 3496c25b
      niyasraphy authored
      
      before this commit, the controllers directory is
      imported twice in the init file.
      
      after this commit, the duplicated import is
      removed.
      
      closes odoo/odoo#118069
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      3496c25b
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: allow importing any bis3 related format · b999489d
      Julien Van Roy authored
      
      After 863fa450, the UBLVersionId node
      was removed from the Bis 3 and its inheriting formats.
      
      Thus, the fonction infering the format from an xml etree needed to be
      apdated too, since we can no longer rely on the `UBLVersionID` node for
      UBL Bis 3 and its inheriting formats. The `CustomizationID` node is
      used.
      
      closes odoo/odoo#118043
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      b999489d
    • Florent de Labarre's avatar
      [FIX] website_sale : wrong amount is display · ad01728c
      Florent de Labarre authored
      
      In case of the amount of the transaction is not the same of the order. A customer can be a misunderstanding between the amount paid with the acquirer and the amount show in the confirmation page.
      
      closes odoo/odoo#117869
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      ad01728c
    • Renaud Thiry's avatar
      [IMP] base: Clear precommits on test cleanup · 4d2fdbab
      Renaud Thiry authored
      
      Precommit hooks would stock data until a call to ``cr.flush`` was made.
      Notably, this happens when the ``assertRaises`` method is called.
      Functions were applied on records already cleared from the cache.
      
      This change adds a cleanup call for `SavepointCase` as it keeps
      the same cursor for all tests. Cursor precommits can now
      be safely executed inside tests.
      
      Task-2834304
      
      closes odoo/odoo#117555
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4d2fdbab
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] web: remove leading 0 in filters float field · 2d24921d
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      - Install Sales as an example.
      - Go to Products, and try to filter them by Sales Price.
      - You have 0.0 as default value, now try to remove it and put 5.
      
      Issue: We can't delete the leading 0 even though the filter is still
      working as expected.
      
      Solution: Changed the `t-on-input` to match `t-on-change` as this is
      what we use in future versions, like 15.0.
      
      opw-3131261
      
      closes odoo/odoo#114837
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      2d24921d
  6. Apr 06, 2023
  7. Apr 05, 2023
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: UBLVersionID should not be present for Bis 3 · 863fa450
      Julien Van Roy authored
      
      Tag UBLVersionID should not be present for UBL Bis 3 and its inheriting
      formats.
      
      opw-3249153
      
      closes odoo/odoo#117792
      
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      863fa450
    • aliya's avatar
      [FIX] l10n_lu: add missing translations · 546f2777
      aliya authored
      
      Recently the tax report was updated with new tax report lines, but translations weren't added.
      This commit adds translations in FR, DE.
      
      task-3264626
      
      closes odoo/odoo#117790
      
      Related: odoo/enterprise#39373
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      546f2777
    • Kamen Zhekov's avatar
      [FIX] web_editor, website: fix website editor as restricted editor · bbf4e333
      Kamen Zhekov authored
      
      When assigned the role of restricted editor, there are many ways to
      break the web_editor when trying to do actions that should be
      unavailable. There is a traceback for the following scenarios under
      some circumstances (mainly because of pages without editable areas or
      features without the proper access rights):
      
      - Drag and dropping snippet when Restricted Editor.
      - Clicking on product when Restricted Editor in /shop.
      - Clicking on product image on specific product page.
      - Clicking on user name (e.g. Marc Demo).
      - Clicking on menu items or logo.
      - Clicking on a blog's image in /blog.
      - Clicking on a blog's image on specific blog page.
      - Clicking on calendar's image in /calendar.
      
      There is now no longer a traceback which makes the editor crash or
      freeze. This mimics the behavior in other cases where the editor does
      not show a traceback, but there is no message indicating that the action
      is unauthorized.
      
      When accessing a menu that cannot be edited, the "Edit the menu" button
      is not shown to the restricted editor.
      
      task-2747895
      opw-3164176
      
      closes odoo/odoo#76900
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Co-authored-by: default avatarBenjamin Vray <bvr@odoo.com>
      Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
      bbf4e333
    • niyasraphy's avatar
      [FIX] stock_landed_costs: missing required account on invoice line · 66ea264f
      niyasraphy authored
      
      before this commit, on creating a vendor bill with
      landed cost product, is not allowing to save the bill,
      it shows the exception that missing required account
      on accountable invoice line.
      
      steps to reproduce:
      
      * create a product category with inventory
      valuation set as Manual
      * create a landed cost product using above category
      * enable anglo saxon accounting in accounting settings
      * create a vendor bill with this product and click save
      * exception is shown: missing required account
      on accountable invoice line
      
      after this commit, the exception wont be shown
      
      closes odoo/odoo#117474
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      66ea264f
    • payen000's avatar
      [CLA] Update Vauxoo's Contributor CLA · 6c4f0b08
      payen000 authored
      
      closes odoo/odoo#117727
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      6c4f0b08
  8. Apr 04, 2023
  9. Apr 03, 2023
  10. Feb 27, 2023
  11. Apr 01, 2023
  12. Mar 31, 2023
Loading