Skip to content
Snippets Groups Projects
  1. Sep 19, 2023
    • Djamel Touati's avatar
      [FIX] stock: no tracking for service product · d3808a5d
      Djamel Touati authored
      
      Steps to reproduce the bug:
      - Create a storable “P1”:
         - tracking= serial
         - save
      - Change the type of product to service
      
      Problem:
      some fields for tracked products are not hidden, because the product
      tracking is not updated.
      
      Solution:
      Convert _onchange_type into compute methods.
      The tracking is updated even if the change type is applied from the
      "product.product" form.
      
      opw-3499976
      
      closes odoo/odoo#135852
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      d3808a5d
    • Julien Van Roy's avatar
      [FIX] l10n_mx: set the 16% taxes as the default · 5d98384e
      Julien Van Roy authored
      
      Set the default sale and purchase taxes for the mexican CoA.
      
      Before introducing the IEPS taxes in commit
      734e18eb, the default taxes were the 16%
      IVA taxes (when loading the CoA, the default is simply the first
      possible match with the lowest sequence). As the IEPS taxes now have the
      lowest sequence, they are incorrectly selected as the defaults. This
      commit fixes this.
      
      task-3507155
      
      closes odoo/odoo#135810
      
      Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
      5d98384e
    • Gaetan Vanden Bergh (gavb)'s avatar
      [FIX] *: assertAlmostEqual parameters identification · 74416a2e
      Gaetan Vanden Bergh (gavb) authored
      
      purchase_stock, point_of_sale, sale_mrp
      
      What are the steps to reproduce your issue?
      When Odoo.sh runs unit tests on a development branch,
      it tests the code in the MRP module for rounding errors.
      
      What is the current behavior that you observe?
      I had a customization that introduced a rounding error in the standard MRP module.
      When the unit tests ran on the development branch, I got a traceback.
      
      What would be your expected behavior in this case?
      The rounding error should be reported as a failed test with a message. No traceback.
      
      opw-3454998
      
      closes odoo/odoo#131418
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      74416a2e
  2. Sep 18, 2023
  3. Sep 17, 2023
  4. 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
  5. Sep 14, 2023
  6. Sep 12, 2023
  7. Sep 11, 2023
  8. Aug 29, 2023
  9. Sep 10, 2023
  10. 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
  11. Sep 07, 2023
  12. Sep 06, 2023
  13. 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
  14. Sep 04, 2023
  15. Jul 12, 2023
  16. Sep 03, 2023
  17. Sep 02, 2023
  18. Sep 01, 2023
    • Xavier Morel's avatar
      [FIX] base: encoding guessing of html module descriptions · 10ad2506
      Xavier Morel authored
      
      I missed a critical issue in #133708: various users had discovered
      they could already fix description issues by adding an XML declaration
      to their document which is very cool (though technically not really
      valid).
      
      What is a lot less cool is that lxml gets *extremely* unhappy when
      asked to parse *strings* with an encoding declaration, raising a
      ValueError, so the purported fix breaks on any module which does that,
      which seems to include a lot of OCA modules.
      
      Gate the encoding guessing by bailing if the document has an XML
      declaration, in which case we just assume the author knows what
      they're doing and we leave them alone. For extra safety, check the
      encoding declaration in ascii and utf16. Could also have checked for
      BOMs, but lxml seems to not care about them overly much (in fact it
      seems to prefer them decoded which is odd).
      
      closes odoo/odoo#133918
      
      Reported-by: @rezak400
      X-original-commit: 51d37560
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      10ad2506
    • Odoo's Mergebot's avatar
      [MERGE] base, (test_)mail, various: be defensive in email formatting · 9aeae36e
      Odoo's Mergebot authored
      
      PURPOSE
      
      Be defensive when dealing with email fields, notably when having multi-emails
      or email field containing an already-formatted email.
      
      RATIONALE
      
      Two main use case of corner case usage of 'email' fields are tested in this PR
      and their support is improved
      
        * formatted emails: `"Full Name" <email@domain.com>` stored into the 'email'
          field;
        * multi emails: `email1@domain.com, email2@domain.com` stored into a single
          'email' field;
      
      IMPLICATION
      
      Email field is generally managed as "containing a valid email". This means
      it is sometimes used as it in 'formataddr' as well as to perform searches or
      identification checks. Example of issue: partner 'Raoul' has a formatted email
      like "Raoul" <raoul@raoul.fr>. Using 'formataddr' in email_from leads to
      
        from: "Raoul" <"Raoul" <raoul@raoul.fr>>
        -> which is incorrect (but often dynamically corrected by email servers);
      
      Email field holding multi-emails are not normalized, as current normalize
      is done only if the field holds a single email. It means
      
        * no easy finding based on 'email_normalized', e.g. various tools like
          '_mail_find_partner_from_emails' or 'find_or_create' do not find partners
          based on this email;
        * no exclusion list management;
        * issue with formatting, like
      
        to: "Raoul" <raoul@raoul.fr,raoul.other@raoul.fr>
        -> which is incorrect (but often dynamically corrected by email servers);
      
      USAGE: OUTGOING EMAILS
      
      Those use cases currently generate faulty outgoing emails. This is valid for
      recipients ('email_cc', 'email_to') as well as author ('email_from').
      
      For formatted emails: `email_to` is formatted again based on name and email
      which leads to sending emails to `"Full Name" <"Other"<email@domain.com>>`.
      
      Note that multi emails without formatting may work as it leads to email_to
      `"Full name" <email1@domain.com,email2@domain.com>`. Some outgoing email
      servers correctly send multiple emails. It depends on their fault
      tolerance.
      
      USAGE: FIND BASED ON EMAIL (NORMALIZED)
      
      When searching for partners (e.g. using '_mail_find_partner_from_emails' or
      'find_or_create') normalized version of input is used.
      
      In case of multi emails sanitize is 'False', as normalization expects a single
      email in the field. Therefore no partner is found. In processes that do a
      "search or create" (e.g. using a template on a record) this leads to creating
      a new partner (or several partners in case of multi emails) each time.
      
      USAGE: OTHER FLOWS
      
      Other flows are build on top of '_mail_find_partner_from_emails' / 'create'
      of outgoing emails and are impacted by formatted email / multi email usage.
      Those include notably
      
        * mass_mailing: '_message_get_default_recipients' should be defensive to
          give correct values when creating mailing emails;
        * mass_mailing: faulty emails is based on normalize and multi-emails are
          considered as faulty and ignored;
        * after post hook: '_message_post_after_hook' tries to link messages without
          author (but email_from) with newly-created partners, when partners are
          created from chatter. It is therefore impacted by those corner cases;
        * marketing_automation: built on top of mass_mailing and suffers from the
          same issues;
      
      USAGE: UNICODE
      
      Unicode in emails should be supported. 'formataddr' and IrMailServer notably
      received fixes to support unicode. Some check performed on email addresses
      fail when unicode is involved, which leads to some emails not being sent
      while they could.
      
      USAGE: WRONG EMAIL FORMATTING
      
      With input 'name email@domain.com' (missing chevrons allowing to clearly spot
      the email part) 'getaddresses' returns ('', 'name email@domain.com) i.e. the
      whole input is considered as being the email.
      
      To improve the heuristic we can add a fallback by recalling 'getadresses'
      on the input with spaces replaced by commas when it found only an email and
      no name. The new email will be split into sub pairs allowing to find the real
      email and various name parts, allowing to make a new name / email pair.
      
      Emails should not contain spaces thus this is coherent with email formation.
      This fallback actually comes from a specific code done in '_parse_partner_name'
      of Partner model. Supporting it directly at tools level make the behavior
      coherent for all models.
      
      SPECIFICATIONS
      
      This PR contains first tests to cover current support of those use cases. Then
      we gradually improve support of multi-emails and formatted emails in various
      layers of mail code, from mail.mail to mass_mailing or email formatting.
      
      See individual commit for more explanation, each of them solving a specific
      issue / use case.
      
      Task-2612945 (Mail: Defensive email formatting)
      
      closes odoo/odoo#74474
      
      Related: odoo/enterprise#41828
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9aeae36e
    • Thibault Delavallée's avatar
      [FIX] mail: correctly parse formatted email in JS · ecb549c9
      Thibault Delavallée authored
      Formatted emails using our own formataddr contains quotes to correctly
      separate name from emails, like'"Name" <email@domain.com'. However
      JS parse function does not correctly handle quotes, assuming everything
      being left of opening chevron is the name.
      
      Task-2612945 (Mail: Defensive email formatting)
      
      Part-of: odoo/odoo#74474
      ecb549c9
    • Thibault Delavallée's avatar
      [FIX] crm: temporarily disable test · fed39b3e
      Thibault Delavallée authored
      It seems the commented test make PLS test crash. Not sure why as tests unit
      tests should not be dependent but PLS is a complicated matter, flushing
      stuff could have an impact on DB state notably.
      
      Until we figure out what happens test that makes the PLS tests crash is
      commented. Crashing assert in PLS is improved to better know which one
      is crashing.
      
      Task-2612945 (Mail: Defensive email formatting)
      
      Part-of: odoo/odoo#74474
      fed39b3e
Loading