Skip to content
Snippets Groups Projects
  1. Sep 21, 2023
    • Robin Lejeune (role)'s avatar
      [FIX] website_crm: fix access error for users without CRM rights · 5ba09c2c
      Robin Lejeune (role) authored
      1. Backport of [1].
      2. Steps to reproduce:
      - Install website_crm
      - Connect as Admin and remove the sales rights for Demo
      - Check the website on a private window (to create an anonymous visit)
      - Connect as Demo on the normal window
      - Go to Website > Reporting > Visitors
      => It triggers an access error due to lead_ids being restricted to
      sales_team.group_sale_salesman.
      (Note: the error sometimes isn't triggered at that point. In that case,
      click on the visitor: the same error will trigger.)
      
      Considering the computed field doesn't do anything critical as it just
      retrieves the email and phone number, the restriction is overridden on
      the field.
      
      [1]: https://github.com/odoo/odoo/commit/7de453477d7c23e607a15e0d60613080857e3371
      
      
      
      opw-3475301
      
      closes odoo/odoo#135991
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5ba09c2c
    • erl-odoo's avatar
      [IMP] core: ease testing upgrade scripts in custom modules · e8683726
      erl-odoo authored
      
      Upgrade (aka migration) scripts are a core part of Odoo, allowing
      database manipulations for modules during version changes.
      
      Any module, including custom ones can run upgrade scripts, even if the
      `--upgrade-path` flag (and with it, the `odoo.upgrade` sub-module) is
      not present. Currently only the "standard" modules benefit of easy
      upgrade script testing. Any custom modules that want to run tests of
      their upgrades have to import the tests in the usual `tests` folder,
      which is not ideal.
      
      Therefore, to allow TDD and programmatic testing of upgrade scripts in
      custom modules, the test discovery is here modified to also parse the
      module's `migrations` and `upgrades` sub-modules for tests.
      
      closes odoo/odoo#136130
      
      X-original-commit: 483cc20b
      Signed-off-by: default avatarChristophe Simonis (chs) <chs@odoo.com>
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      e8683726
    • Leloup Loïc (lole)'s avatar
      [FIX] mail : speed systray_get_activities · bba39fa8
      Leloup Loïc (lole) authored
      When the number of mail.activities for a user was getting too big, the whole database is getting slowed down as the activities are recomputed each time a page is loaded.
      
      The issue was mostly brought by commit [03c3d440](https://github.com/odoo/odoo/commit/03c3d440ae31baa0400b7adba7f6373556ff5c38
      
      ).
      
      The time was recorded when refreshing the home page of the site.
      
      |     |     |     |
      | --- | --- | --- |
      | #activities | before PR | after PR |
      | 100 000 on 1 model | 22.66s (single test) | 0.408s (worst of few runs) |
      | 40 on 40 models | 0.06s worst, 0.037s best | 0.053s (worst of few) (0.038s best) |
      
      closes odoo/odoo#134126
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      bba39fa8
    • Mathieu Walravens's avatar
      [FIX] product_expiry: send alert activity to the correct user · dacfa844
      Mathieu Walravens authored
      
      Steps to reproduce:
      1. Have 2 companies, and select the one w/ the highest ID
      2. Create a new product tracked by lot + expiration date
      3. Receive product
      4. Set the received lot's expiration and alert dates in the past
      5. Inventory > Operations > Run scheduler
      
      Before this commit:
      An activity is created on the lot for OdooBot,
      despite the product's responsible set to the current user.
      It happens because the default value for `responsible_id` is the current
      user, but the value is only set for the current company. When the
      scheduler runs, it doesn't set the company; therefore, it takes the
      product's responsible user for the company with the lowest ID, which is
      not set.
      
      After this commit:
      The activity is created for the product's responsible user using
      the lot's company.
      
      opw-3489340
      
      closes odoo/odoo#135361
      
      Signed-off-by: default avatarTiffany Chang (tic) <tic@odoo.com>
      dacfa844
  2. Sep 20, 2023
    • Laurent Smet's avatar
      [FIX] account: Allow custom tax tags on misc journal entry · 1cad85f7
      Laurent Smet authored
      
      - Create a move
      - Add a line and set a custom tax tag on it
      - Add a new line to balance the move
      => The tax tag is gone.
      
      This is because the code is recomputing taxes when adding a new line.
      
      closes odoo/odoo#135756
      
      Opw: 3487465
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      1cad85f7
    • Mathieu Walravens's avatar
      [FIX] stock_account: correct accounts for dropship return · 30de83a5
      Mathieu Walravens authored
      
      Before this commit:
      When returning a dropshipping, the valuation layers created do not have
      the correct accounts on it:
       - Valuation -> Input   for the first SVL
       - Output -> Valuation  for the second SVL
      
      After this commit:
      For a dropshipped move, valuation layers have the following chain
      of accounts:
       - Input -> Valuation   for the first SVL
       - Valuation -> Output  for the second SVL
      Therefore, the return should have it reversed:
       - Output -> Valuation  for the first SVL
       - Valuation -> Input   for the second SVL
      
      Steps to reproduce:
      1. Create a dropship product with automated inventory valuation
      2. Create a Sales Order, go on the PO and confirm it
      3. Set quantities and validate dropshipping
      4. Return delivered product (dropship return)
      
      opw-3391174
      
      closes odoo/odoo#132864
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      30de83a5
    • Huy Lee's avatar
      [FIX] website: cannot navigate to anchor link · f5fca171
      Huy Lee authored
      After commit [1], the check that the target url is different from
      the current page's url has been removed thus leading to error that anchor
      link always scroll down to element that have data-anchor enabled.
      
      Steps to reproduce (the easiest way):
      - Install Website Blog
      - Turn on customize comment on post
      - Go incognito then access any blog post, scroll down and click the
      `Sign in to leave a comment` button
      - Holy, the page scrolls down to the discussion section but doesn't go
      to the login page
      
      [1]: https://github.com/odoo/odoo/commit/fb087dbec96f5e533d1fdd9c2b0c2e00296c83de
      
      
      
      closes odoo/odoo#135620
      
      Signed-off-by: default avatarBenjamin Vray (bvr) <bvr@odoo.com>
      f5fca171
  3. Sep 19, 2023
  4. Sep 18, 2023
  5. Sep 17, 2023
  6. Sep 15, 2023
    • Levi Siuzdak (sile)'s avatar
      [FIX] *: update pot files to allow translation of option values · b95770a5
      Levi Siuzdak (sile) authored
      
      Versions:
      ---------
      - 14.0
      - 15.0
      
      Steps to reproduce:
      -------------------
      1. create an eCommerce site;
      2. add another language;
      3. visit site using any language other than English;
      4. add product to cart;
      5. go to checkout until you can change address.
      
      Issue:
      ------
      In the country and state/province selectors, the default values are not translated.
      
      Cause:
      ------
      Their `msgid` strings in the .pot files don't include the option tags that were introduced in 57d7e75b.
      
      Solution:
      ---------
      Add option tags to the `msgid` strings.
      
      opw-3455492
      
      closes odoo/odoo#133750
      
      Signed-off-by: default avatarLevi Siuzdak (sile) <sile@odoo.com>
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      b95770a5
    • Claire Bretton (clbr)'s avatar
      [FIX] account: fix self.id.origin in get_last_sequence() · 7b58a288
      Claire Bretton (clbr) authored
      
      When trying to customize Swiss invoice report with QR-Bill
      through Studio an error was thrown because it tries to _compute_name()
      on a dummy 'account.move' record with self.id=0.
      
      This is part of a more general task in master around report customization
      but it make sense to backport the fix in all stable versions.
      
      task-id:3492033
      
      closes odoo/odoo#135367
      
      Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
      7b58a288
    • Karnav Sojitra's avatar
      [FIX] tools: raise validation error while invalid expression · 58e463e7
      Karnav Sojitra authored
      
      When the user tries to modify the view with an invalid xpath expression,
      an XPathSyntaxError traceback will appear.
      
      Steps to produce:
      1. Install the Accounting module.
      2. Settings > Technical > UI > Views > Open any view
      3. Invalidate expr syntax and try to save, thus an error will be generated.
      
      Error: XPathSyntaxError: Invalid expression
      
      This commit handles XPathSyntaxError by raising ValidationError
      instead of a traceback.
      
      sentry-4377014622
      
      closes odoo/odoo#131673
      
      Signed-off-by: default avatarAchraf Ben Azzouz (abz) <abz@odoo.com>
      58e463e7
  7. Sep 14, 2023
  8. Sep 12, 2023
  9. Sep 11, 2023
  10. Aug 29, 2023
  11. Sep 10, 2023
  12. Sep 08, 2023
    • miad-odoo's avatar
      [FIX] mass_mailing: fix finding duplicate mails · dc0ccc19
      miad-odoo authored
      
      Before the commit, the _get_seen_list() function in the mass_mailing module was
      not able to correctly identify all the duplicate email addresses in a given mass
      mailing. This was because the function chose and used only one way to find an
      email address for each record in the mailing list, even though there are many
      ways to find an email address for a record.
      
      For example, a crm.lead record might have an email address in its partner_id
      field, but it might also have an email address in its email_normalized field.
      This can vary from record to record.
      
      To fix this issue, the _get_seen_list() function was updated to only look at the
      email address to which emails have already been sent, rather than trying to
      fetch it from the record itself. This ensures that all duplicate emails are
      correctly identified and that no duplicate emails are sent in the mass mailing.
      
      Task-3234378
      
      closes odoo/odoo#118220
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      dc0ccc19
    • Maximilien (malb)'s avatar
      [FIX] l10n_de: din5008 · c120d138
      Maximilien (malb) authored
      During this pr (https://github.com/odoo/odoo/pull/121413
      
      ), we have made a few
      css changes on the din5008 format, some of them needed to be revert because they
       broke the layout.
      
      closes odoo/odoo#134775
      
      Task: 3495712
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      c120d138
    • Richard deMeester's avatar
      [FIX] stock: change UOM on product block - multi company · 42674464
      Richard deMeester authored
      
      There is code to block the UOM changing if there are done moves.
      
      Because it searches in non-sudo mode, it does NOT currently
      stop you changing the UOM if the product has moves in a different
      company.
      
      closes odoo/odoo#133895
      
      Signed-off-by: default avatarTiffany Chang (tic) <tic@odoo.com>
      42674464
    • Francesco Ballerini's avatar
      [FIX] mrp: fix typo in mrp_immediate_production_views · 80e8222f
      Francesco Ballerini authored
      
      Typo error detected on `/mrp/wizard/mrp_immediate_production_views.xml`.
      It doesn't cause any issue on module installation or updates, but
      it's probably gonna cause issue on view inheritance.
      
      If you can confirm this is unintended typo I will edit commit msg.
      I also detected this on version 15.0 and 16.0.
      
      closes odoo/odoo#134070
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      80e8222f
  13. Sep 07, 2023
  14. Sep 06, 2023
  15. Sep 05, 2023
    • Pratik Awasthi's avatar
      [FIX] portal: set right color on text ellipsis when `a` tag is used in `td` · b28459dd
      Pratik Awasthi authored
      
      Before this commit, when `a` tag is in a td, the color of text ellipsis
      (3 dots) is different than the text because the text-ellipsis is set on
      the parent element, that is `td` element and the color is set on the `a`.
      
      This commit sets the right color on td element when that element has `a`
      element.
      
      Limitation (only for td inside element with `o_portal_my_doc_table` class):
      if the `td` element contains `a` tag and another element
      then the color has to be set to that other html element otherwise,
      the color will be the one of the a tag.
      
      task-3251721
      
      closes odoo/odoo#124447
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      b28459dd
    • Jinjiu Liu's avatar
      [FIX] website_sale: add conditions to make sure partner's name exists · 38ca3917
      Jinjiu Liu authored
      Reproduction:
      1. Install Event, Sales, Website, Contacts
      2. Login as Admin, create a new portal user 123, set the password as 123
      3. Go to Contacts, find the created user, add a shipping address, leave
      the name blank
      4. Open another tab login as the portal user, place an order
      5. At the Address step, Edit the billing address, change the name from
      empty to “Test Name”, click next
      5. An error is thrown cause the new name is not equal to empty value
      
      Fix: this fix aimed the conditions we have in the previous PR: https://github.com/odoo/odoo/pull/111708
      This change will allow the user to add a name for shipping address at
      checkout.Without the fix, if you
      change the name of a shipping address, it won’t be able to get through.
      This is because of how we manage the shipping address, e.g. shipping
      address is managed as child partners. For shipping address, the check
      can_edit_vat is always false. See here: https://github.com/odoo/odoo/blob/14.0/addons/portal/models/res_partner.py
      Another check, e.g. if shipping is being edited, is added to make sure
      name/email can be changed for delivery address. For internal user, the
      editing of shipping address is not blocked because of the `share` check.
      But the same condition is used to ensure the consistency in case we
      change how the shipping address is managed in the future.
      
      Note: if the data is '' for name for example, the pre-process will
      convert it to `False`. Thus the edge case that `'' != False` doen't
      exist anymore
      
      Related PR: https://github.com/odoo/odoo/pull/111708
      
      
      
      opw-3126325
      
      closes odoo/odoo#128146
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      38ca3917
    • Arnaud Joset's avatar
      [FIX] base_geolocalize: allow to override user agent with system parameter · 160e8bfb
      Arnaud Joset authored
      Before this commit, the useragent was harcoded as an Odoo one and if it was
      blacklisted by the osmfoundation policy https://operations.osmfoundation.org/policies/nominatim/
      
      
      all Odoo instances were forbidden to access the service.
      
      This parameter allows to override the user agent with a system parameter.
      
      closes odoo/odoo#134131
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      160e8bfb
    • Preksha Chouhan's avatar
      [FIX] web: return updated list of fields in export template · 814fb43e
      Preksha Chouhan authored
      When user access template at the time of export with deleted field.
      The traceback will be generated.
      
      To reproduce the issue(any model, here- 'account.move.line'):
      
      - Install 'account_accountant' module
      - Go to Settings > Technical > Database Structure > Fields
      - Create a new field with model as 'Journal Item' and save
      - Go to Accounting > Miscellaneous > Journal Items
      - Select any record in list view and click on export and generate a new export
      template with newly created field
      - Go to 'ir.model.fields' and delete that field
      - Go to 'Journal Items' and select that template while export
      
      Error: A traceback appears: KeyError: 'tax_audit'
      
      When a field gets deleted from 'ir.model.fields' but it does not get deleted
      from export template. And selecting that template to export the records will
      lead to traceback.
      
      See -
      https://github.com/odoo/odoo/blob/59669e9943158e51dcbb9ae69ad758df8f7c7976/addons/web/controllers/main.py#L1815-L1818
      
      
      
      sentry-4331986723
      
      closes odoo/odoo#129567
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      814fb43e
    • Yann Papouin's avatar
      [FIX] sale_timesheet: Invalid `read_group` usage · d805521d
      Yann Papouin authored
      
      `read_group` signature is not respected: the offset integer param is filled with a list
      
      closes odoo/odoo#134002
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      d805521d
Loading