Draft
Conversation
…hen sending Peppol invoices Sending a Peppol invoice failed with an access error because the wizard reads `account.edi.document.attachment_id`, which is restricted to system users. Accounting users must be able to access the generated Peppol document linked to the invoice they are sending. Use `sudo()` when fetching the attachment. closes odoo#238157 Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
…tomer VAT It is allowed to create peppol invoices to customers without VAT number (e.g. public sector). Tested with the ecosio validator (BIS Billing 3.0.19) closes odoo#238161 Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Since d0d0fa2 the Windows installer only supports 64 bit version of the OS. It was recently noticed that when uninstalling the app with the provided uninstaller that the app remains listed in the installed sofwtare. Altough the directories and third party apps were correctly cleaned and removed. The reason is that the Odoo app registry key is still present after the uninstall process. When a 32 bit process tries to write a registry key in `HKLM\SOFTWARE` it's redirected by the OS to `HKLM\SOFTWARE\WOW6432Node`. By using the `SetRegView 64` NSIS directive, the installer writes the registry key at the right place ... but the uninstaller is lacking that directive and thus tries to remove an unexisting key in `HKLM\SOFTWARE\WOW6432Node`. With this commit, the uninstaller is fixed by using the directive too. closes odoo#238476 Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Problem --------- When two requests with the same promo code arrive at the same time, The promo code is used several times, although it is set to single use. This is a problem since it bypasses the condition to use the code only. once. The issue arises because the two requests arrive at the same time which triggers two workers to process the data in parallel. Each worker use the same initial data (no promo code is currently used when the requests are received). Solution --------- Add a NOWAIT lock when on the program row when reading the `limit_usage` to trigger a serialization error during the process of the second request to make it retrigger with up-to-date data. task-5343050
When using Ubuntu Jammy, werkzeug is version 2.0.2, which does not yet follow RFC3986. With Ubuntu Noble, werkzeug is version 3.0.1 and has removed url_encode. We now recommend changing to urllib.parse.urlencode which also does not follow RFC3986. RFC3986 is being followed in an inbetween version of werkzeug. We have vendored the code from a version above 2.1.0, which includes the following git pull request: pallets/werkzeug#2320 This parser differential behavior can cause unexpected behavior. Due to our modular system we should preserve the behavior that developers expect. A third-party module should work regardless of differences in the supported OS they choose to use. opw-5172692
Backport ICE number from 18.0 to 16.0: f9d00e6 Reason: The ICE (Identifiant Commun de l'Entreprise) is an identification number assigned to businesses and legal entities for various administrative and legal purposes in Morocco. If the partner has one, it must be indicated on the invoice. The ICE number is supposed to be put on all the invoices made to Moroccan companies, whatever the country of the company issuing those invoices. We hence add that directly into the account module. task-4879950 closes odoo#237068 Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Werkzeug's url_encode does not have consistent behavior between versions, and gives three different result when running Odoo under Ubuntu Jammy, Ubuntu Noble or a virtual environment. After this commit: Use the standard library urllib, which has consistent behavior across versions. opw-5187047
…records RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS If you post a scheduled message on a record and delete it before it is sent, the notifications cron got blocked with `MissingError`. Now, those notifications are simply skipped. Scheduled message is unlinked, but no message is produced. As there is no recovery mean no log is done either, would add useless information. @moduon MT-7276 Task-5138556 Part-of: odoo#233071 Related: odoo/enterprise#101185 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS When a record that inherits from `mail.thread` is deleted by an 'ondelete="cascade"'' SQL constraint, its messages and notifiations are kept in DB. If some of those notifications is in status 'bounce' or 'exception' it will keep being displayed to the user. However, the user won't be able to do anything with it. Actually, if they try to, they'll get an exception. This fix avoids displaying failures related to non-existing records. This clears noise and avoids situations where the user is unable to react to their notifications. COUNTERS This implies additional query counters in various tests, as we add some exists in calls, notably when messages are formated, which happens quite frequently. Those querie are fast as they are just a direct hit to the id field of tables. @moduon MT-7609 OPW-4285691 Task-5138556 Part-of: odoo#233071 Related: odoo/enterprise#101185 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS If there are some activities linked to removed records, those are fetched by systray. However when trying to set them done there is a crash linked to posting a message on an unexisting record. We are now defensively checking records exist. For removed records no message is posted, and attachments are removed while removing the activity. Task-5138556 Part-of: odoo#233071 Related: odoo/enterprise#101185 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS Fix various use case in mail * notifications sent for scheduled messages; * failure notifications management; * activities mark as done; Task-5138556 closes odoo#233071 Related: odoo/enterprise#101185 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Verify that the user is an internal user to avoid unexpected behavior. task-5349128
In rare case when we would like to schedule messages without model a variable is not defined in that scope. closes odoo#238762 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When running tests locally, it's really annoying (and sometimes really jarring / surprising) to hear random beeps and boops from your machine, especially when it's an old timey ringtone from voip. Make it stop. closes odoo#238882 Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Steps to reproduce =============== 1. Enable reCaptcha in Settings and configure keys. 2. Go to an event and click Register. 3. Fill in the form but wait more than 2 minutes. 4. Submit the form ---> An error message is shown. When reCaptcha was enabled on event registrations, the token was being requested too early (during `willStart`). Since a token is only valid for 2 minutes, users who took longer to fill out the registration form encountered an error when submitting. After this commit, the reCaptcha token is requested only on submitting. This way, the token is always valid and the form can be submitted successfully, even after several minutes. Backport of ed691e6 closes odoo#238504 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The parser rules cannot be modified once the parser has been instantiated. task-5091744 closes odoo#239046 Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
When a user gets deleted or archived, his signup token is not correct and should be recomputed and resent if still required. task-5340362
When `lower_logging` encounters a `LogRecord.args: Mapping`, it fucks up and strips out all the values keeping only the mapping keys (as a tuple), which then breaks when trying to format it in `LogRecord.msg`. Fix the issue by moving the entire message munging into, appropriately, the formatter: `getMessage` will do the `str.__mod__` call at which point we don't need to deal with the args at all, then `formatMessage` generates the full message line (not including the stack traces from `exc_info` and `stack_info`, those are added in the second half of `Formatter.format`). https://runbot.odoo.com/odoo/error/234669 closes odoo#239410 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
closes odoo#177614 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit adds the Global Location Number (GLN) to delivery partners, which is required to be reported during eInvoicing. closes odoo#237591 Task: 5237220 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Legacy payment APIs will be discontinued by 31 Dec 2025. Backport Worldline provider to 16.0. - Worldline payment provider was introduced in v18.0 - Worldline has now been backported to version 16.0 and serves as the replacement for Ogone. Affected version-16.0 task-4687593 closes odoo#215758 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
One of the changes in odoo#118332 was to let exceptions bubble up to the interpreter in case of error, to improve the experience while running the script locally. This turns out to have downgraded runbot reporting significantly as it doesn't account for stderr / log tracebacks if it got error-level (and possibly even warning-level) logs during the run. Hopefully get the best of both world (and shorten tracebacks slightly) by restoring `logging.exception` at the script level but triggering an abnormal exit for local CLI utility. closes odoo#239995 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Fixes wrong author on portal users messages. task-5150607
Currently the PDF is not embedded into the XML files sent via Peppol. This commit fixes that. The PDF is embedded into the XML file at the point where the PDF is generated. It (re)uses the existing logic for other account EDI formats. opw-5405357 (among others) closes odoo#240093 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
This commit makes it easier to change the peppol endpoint and eas computations for localizations back-port of: odoo#233160 Task: 5172378 Part-of: odoo#240178 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
This commit improves the UX by displaying more intuitive placeholders for the peppol identifier. The peppol information is also automatically verified when important data changes. It also adds a special case for Belgium in which we try to use the vat number as the peppol identifier with the company registry endpoint. back-port of: odoo#233160 closes odoo#240178 Task: 5172378 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
The \_retrieve \_product() function relies on a query with multiple domains OR'ed together. As the search will require a LEFT JOIN with the product_template table, the use of OR in the query prevents Postgres from utilizing indexes. This becomes a problem in databases with a large number of products since a seq scan would be very slow. This commit changes the way this is done by performing separate queries instead of a single query with multiple conditions within an OR statement. Although this might seem a performance degradation, it actually allows these separate queries to utilize indexes and run much faster compared to the original approach. It also simplifies the priority logic and allows for faster early exits compared to the original one. This function is mainly used with EDI crons (such as PEPPOL where this problem was noticed), which could require hundreds of product searches as it does a search per invoice line. Benchmarks: Importing a peppol document of 173 invoice lines. | Num products | Num invoice lines | Before | After | | ------------ | ----------------- | -------- | ------- | | 864873 | 173 | 868.18 s | 19.43 s | | 397005 | 173 | 468.91 s | 20.68 s | | 8064 | 173 | 125.08 s | 20.1 s | | 564 | 173 | 119.9 s | 20.21 s | opw-5245007 closes odoo#238853 Signed-off-by: Laurent Smet (las) <las@odoo.com>
The current call to `super()._get_proxy_identification()` was incorrect, because the parent method expects a 'company' argument. Steps to reproduce: - Configure an Italian company - Install l10n_it_edi - Attempt to set up Peppol This triggers: TypeError: AccountEdiFormat._get_proxy_identification() missing 1 required positional argument: 'company' The issue occurs following the addition of account_peppol, because before that, no other EDI format existed besides fattura_pa, so the condition in the if clause was never triggered. opw-5405602 closes odoo#240680 Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
Steps to reproduce: - Insert a icon in an empty paragraph. - Remove the inserted icon. - The paragraph becomes unreachable. Cause: - When a paragraph contains only an icon, removing that icon during the delete process does not trigger fillEmpty. As a result, the paragraph ends up with no content, leaving it empty and unreachable. Solution: - During the delete process, after the icon is removed, call the fillEmpty method. This ensures that if the block becomes empty, a <br> is inserted inside the paragraph, keeping it accessible. task-3540454 Part-of: odoo#237891 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to reproduce - Insert an icon in an empty paragraph. - Place the cursor before the icon. - Press Enter. - Nothing happens. Cause - When the cursor is placed before a contenteditable=false element, getDeepRange sets the selection deep inside the non-editable element as a result, when Enter is pressed, the action is ignored because the selection is not in an editable context. Solution - Instead of setting the selection inside getDeepRange, set the selection after calling getDeepRange only if the returned range is not within a contenteditable=false element. task-3540454 closes odoo#237891 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit: the document uploaded by /image cannot be downloaded on clicking. After this commit: we open a popover for document without the editing buttons. The user may download the document by clicking the link. Also the toolbar is hidden for attachments. task-3648796 closes odoo#236705 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
There is a `for invoice in invoices_data.items()` loop. The var `invoices_data` is a dict (account_move -> invoice_data dict). But in the loop body we use the variables `invoice` as account_move and `invoice_data` as dict as if we did `for invoice, invoice_data in ...`. Thus there is a traceback ``` AttributeError: 'tuple' object has no attribute 'peppol_move_state' ``` It can easily be reproduced by setting the timeout in `_make_request` to `0.01`. task-None closes odoo#242196 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Purpose ======= Backport of f1bc565 The new addin has been refactored and doesn't work with older Odoo version, and so we add an endpoint to be able to show a message if we don't support that Odoo version. Task-4727609 closes odoo#238811 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
no-task closes odoo#242771 Signed-off-by: Laurent Smet (las) <las@odoo.com>
Since [this](odoo@24aab53) change, `mail.message.create()` and `.write()` break when self.env.user is None. This can happen when a route with `auth="none"` is used and a similar traceback to the following will be returned: ``` `2026-01-06 09:07:27,903 13 ERROR paas_master odoo.addons.paas_master.controllers.controllers: Failed sync: Expected singleton: res.users() Traceback (most recent call last): File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6269, in ensure_one _id, = self._ids ^^^^ ValueError: not enough values to unpack (expected 1, got 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/src/paas/paas_master/controllers/controllers.py", line 2523, in build_sync request.env.cr.commit() File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 482, in commit self.flush() File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 160, in flush self.precommit.run() File "/home/odoo/src/odoo/18.0/odoo/tools/misc.py", line 1172, in run func() File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 548, in _track_finalize tracking = records.with_context(context)._message_track(fnames, initial_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 661, in _message_track record._message_log( File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 2813, in _message_log return self._message_log_batch( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 2872, in _message_log_batch return self.sudo()._message_create(values_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 2973, in _message_create ).create(create_values_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<decorator-gen-75>", line 2, in create File "/home/odoo/src/odoo/18.0/odoo/api.py", line 498, in _model_create_multi return create(self, arg) ^^^^^^^^^^^^^^^^^ File "/home/odoo/src/paas/paas_master/models/mail.py", line 17, in create return super().create(values_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<decorator-gen-50>", line 2, in create File "/home/odoo/src/odoo/18.0/odoo/api.py", line 498, in _model_create_multi return create(self, arg) ^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_message.py", line 597, in create if not (self.env.user.has_group('base.group_user') or self.env.su): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/18.0/odoo/addons/base/models/res_users.py", line 1200, in has_group self.ensure_one() File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6272, in ensure_one raise ValueError("Expected singleton: %s" % self) ValueError: Expected singleton: res.users() 2026-01-06 09:07:27,920 13 INFO paas_master werkzeug: 192.168.56.106 - - [06/Jan/2026 09:07:27] "POST /paas/build/sync HTTP/1.0" 200 - 22 0.005 0.024 ``` That can be easily tested by calling a custom `auth='none'` route like the following: ``` diff --git a/addons/web/controllers/home.py b/addons/web/controllers/home.py index 6138caf..fc20d9e30ca7 100644 --- a/addons/web/controllers/home.py +++ b/addons/web/controllers/home.py @@ -40,6 +40,11 @@ class Home(http.Controller): def _web_client_readonly(self): return False + @http.route("/auth_none_test", auth="none") + def auth_none_test(self): + import uuid + request.env.ref("base.partner_admin").sudo().name = str(uuid.uuid4()) + # ideally, this route should be `auth="user"` but that don't work in non-monodb mode. @http.route(['/web', '/odoo', '/odoo/<path:subpath>', '/scoped_app/<path:subpath>'], type='http', auth="none", readonly=_web_client_readonly) def web_client(self, s_action=None, **kw): ``` The fix is to reverse the order of the checks because the only use cases we have for a route in `auth="none"` are done in sudo so the condition is escaped before the group check is done on `self.env.user`. task-none
With commit 19302cd, when a page is created, menu entries with a url corresponding to the created page are updated to set their `page_id` to the new page. The update may also be triggered when creating several pages with the same name. This commit updates a menu entry on page creation only if no page were already associated to the menu. Steps to reproduce: - Create a new page, call it "test" (will be available on `/test`) - Create a new page, call it "test" (will be available on `/test-1`) - Go to editor menu - Bug: both entries point to `/test-1` - Create a new page, call it "test" (will be available on `/test-2`) - Go to editor menu - Bug: the first one (and the new one) is pointing now to `/test-2` task-5186653 closes odoo#243312 Signed-off-by: Robin Lejeune (role) <role@odoo.com>
In some rare cases it would seem that some systems construct emails with attachments reporting '*/*' as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as '*/*' are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 closes odoo#242193 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
modules: account, account_peppol, web This commit is a backport of 574a67c This commit allows user to send multiple attachments through peppol. The attachments will be embedded into the xml under the <AdditionalDocumentReference> tag task-5103539 closes odoo#241158 Signed-off-by: Laurent Smet (las) <las@odoo.com>
Issue ----- There is an issue in WebKit with mix-blend-mode https://bugs.webkit.org/show_bug.cgi?id=286619 Because of this issue, in barcode, the user gets a solid white square over the scanning zone, so they don't see the barcode being scanned. ----- Ticket: opw-5386846 closes odoo#243486 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
If a user has the permission to write on 'active', he should not be blocked by the subsequent write done on 'signup_token', 'signup_type' and 'signup_expiration'. This commit makes sure that write is done with the right permissions to avoid an error. task-none
When sending a customer invoice via Peppol, the system creates duplicate attachments (4 instead of 2 expected), cluttering the chatter and the attachment sidebar. This commit: - Implements a search-and-update logic for attachments to ensure idempotency (updates existing instead of creating duplicates). task-5438951 closes odoo#241130 Signed-off-by: Laurent Smet (las) <las@odoo.com>
Reintroduce server-initiated deregistration on `client_gone`, but only for implementations that explicitly handle it. The base proxy client now just raises the error. Peppol opts in by soft-resetting its configuration so users can re-register. See the IAP postmortem for the rationale and incident history. odoo/iap-apps#1317 no-task closes odoo#239254 Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Embedded attachments sent through peppol are not decoded causing a XSD validation error Steps to reproduce the bug: - Create an invoice - In the send & print wizard, select "by peppol" and attach a supported file - Send - Run the scheduled action to update document status - Go in the invoice form and see the error message in the chatter no-task closes odoo#244933 Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
When you send an invoice by peppol with extra attachments, we want to make sure to only embed the extra attachments (not the xml nor the original PDF). To do this, a filter is applied on the attachments, this commit improves the filter to handle translations no-task closes odoo#244994 Signed-off-by: Laurent Smet (las) <las@odoo.com>
A company that happens to be named "Deco Addict" has complained some of our users thought they had business with them due to test and demo data containing that name. It will now be named Acme Corporation. task-5865502 Part-of: odoo#245205 Related: odoo/enterprise#105151 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
There is no point in letting users insert random demo data when they are using their own database. This can lead to confusion down the line. The upload wizard is updated so it will not show the "sample" option when the relevant demo partner is not installed. task-5865502 closes odoo#245205 Related: odoo/enterprise#105151 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
On large databases (millions of account moves), The FEC exported file can be huge. This resulted in memory error since at some point we have the entire file in memory. This commit aims to overcome this issue by streaming the content of the file to the user. task-5404142 closes odoo#240981 Related: odoo/enterprise#102783 Signed-off-by: Ali Alfie (alal) <alal@odoo.com>
We already wrap _PolicyBase.clone() to validate override keys and keep policy objects predictable when composed dynamically. This commit makes policy addition use the same API so incorrect inputs fail earlier, avoiding hard-to-debug issues. task-5871798
ba36c95 to
1b300dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE