Daily updates from Odoo
Navigate
Branch
Monday, July 12, 2021
16 changes
Enhancements to existing features
Empty lists for assets, deferred revenue, and deferred expenses now show clearer guidance when there are no records to display. Deferred expenses also now include sample entries, making the experience more consistent with deferred revenue and easier for users to understand.
Original PR description
Reword the default message for when a tree view is empty for assets, deferred revenue, and deferred expense as well as their respective models. Also, enable the samples on deferred expenses, to make it consistent with deferred revenue. Task id #2592816
Odoo now uses one consistent redirect response method across affected apps, making navigation behavior more reliable and easier to maintain. The change also updates the default redirect behavior and removes older compatibility handling, which may require related custom code to be adjusted.
Original PR description
This branch add request.redirect on all requests. In case of a front end request, we do an url_for to the location. We removed redirect_with_hash that was only for retro compatibility local_redirect…
This branch add request.redirect on all requests. In case of a front end request, we do an url_for to the location. We removed redirect_with_hash that was only for retro compatibility local_redirect has been renamed to redirect_query, and param keep_hash has been removed and moved. Default code for redirect is 303 now instead of 302. Now redirect and redirect_query make local redirect by default, you need to pass local=False to make external redirect. All werkeug.utils.redirect has been replaced by request.redirect. Http.redirect now use an http.Response type, and it become easy to add an override like 'set_cookies' e.g. Dispatch of a website.page return an http.response too, so we first need to check if it is a cached version before to check if it is an Odoo Response. Migrate your code: http.redirect -> request.redirect(location, code, local) http.local_redirect -> request.redirect_query(location, query, code, local) http.redirect_with_hash -> request.redirect Courtesy of odony for help and review ;) See commit 478068c82999eaf77fd2b68659bb3fb3d3c2872f
The Belgian VAT listing is now easier to review by sorting entries by VAT number, including archived partners, and adding direct access to related invoices. This helps accounting teams validate VAT reporting more quickly and with better traceability.
Original PR description
* Sort the report by vat number * Add link to impacting invoices * Do not exclude archived partners [task-2495556](https://www.odoo.com/web#id=2495556&model=project.task)
HR Referral users can now archive rewards that are no longer available instead of deleting them. This helps keep past referral reward history intact while removing outdated rewards from active use.
Original PR description
Purpose ======= Now, the user can't archive a rewards, if the rewards is not available anymore he can only delete it, and loose the history. TaskID: 2586019
The subscription screen now hides the generate invoice action when the selected payment method would lead to an error, such as manual payment or sending after a successful payment. This prevents users from starting an invoice flow that cannot complete and reduces avoidable support issues.
Original PR description
This PR prevents users from getting an error after clicking on 'generate invoice' button. The button is hidden if the payment method is either manual or send after succesful payment. task-2535878
The Helpdesk ticket analysis report has been updated to make performance statistics easier to understand and use. Labels, default groupings, measures, and dashboard links were refined so teams can review ticket outcomes, ratings, closure times, and hours spent more effectively.
Original PR description
Purpose of the task is to improve the ticket analysis report so in this commit did the below changes: - change the helper to: "Create tickets to get statistics on the performance of your teams." - rename the action and the menu item into 'Tickets Analysis' - pivot view: remove the default group by stage and keep the one on the creation date - hide the color index measure - rename 'rating last value' into 'Rating (/5)' - rename 'total hours spent' into 'Hours Spent' TaskID: 2531500
Belgian payroll now uses one streamlined process for managing credit time entries and exits, making the workflow clearer for payroll teams. It also corrects annual legal leave calculations for part-time schedules so employees receive more accurate leave allocations.
Original PR description
Reworks the credit time wizard in l10n_be_hr_payroll completely, unifying both enter and exit wizard into a single wizard. Also fixes problems with how the annual leave allocation wizard computes the number of days to allocate. Task ID: 2506273
The marketing automation test suite was updated to align with recent shared testing tool changes in the broader Odoo platform. This is an internal quality improvement that helps ensure future mail and template behavior changes are validated consistently.
Original PR description
Various test tools have been updated in community. This commit updates enterprise code accordingly. Task ID-2377974 Community PR odoo/odoo# 61467 Enterprise PR odoo/enterprise# 14633 Upgrade PR odoo/upgrade# 1907
Resolved issues and error corrections
This fix ensures planning-related toast notifications appear as intended. It helps users receive clear feedback when working with planning schedules, reducing confusion during day-to-day scheduling tasks.
Original PR description
Task-ID: 2557809
Code cleanup and technical improvements
Several Odoo apps were adjusted to work with a reorganized internal service layer for in-app purchases and messaging. This helps keep invoice extraction, expense extraction, payments, signatures, mobile mail, and social notifications compatible with the updated platform foundations without introducing major visible changes for users.
Miscellaneous changes
Without demo data Enterprise part of odoo/odoo#73534 Forward-Port-Of: odoo/enterprise#19591
Original PR description
Without demo data Enterprise part of odoo/odoo#73534 Forward-Port-Of: odoo/enterprise#19591
Forward-Port-Of: odoo/enterprise#19439
Original PR description
Forward-Port-Of: odoo/enterprise#19439
Allow the pos user to use a certified blackbox for his point of sale or restaurant. task-id: 1986405 Forward-Port-Of: odoo/enterprise#18989 Forward-Port-Of: odoo/enterprise#14938
Original PR description
Allow the pos user to use a certified blackbox for his point of sale or restaurant. task-id: 1986405 Forward-Port-Of: odoo/enterprise#18989 Forward-Port-Of: odoo/enterprise#14938
[IMP] sale_amazon: mandate the tracking reference Amazon now required a tracking reference based on the carrier. We decided to force the tracking before the end of the validation because it is impossible to update it afterwards. To do so, we make sure that the Delivery module is installed, since we need the field carrier_tracking_ref. We chose to hook after the request to the carrier is made, so we can know what the reference is, if a carrier respond with one. Doc PR: https://github.c
Original PR description
[IMP] sale_amazon: mandate the tracking reference Amazon now required a tracking reference based on the carrier. We decided to force the tracking before the end of the validation because it is impossible to update it afterwards. To do so, we make sure that the Delivery module is installed, since we need the field carrier_tracking_ref. We chose to hook after the request to the carrier is made, so we can know what the reference is, if a carrier respond with one. Doc PR: https://github.com/odoo/documentation/pull/1059 Community PR: https://github.com/odoo/odoo/pull/72931 Enterprise PR: https://github.com/odoo/enterprise/pull/19065 task-2573260 Forward-Port-Of: odoo/enterprise#19526 Forward-Port-Of: odoo/enterprise#19065
The Subscriptions tree view shows the field `invoice_count` it is a computed field counting invoices related with subscriptions This PR is changing the way to get all them using read_group in order to get all the result using only one faster query with all ids: SELECT min("account_move_line".id) AS id, count("account_move_line".id) AS "subscription_id_count" , COUNT(DISTINCT "account_move_line"."move_id") AS "move_id", "account_move_line"."subscription_id"
Original PR description
The Subscriptions tree view shows the field `invoice_count` it is a computed field counting invoices related with subscriptions This PR is changing the way to get all them using read_group in order…
The Subscriptions tree view shows the field `invoice_count` it is a computed field
counting invoices related with subscriptions
This PR is changing the way to get all them using read_group in order to
get all the result using only one faster query with all ids:
SELECT min("account_move_line".id) AS id,
count("account_move_line".id) AS "subscription_id_count" ,
COUNT(DISTINCT "account_move_line"."move_id") AS "move_id",
"account_move_line"."subscription_id" as "subscription_id"
FROM "account_move_line"
LEFT JOIN "sale_subscription" AS "account_move_line__subscription_id"
ON ("account_move_line"."subscription_id" = "account_move_line__subscription_id"."id")
WHERE ("account_move_line"."subscription_id" in (...))
GROUP BY "account_move_line"."subscription_id","account_move_line__subscription_id"."id"
ORDER BY "account_move_line__subscription_id"."id"
It is showing the following line profile result using 1000 records
in real database:
Total time: 4.20824 s
Line # Hits Time Per Hit % Time Line Contents
==============================================================
250 def _compute_invoice_count(self):
251 1 123.0 123.0 0.0 can_read = self.env['account.move'].check_access_rights('read', raise_exception=False)
252 1 1.0 1.0 0.0 if not can_read:
253 self.update({'invoice_count': 0})
254 return
255 2 750501.0 375250.5 17.8 res = self.env['account.move.line'].read_group(
256 1 216.0 216.0 0.0 [('subscription_id', 'in', self.ids)], ['move_id:count_distinct'], ['subscription_id'], lazy=False)
257 1 165.0 165.0 0.0 invoice_count_dict = {r['subscription_id'][0]: r['move_id'] for r in res}
258 1001 3721.0 3.7 0.1 for subscription in self:
259 1000 3453515.0 3453.5 82.1 subscription.invoice_count = invoice_count_dict.get(subscription.id, 0)
Instead of running too much queries with only one id like original way:
SELECT count(1)
FROM "account_move"
WHERE "account_move"."id" in (SELECT "account_move_line"."move_id"
FROM "account_move_line"
WHERE "account_move_line"."subscription_id" = ID1
ORDER BY "account_move_line"."id")
SELECT count(1)
FROM "account_move"
WHERE "account_move"."id" in (SELECT "account_move_line"."move_id"
FROM "account_move_line"
WHERE "account_move_line"."subscription_id" = ID2
ORDER BY "account_move_line"."id")
... (other N times running these kind of queries for each ID)
It was showing the following line profile result using 1000 records
in real database:
Total time: 404.346 s
Line # Hits Time Per Hit % Time Line Contents
==============================================================
250 def _compute_invoice_count(self):
251 1 23.0 23.0 0.0 Invoice = self.env['account.move']
252 1 102.0 102.0 0.0 can_read = Invoice.check_access_rights('read', raise_exception=False)
253 1001 4651.0 4.6 0.0 for subscription in self:
254 1000 404340821.0 404340.8 100.0 subscription.invoice_count = can_read and Invoice.search_count([('invoice_line_ids.subscription_id', '=', subscription.id)]) or 0
It means, speed-up 100x faster
Forward-Port-Of: odoo/enterprise#19511- Go to Accounting Dashboard - Click on "RECONCILE X ITEMS" button of Bank journal - Look for a line with "Bank Fees" label and click on it - Select Manual Operations tab - There should be a button named "LINE WITH BANK FEES" - Click on the Cog icon (not on the text label) A ValueError is triggered: "ValueError: Expected singleton: account.reconcile.model()" When clicking on the button, "reconcile-model-id" is retrieved from data attributes of the button. But when clicking on the cog
Original PR description
- Go to Accounting Dashboard - Click on "RECONCILE X ITEMS" button of Bank journal - Look for a line with "Bank Fees" label and click on it - Select Manual Operations tab - There should be a button named "LINE WITH BANK FEES" - Click on the Cog icon (not on the text label) A ValueError is triggered: "ValueError: Expected singleton: account.reconcile.model()" When clicking on the button, "reconcile-model-id" is retrieved from data attributes of the button. But when clicking on the cog icon, the target is not the button element but a child. opw-2507717 Forward-Port-Of: odoo/enterprise#19574