Skip to content
Snippets Groups Projects
  1. Oct 03, 2023
  2. Oct 02, 2023
    • Thomas Becquevort (thbe)'s avatar
      [IMP] base_vat: Allow T as country code for JP companies Tax ID · aa1a06a4
      Thomas Becquevort (thbe) authored
      
      Description of the issue/feature this commit addresses:
      
      As of the first October 2023, some Japanese companies will start using "T" as
      country code in their Tax ID. The current vat check only allows the country
      code to be used in the Tax ID which means that "T" is refused.
      
      Desired behavior after the commit is merged :
      
      This commit makes it possible for Japanese companies to use "T" as a
      country code in their Tax ID.
      
      task-3515786
      
      closes odoo/odoo#136146
      
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      aa1a06a4
    • Xavier ALT's avatar
      [FIX] auth_password_policy: keep current policy on update · c2725791
      Xavier ALT authored
      
      On update/upgrade we should keep current password policy if its
      already set
      
      closes odoo/odoo#137228
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      c2725791
    • Carmen Bianca BAKKER's avatar
      [FIX] base: Prevent singleton ValueError on res.partner's barcode · 38ba033c
      Carmen Bianca BAKKER authored
      
      Fixed the string en passant.
      
      closes odoo/odoo#137142
      
      Signed-off-by: default avatarCarmen Bianca BAKKER <carmen@coopiteasy.be>
      Signed-off-by: default avatarRémy Voet (ryv) <ryv@odoo.com>
      38ba033c
    • Xavier Morel's avatar
      [FIX] core: make model decorators work better with decorator 5 · e3f15318
      Xavier Morel authored
      
      Decorator 5 changed the default decoration method from a transparent
      exec-ing to wrapper functions. This makes the decorators visible to
      the profiler, and breaks one of the profiler tests as the stack traces
      now differ between using decorator 4 and decorator 5. Amongst other
      concerns, this is an issue because debian bookworm has updated
      decorator to 5 (.1.1), and the next ubuntu LTS (which should be 24.04
      hopefully codenamed Nefarious Nematode) will do the same (Ubuntu has
      been providing decorator 5 since 23.04).
      
      5.1 added a `decoratorx` function which corresponds to the old
      exec-based `decorator`, however it doesn't have a `decorate`
      version. So we have to flag the wrappers, instead of decorate-ing the
      original method with them. This seems to have the same semantics so
      why we were using `decorate` is not entirely clear why we were not
      doing that previously (neither
      b1e83fd7 nor #25383 really provide
      explanations). Possibly because pylint is a dum-dum and requires
      ignoring one of its rules?
      
      Implement in 14 since it doesn't hurt even though the test in question
      does not exist yet.
      
      closes odoo/odoo#137096
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      e3f15318
  3. Oct 01, 2023
  4. Sep 29, 2023
    • Saurabh Mishra's avatar
      [FIX] stock: filter invalid input from domain · 9500dc0c
      Saurabh Mishra authored
      When the user tries to find the 'qty_available' of a product but gives
      a string value instead of a float value in domain then the user will face error.
      
      Steps to produce:
      - Install `stocks`.
      - Create a record rule for model `product.template`. In the domain of record
        rule keep [('qty_available', '<', '10')] as a domain,
        you can give any integral value in the domain but that value should be
        enterred as strings (with quotes).
      - Inventory > Products > Products
      
      Error: `TypeError: '<' not supported between instances of 'str' and 'float' `
      
      After applying our commit, if the domain is Invalid then the user will face
      `UserError`. There is a function named `_search_product_quantity`  which
      initially checks if the domain is valid or not :
      https://github.com/odoo/odoo/blob/5f1ad0c1e4c1e8ed41337ccd4c12e70c9c760c85/addons/stock/models/product.py#L342-L350
      
      
      It will filter out all the invalid domain and clear search methods.
      So now whenever `_search_qty_available` is called first the validity of domain
      and operands of the expression will be checked.
      
      sentry-4399815131
      
      closes odoo/odoo#133155
      
      Signed-off-by: default avatarTiffany Chang (tic) <tic@odoo.com>
      9500dc0c
    • Xavier Morel's avatar
      [REM] website_event_track: pwa registration success log · 4461d90e
      Xavier Morel authored
      
      Not very useful to the average user, and can fill up logs during
      tests (mostly 16.1 onwards for some reason but might as well square
      up everything).
      
      closes odoo/odoo#136944
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      4461d90e
  5. Sep 28, 2023
    • Nshimiyimana Séna's avatar
      [FIX] core: ensure floats are rounded when they're put in cache · 84e23047
      Nshimiyimana Séna authored
      
      Summary
      -------
      Currently, floats are not always properly rounded when they are used in
      computes or onchanges.
      
      Steps to reproduce
      ------------------
      1. Set Product Price decimal accuracy to 2.
      2. Create an invoice.
      3. Add a line: quantity 2, price 1.205.
      Expected Result: Subtotal of 2.42 (using `2 * round(1.205)`).
      Actual Result: Subtotal of 2.41 (using `2 * 1.205`).
      
      Fix
      ---
      Always round floats when they are put in cache.
      
      Partial backport of 4c5cdf5f
      opw-3333449
      
      closes odoo/odoo#131906
      
      Related: odoo/enterprise#47980
      Signed-off-by: default avatarSéna Serge Nshimiyimana (sesn) <sesn@odoo.com>
      84e23047
    • Abdelouahab (abla)'s avatar
      [FIX] sms: use partners on record to send sms · 6e6a8c24
      Abdelouahab (abla) authored
      
      To reproduce
      ============
      - create sms template and apply it to a module different than `res.partner`
      for example Tasks
      - add context action
      - create a task and select a customer that has a phone number
      - from action try to send the sms, an error is displayed
      
      Problem
      =======
      when computing the receipient info, the partner on the record is not taken
      into account.
      
      opw-3475456
      
      closes odoo/odoo#134682
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      6e6a8c24
  6. Sep 27, 2023
  7. Sep 26, 2023
  8. Sep 25, 2023
    • Mayurrajsinh Rathod's avatar
      [FIX] website_slides: prevent content title overflow · febb7989
      Mayurrajsinh Rathod authored
      
      This commit resolves the issue of content title overflow in both fullscreen
      and non-fullscreen views by cropping the title and adding '...' at the end.
      
      Task-3384661
      
      closes odoo/odoo#128713
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      febb7989
    • MerlinGuillaume's avatar
      [FIX] l10n_it_edi: create 0% EU tax with correct exoneration values · f6b386c3
      MerlinGuillaume authored
      
      When creating a new company with the italian fiscal localization, the
      tax "0% EU" is not instanciated properly
      
      Steps to reproduce:
      1. Install Accounting and module l10n_it_edi
      2. Create a new company and select it
      3. Go to Settings > Accounting > Fiscal Localization, set it to `Italy -
         Generic Chart of Accounts` and save
      4. Go to Accounting > Configuration > Taxes and open tax "0% EU"
      5. The fields for the italian exoneration are not properly set, they
         should have the same values as the same tax for company "IT Company"
         of the demo data
      
      Solution:
      When we set the company chart template, update tax "0% EU" with the
      correct values
      
      opw-3414593
      
      closes odoo/odoo#131996
      
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      f6b386c3
  9. Aug 28, 2023
  10. Sep 24, 2023
  11. Sep 22, 2023
    • Maximilien (malb)'s avatar
      [FIX] l10n_de: din5008 · 96b09395
      Maximilien (malb) authored
      In the din5008, there has been problem in the display of the paper format either
      in the pdf or the preview.
      
      In the preview we had a part of the page on the right that wasn't used caused by
      the negative margin and the width of 180mm. But by removing that the pdf is
      broken, the header is hiding some information.
      
      To deal with that, we will add the width and negative margin only for the pdf
      by adding a conditional css classes.
      
      Also,it seems the footer with the company details can go out of page, by adding
      a text-wrap on it, it solves this issue.
      
      (In this commit, we override part of those commit:
      https://github.com/odoo/odoo/commit/481f442f4ef176072edf3261415dbb06f8a3bc6f
      https://github.com/odoo/odoo/commit/f7812ae848e0a79adcd11f936f6cd7890da00112
      
      )
      
      closes odoo/odoo#136257
      
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      96b09395
    • alsh-odoo's avatar
      [FIX] hr_expense: raise exception if multiple company records selected · 883c03a0
      alsh-odoo authored
      This traceback arises when the user selects multi
      company records and click on the 'create report' button.
      
      To reproduce this issue:
      
      1) Install 'hr_expense'
      2) Create a new company for example 'test'
      3) Enable the 'test' company on the right corner
      4) Now open 'employees' and change the company of the current user(Mitchel Admin)
         to the 'test'.
      5) Open 'Expenses', create a new record, and change the company to 'test'.
      6) Fill the required field values and save the record.
      7) Now click 'My Expenses/My Expenses to report' and select all the records (Make sure
         'My Expenses' filter is applied)
      8) Click on the 'Create Record' button
      
      Error:- "ValueError: Expected singleton: res.company(2, 1)"
      
      On the '_create_sheet_from_expenses' method, the value of 'company_id' is getting
      through 'self.company_id.id'.
      See:-
      https://github.com/odoo/odoo/blob/f910987cb4af84c1e7afabf67f05d4eebc31e765/addons/hr_expense/models/hr_expense.py#L324-L335
      
      
      
      But when user selects multi company recordsets
      'self.company_id' has multi recordsets.
      
      When 'company_id' is getting value through 'self.company_id.id', because of
      'self.company_id' has multiple records, which leads
      to the above traceback.
      
      By applying this commit will resolve the issue by raising an exception,
      when user selected multi company records to create report.
      
      sentry-4465422743
      
      closes odoo/odoo#135035
      
      Signed-off-by: default avatarde Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
      883c03a0
  12. Sep 21, 2023
    • Mayurrajsinh Rathod's avatar
      [FIX] event: prevent scheduled communication for inactive events · 10c4091f
      Mayurrajsinh Rathod authored
      
      Prior this commit:
      The mail scheduler of the event notifies the attendees even when the event is
      no longer active.
      
      After this commit:
      Inactive events no longer notify attendees.
      
      Task-3381876
      
      closes odoo/odoo#130237
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      10c4091f
    • 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
  13. 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
  14. Sep 19, 2023
  15. Sep 18, 2023
  16. Sep 17, 2023
Loading