Thursday, January 4, 2024
39 changes · master
Enhancements to existing features
Adds an internal script that helps teams find unused or potentially problematic CSS in asset bundles. This can support future cleanup work, reduce bundle size, and improve maintainability without directly changing customer-facing behavior.
Original PR description
The goal is to be able to tell the useless / problematic parts in an assets bundle and try to reduce their size with a script that checks all CSS classes that can be produced in our CSS bundles. This is a functioning version, that is able to split the results in 3 categories : - 0 use detected - may be used somewhere - probably used (dynamically) By default it outputs its results in 3 text files. task-3248659 - Step 1
A new debug option helps Odoo teams see which web assets are loaded and identify files that make pages heavier. This supports performance optimization by making it easier to find unnecessary or oversized CSS and JavaScript in asset bundles.
Original PR description
The goal is to be able to tell the useless / problematic parts in an assets bundle and try to reduce their size with a script that checks the size of the CSS/JS produced by each file inside a specific assets bundle. This commit add a new debug button that display every asset loaded. task-3248659 - Step 2
This updates a background library used to position pop-ups, menus, and tooltips in the web interface. It helps keep this component current and may support better reliability, with little expected direct impact for everyday users.
Original PR description
Note: popper js has become floating UI and could require some refactoring to switch to this new version.
Automated tests and guided tours were updated to match the redesigned notification appearance. This keeps quality checks reliable after the visual change, helping prevent false test failures without changing business workflows.
Original PR description
With the introduction of the new notification design brought in https://github.com/odoo/odoo/pull/140071 we need to update all the tests and tours accordingly since we dropped the `border-color` on the `o_notification` element and are now using a `bg-[color]` on one of it's child, `o_notification_bar` task-3469789 community PR: https://github.com/odoo/odoo/pull/140071
The India reports module now uses dedicated deferred expense and deferred income accounts as the default settings. This helps businesses classify deferred costs and income more accurately instead of using unrelated suspense or capital accounts.
Original PR description
Before this commit the default Deferred Expense was set to `100202 Bank Suspense ` Account and default Deferred Revenue was set to `111100 Capital Account` After this commit the default Deferred Expense is set to `100840 Deferred Expenses` and the default Deferred Revenue is set to `100850 Deferred Income` Related Community PR- https://github.com/odoo/odoo/pull/131675 task-3418482
Resolved issues and error corrections
This fix changes how calendar access tokens are read from shared calendar links, using only the web address query information instead of broader request data. This helps keep calendar access working correctly while avoiding unnecessary processing that could interfere with newer request-handling safeguards.
Original PR description
For `@route(auth='calendar')` methods, a `token` argument can be injected in the query-string of the request to access to the controller even when not connected. That argument is solely found in the query-string and nowhere else (it is never found in a POST form), with the new http stack of httpocalypse it is better not to call `get_http_params` before `pre_dispatch` is called as other middlewares can enforce limits like a max body size. Accessing the underlying requests query-string (`args`) is safe because the request line is already subject to a length limit by web server (8k by default on nginx and apache, see their configuration regarding 414 Request URI too long). Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
This change updates how Odoo apps receive internal real-time notifications, moving them to a more direct subscription method. It reduces unnecessary processing and lowers the risk of missed or incorrectly handled notifications across messaging, point of sale, surveys, and web editing.
Miscellaneous changes
Before this commit, _get_calendar_attendances was calling the calendar method get_work_duration_data without specifying the company in the domain, ending up in wrong data if global leaves that don't concern the employee are concerning the calendar. This commit adds a domain for that method call so that only relevent global leaves are taken into account. Forward-Port-Of: odoo/odoo#148043
Original PR description
Before this commit, _get_calendar_attendances was calling the calendar method get_work_duration_data without specifying the company in the domain, ending up in wrong data if global leaves that don't concern the employee are concerning the calendar. This commit adds a domain for that method call so that only relevent global leaves are taken into account. Forward-Port-Of: odoo/odoo#148043
This fixes an issue where project task skill-related information referenced the wrong underlying data model. The change helps ensure task and reporting data show the correct skill information, reducing confusion for users reviewing project assignments.
Original PR description
This PR fixes two related fields using the wrong model.
This corrects demo data references in the Belgian payroll accounting test module so they point to the right internal records. It helps keep test/demo environments coherent and reduces the risk of setup errors during validation.
Original PR description
Before this commit, some references in the demo data were made to referencing the `hr_holidays` module while the id used is also created inside the module. This has been changed to make the demo data coherent.
Original PR description
*: mail, point_of_sale, pos_adyen, pos_online_payment,
pos_online_payment_self_order, pos_restaurant, pos_self_order,
pos_viva_wallet, survey, web_editor.
Since [1], it's possible to subscribe to the bus service with a single
notification type. The new approach is better since:
- Listeners do not need to iterate through every notification to detect
if they are interrested in some of them.
- Payload is already extracted from the `OdooEvent` (avoid cumbersome
syntax `({ detail: notifications })`.
- Better separation of concern: one listener, one action.
- Modifying the payload in place does not corrupt the payload of other
listeners.
- No risk to call `return` in the middle of the loop and to potentially
miss some notifications.
This PR removes the support for the `notification` event on the bus
service itself and adapt the code to use `subscribe` instead.
[1]: https://github.com/odoo/odoo/pull/120893
enterprise: https://github.com/odoo/enterprise/pull/53496This change updates how several Odoo apps receive internal real-time messages by removing an older notification event dependency. It should make the underlying messaging architecture cleaner while keeping user-facing behavior consistent across IoT, point of sale, spreadsheets, knowledge collaboration, and VoIP.
Original PR description
*: iot, pos_preparation_display, pos_restaurant_appointment, spreadsheet_edition, voip. community: https://github.com/odoo/odoo/pull/147747
Steps to reproduce ================== Make sure your resolution is around '1368 x 768'. 1. Open/create an opportunity and assign a partner (Joel wills). 2. Go to Joel's portal view. 3. Click on the Opportunity and go to the priority. The priority's alignment is distorted. After this PR ================= Align priority correctly on the portal view of opportunities. Task-3607070 Forward-Port-Of: odoo/odoo#147903 Forward-Port-Of: odoo/odoo#145383
Original PR description
Steps to reproduce ================== Make sure your resolution is around '1368 x 768'. 1. Open/create an opportunity and assign a partner (Joel wills). 2. Go to Joel's portal view. 3. Click on the Opportunity and go to the priority. The priority's alignment is distorted. After this PR ================= Align priority correctly on the portal view of opportunities. Task-3607070 Forward-Port-Of: odoo/odoo#147903 Forward-Port-Of: odoo/odoo#145383
This issue occurs when a customer creates multiple companies. Then, after installing the attendance module, after selecting the kiosk mode, an error is generated. This is because, before installing the attendance module, if the customer created a company, a single kiosk key is generated. This key is different for each company, but it is the same. step to reproduce- - First created two company. - Install the `Attendances` & Open it. - Click on the Kiosk Mode from Menu. - Error will be gene
Original PR description
This issue occurs when a customer creates multiple companies. Then, after installing the attendance module, after selecting the kiosk mode, an error is generated. This is because, before installing…
This issue occurs when a customer creates multiple companies. Then, after installing the attendance module, after selecting the kiosk mode, an error is generated. This is because, before installing the attendance module, if the customer created a company, a single kiosk key is generated. This key is different for each company, but it is the same.
step to reproduce-
- First created two company.
- Install the `Attendances` & Open it.
- Click on the Kiosk Mode from Menu.
- Error will be generated.
sentry traceback-
```
ValueError: Expected singleton: res.company(2, 1, 4, 3)
File "odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "odoo/http.py", line 1732, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1873, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/hr_attendance/controllers/main.py", line 82, in open_kiosk_mode
} for e in request.env['hr.employee'].sudo().search_read(domain=[('company_id', '=', company.id)],
File "odoo/fields.py", line 5118, in __get__
raise ValueError("Expected singleton: %s" % record)
```
after this commit,Each attendance kiosk key generated during the company's creation is unique.
sentry-4617967282
Forward-Port-Of: odoo/odoo#145382The goal is to remove unnecessary usage of the reactive proxy. See individual commits for more details. Forward-Port-Of: odoo/odoo#147814
Original PR description
The goal is to remove unnecessary usage of the reactive proxy. See individual commits for more details. Forward-Port-Of: odoo/odoo#147814
Steps to reproduce ================== Go to Maintenance > Studio > Website > New Form Click on the website editor Click on the name field UncaughtPromiseError > KeyNotFoundError Cause of the issue ================== Starting from 17, the FormEditorRegistry is not the legacy one. If the key is not present in the registry, it will fail, unless we pass a default value. In this case, the key `website_form_key` is false. Solution ======== Pass null as the default value. op
Original PR description
Steps to reproduce ================== Go to Maintenance > Studio > Website > New Form Click on the website editor Click on the name field UncaughtPromiseError > KeyNotFoundError Cause of the issue ================== Starting from 17, the FormEditorRegistry is not the legacy one. If the key is not present in the registry, it will fail, unless we pass a default value. In this case, the key `website_form_key` is false. Solution ======== Pass null as the default value. opw-3652423 Forward-Port-Of: odoo/odoo#147840
To reproduce: 1. Sync the IoT with a 17 database 2. Once it is set up, force shut down the server by Ctrl+C 2 times 3. Wait a few seconds: => crash of `WebsocketClient` thread with the following traceback: ``` Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_i> self.run() File "/home/pi/odoo/addons/hw_drivers/websocket_client.py", line 83> self.ws.run_forever() File "/usr/local/lib/python3.11/dist-packages/websocket/_app.py"
Original PR description
To reproduce: 1. Sync the IoT with a 17 database 2. Once it is set up, force shut down the server by Ctrl+C 2 times 3. Wait a few seconds: => crash of `WebsocketClient` thread with the following…
To reproduce:
1. Sync the IoT with a 17 database
2. Once it is set up, force shut down the server by Ctrl+C 2 times
3. Wait a few seconds:
=> crash of `WebsocketClient` thread with the following traceback:
```
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_i>
self.run()
File "/home/pi/odoo/addons/hw_drivers/websocket_client.py", line 83>
self.ws.run_forever()
File "/usr/local/lib/python3.11/dist-packages/websocket/_app.py", l>
raise WebSocketException("socket is already opened")
websocket._exceptions
WebSocketException
socket is already opened
```
The IoT synchronised servers can stop in 2 ways that we need to handle:
- Gracefully (Ctrl+C):
In this case a disconnection signal is sent to the IoT-box
The websocket is properly closed, but it needs to be established a new connection when the server will be back.
Solution: `while True` loop as `run_forever` will return on close. `time.sleep` for the reconnection delay
- Forced/killed (Ctrl+C 2 times):
In this case there is no disconnection signal received
Solution: use `reconnect` that will automatically take care re-attempting a connection
This will also happen with the graceful quit as `reconnect` will trigger if the server is offline while attempting the new connection
In both case, we perform a reconnection attempt with a delay of 10 seconds to avoid spamming the database
After this commit:
The websocket will reconnect itself automatically after 10 seconds if the connection is disrupted
opw-3612528
Forward-Port-Of: odoo/odoo#147858Issue: - For GCC localization, the receipt lacked VAT details per line and had mixed-up numbers at the bottom, and contained wrong translations. Steps to reproduce: - Activate the Saudi localization (l10n_sa_pos). - Open the Point of Sale app. - Create a new order and print the receipt. - Notice the missing VAT per line, the mixed numbers for large amounts at the bottom and the wrong translation. Solution: - patched the ```Orderline.prototype``` to display precise tax amounts with tw
Original PR description
Issue: - For GCC localization, the receipt lacked VAT details per line and had mixed-up numbers at the bottom, and contained wrong translations. Steps to reproduce: - Activate the Saudi localization (l10n_sa_pos). - Open the Point of Sale app. - Create a new order and print the receipt. - Notice the missing VAT per line, the mixed numbers for large amounts at the bottom and the wrong translation. Solution: - patched the ```Orderline.prototype``` to display precise tax amounts with two decimal places. - updated the view to show tax details per line for gcc localization. - added correct Arabic translations, and removed incorrect ones. - See attachment for more details. OPW-3652633 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147859
- Replaces a randomly failing test by a simpler test. As reported by XDO (https://github.com/odoo/odoo/pull/123237#discussion_r1410620206), executing web requests asynchronously during the execution of a tour which does an RPC is randomly failing. The fix consists in not testing the full online payment flow with the cashier frontend interface, but instead simulate an order saved on the server and simulate real customer web requests for paying online for that order. - Simplifies the way payme
Original PR description
- Replaces a randomly failing test by a simpler test. As reported by XDO (https://github.com/odoo/odoo/pull/123237#discussion_r1410620206), executing web requests asynchronously during the execution of a tour which does an RPC is randomly failing. The fix consists in not testing the full online payment flow with the cashier frontend interface, but instead simulate an order saved on the server and simulate real customer web requests for paying online for that order. - Simplifies the way payment portal URLs are build. task-id: 3632217 Forward-Port-Of: odoo/odoo#146029 Forward-Port-Of: odoo/odoo#145595
Enable TOTP on your account and create yourself an API key. Connect in xmlrpc using that API key. Traceback `request` is not bound. Fixes: odoo/documentation#6919 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146270
Original PR description
Enable TOTP on your account and create yourself an API key. Connect in xmlrpc using that API key. Traceback `request` is not bound. Fixes: odoo/documentation#6919 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146270
Cannot select Working Hour if it doesn't have a company to set up default Working Hour for a company Setps: 1. `Standard 38 hours/week` data doesn't have a company 2. Employees menu > Configuration > Settings 3. cannot select `Standard 38 hours/week` to set --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147860 Forward-Port-Of: odoo/odoo#147794
Original PR description
Cannot select Working Hour if it doesn't have a company to set up default Working Hour for a company Setps: 1. `Standard 38 hours/week` data doesn't have a company 2. Employees menu > Configuration > Settings 3. cannot select `Standard 38 hours/week` to set --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147860 Forward-Port-Of: odoo/odoo#147794
**Steps:** - Open Field Service - Switch to the calendar view - Click on any task - Notice the space in the row of the worksheet template **Issue:** - There is a weird space between the title Worksheet Template and the template name **Cause:** - Due to the long name of Worksheet Template, it moves to the next line but occupies a certain amount of space around it **Fix:** - By giving flex-wrap, the content is displayed properly **Task:** 3394985 Forward-Port-Of: odoo/odoo#1479
Original PR description
**Steps:** - Open Field Service - Switch to the calendar view - Click on any task - Notice the space in the row of the worksheet template **Issue:** - There is a weird space between the title Worksheet Template and the template name **Cause:** - Due to the long name of Worksheet Template, it moves to the next line but occupies a certain amount of space around it **Fix:** - By giving flex-wrap, the content is displayed properly **Task:** 3394985 Forward-Port-Of: odoo/odoo#147925 Forward-Port-Of: odoo/odoo#128035
prevent header overlap with `pay with demo` dialog Forward-Port-Of: odoo/odoo#147935
Original PR description
prevent header overlap with `pay with demo` dialog Forward-Port-Of: odoo/odoo#147935
Right now, when a turnstile error occurs, the user is displayed a CORS error, which is incorrect. This commit fixes that by displaying a more accurate error message. The fix requires the addition of a small trick which is to use the turnstile error handler system to catch and rethrow the error. It seems useless, but it is actually required as errors thrown by files coming from external domains will be set by the browser as "Script error" and stripped of any further info. So for better
Original PR description
Right now, when a turnstile error occurs, the user is displayed a CORS error, which is incorrect. This commit fixes that by displaying a more accurate error message. The fix requires the addition of a small trick which is to use the turnstile error handler system to catch and rethrow the error. It seems useless, but it is actually required as errors thrown by files coming from external domains will be set by the browser as "Script error" and stripped of any further info. So for better error handling, these few lines are worth it. The error is most likely to happen when duplicating a database as turnstile requires a specific domain name in its cloudflare settings. This improved message will hopefully help support manage better this situation. Hopefully, we can make something in the DB duplication tool to avoid the issue entirely and have this error message displayed only for "real" but rare errors. Forward-Port-Of: odoo/odoo#147886
Description of the issue/feature this PR addresses: The webhook URLs used by MercadoPago are not sanitized and cause the payment to fail when the URL contains spaces or other non-ASCII characters. Steps to reproduce the bug: 1. Instal the Argentine localization and configure "payment_mercado_pago" as the payment method (test or production). 2. Create an invoice and generate a payment link (the reference will be something like "FA-C 0001-000133444"). 3. Initiate the payment process and it w
Original PR description
Description of the issue/feature this PR addresses: The webhook URLs used by MercadoPago are not sanitized and cause the payment to fail when the URL contains spaces or other non-ASCII characters.…
Description of the issue/feature this PR addresses: The webhook URLs used by MercadoPago are not sanitized and cause the payment to fail when the URL contains spaces or other non-ASCII characters. Steps to reproduce the bug: 1. Instal the Argentine localization and configure "payment_mercado_pago" as the payment method (test or production). 2. Create an invoice and generate a payment link (the reference will be something like "FA-C 0001-000133444"). 3. Initiate the payment process and it will generate an error in the last stage of payment (on the MercadoPago website). - Mercadopago tests credentials TEST-4811719641145832-020115-c5caffc149634e3e9d72fde2b74544d8__LD_LA__-172837665 - Used payment methods: https://www.mercadopago.com.ar/developers/es/docs/checkout-api/additional-content/your-integrations/test/cards - Credencial de test usada TEST-4811719641145832-020115-c5caffc149634e3e9d72fde2b74544d8__LD_LA__-172837665 - Metodo de pago usados: https://www.mercadopago.com.ar/developers/es/docs/checkout-api/additional-content/your-integrations/test/cards Current behavior before PR: Payment in MercadoPago cannot be confirmed when the reference contains spaces. Desired behavior after PR is merged: Payment in MercadoPago is confirmed even when the reference contains spaces. Adhoc Ticket: 68591 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147848
**[FIX] website_forum: fix the invalid URL link** How to reproduce: - Login as a portal user, create a new post by adding a URL link - Post Your Question - Login as admin to validate the post - Click on 'To Validate' from the moderation tool - Click on the mentioned URL Throws a Traceback and redirects to the about:blank#blocked page. Technical Reason: The '_update_content' method performs a regular expression on the link by using the escape method, which is later convert the bac
Original PR description
**[FIX] website_forum: fix the invalid URL link** How to reproduce: - Login as a portal user, create a new post by adding a URL link - Post Your Question - Login as admin to validate the post - Click on 'To Validate' from the moderation tool - Click on the mentioned URL Throws a Traceback and redirects to the about:blank#blocked page. Technical Reason: The '_update_content' method performs a regular expression on the link by using the escape method, which is later convert the backslash '\' into '%5C' while html_sanitize. After this commit: Clicking on the mentioned link redirects to the correct URL Task-3472776 Forward-Port-Of: odoo/odoo#147964 Forward-Port-Of: odoo/odoo#141416
Fixes #131211 Forward-Port-Of: odoo/odoo#147821
Original PR description
Fixes #131211 Forward-Port-Of: odoo/odoo#147821
A `%()s` was accidentally "translated" with a `%()S`, this capital `S` vs `s` results in an error when the string is reached while using the Swedish language. This needs to be manually fixed within master due to Swedish not being one of the standard maintained translated languages. opw-3633455 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Original PR description
A `%()s` was accidentally "translated" with a `%()S`, this capital `S` vs `s` results in an error when the string is reached while using the Swedish language. This needs to be manually fixed within master due to Swedish not being one of the standard maintained translated languages. opw-3633455 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Steps to reproduce: - Create an SMS and send it - go to the sent option and select a contact - Click on add to list - Select a mailing list - then click on add and sent mailing (you will be redirected to email marketing) - Select a template and send it - The recipient will not be able to see the template (The email is blank) Issue: Template value is not stored in the body_html field Technical reason: When the record is saved the changes in `body_html` are discarded from [_g
Original PR description
Steps to reproduce: - Create an SMS and send it - go to the sent option and select a contact - Click on add to list - Select a mailing list - then click on add and sent mailing (you will be redirected to email marketing) - Select a template and send it - The recipient will not be able to see the template (The email is blank) Issue: Template value is not stored in the body_html field Technical reason: When the record is saved the changes in `body_html` are discarded from [_getchanges()](https://github.com/odoo/odoo/blob/c2b160fe50c24e9f01d0d5b350f2422cfdbc72d4/addons/web/static/src/model/relational_model/record.js#L574-L581) because, field is set to readonly = 'true' after this commit https://github.com/odoo/odoo/pull/132247 After this commit: The recipient will be able to see the template Task-3556020 Forward-Port-Of: odoo/odoo#143293
Issue: - In mobile when we have multiple tickets, the quantity of selected tickets is not visible Steps to reproduce the issue: - Go to events - Select any event with multiple tickets - Go to website - Click on register now - Notice in mobile the quantity of selected tickets is not visible Solution: - Add style to the quantity of selected tickets opw-3602057 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/
Original PR description
Issue:
- In mobile when we have multiple tickets, the quantity of
selected tickets is not visible
Steps to reproduce the issue:
- Go to events
- Select any event with multiple tickets
- Go to website
- Click on register now
- Notice in mobile the quantity of selected tickets is not visible
Solution:
- Add style to the quantity of selected tickets
opw-3602057
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#146904In #126914 a limit on the request size has been enforced, that limit is by default 128MiB and can be configured via an ir.config_parameter. When restoring a backup larger than 128MiB via the database manager, the default limit was used and the request was cancelled with a Request Entity Too Large (code 413) HTTP error. It is now possible to define a default max content length per route, that per-route limit takes over the `web.max_file_upload_size` ICP. Moved the code from `get_http_params
Original PR description
In #126914 a limit on the request size has been enforced, that limit is by default 128MiB and can be configured via an ir.config_parameter. When restoring a backup larger than 128MiB via the database manager, the default limit was used and the request was cancelled with a Request Entity Too Large (code 413) HTTP error. It is now possible to define a default max content length per route, that per-route limit takes over the `web.max_file_upload_size` ICP. Moved the code from `get_http_params` to `pre_dispatch` to better align with the httpocalypse new http stack. Fixes: #144144 opw-3643475 Forward-Port-Of: odoo/odoo#147506
The email_to field of the contactus form have to be dynamic except if the user manually set it via the form options. Unfortunately, the website signature task broke this feature. This commit fixes it and adds a test to prevent this regression in the future. Steps to reproduce the bug: - Go to the contactus page - Edit the page - Add a field on the form - Save the page - Change the company email address via the settings => The contactus form still send the email to the old email add
Original PR description
The email_to field of the contactus form have to be dynamic except if the user manually set it via the form options. Unfortunately, the website signature task broke this feature. This commit fixes it…
The email_to field of the contactus form have to be dynamic except if the user manually set it via the form options. Unfortunately, the website signature task broke this feature. This commit fixes it and adds a test to prevent this regression in the future. Steps to reproduce the bug: - Go to the contactus page - Edit the page - Add a field on the form - Save the page - Change the company email address via the settings => The contactus form still send the email to the old email address. --- Since [this other commit], the recipient email option of the form on the `/contactus` page is not filled correctly with the company email. By chance, the form signature task fixed the bug but introduced another one. The previous commit fixed the bug introduced by the form signature task but reintroduced the inital bug. This commit fixes the initial bug and adds a test. By default, the form on the `/contactus` page sends emails to the email address of the company. Unfortunately, before this commit, when a user entered edit mode, the Recipient E-mail option always displayed "info@yourcompany.example.com" even when the company's e-mail address was different. This commit corrects this by displaying the dynamic value of `company.email` in the Recipient E-mail option coming from the data-for. Steps to reproduce the issue fixed by this commit: - Go to Settings > General Settings - Update the company's email address - Go to /contactus and edit - Click on the form => The recipient email value is still "info@yourcompany.example.com" instead of the company's email address. This commit fixes the issue, adds a test to ensure the recipient email option is correct and adds a utility to parse the data-for data. Bonus: this commit also fixes the following issue catched by sentry: - Go to /contactus - Click on Edit - In the Form option, remove the content of the 'Recipient Email' field. - Save - Fill and submit the form => An error is generated in the log. [this other commit]: https://github.com/odoo/odoo/commit/043e1fdf923d2037dd8da128ab99388f0c92e544 --- task-3382195 sentry-4633940473 Forward-Port-Of: odoo/odoo#147933 Forward-Port-Of: odoo/odoo#126508
The "grid images" are grid items that only contain an image (i.e. the image is alone in its column). This distinction with other images in grid mode allows to set the `object-fit` CSS property to `cover` so they take the whole space of the grid item (see commits [1] and [2]). In commit [3], the "Position" option has been added, allowing to switch between the `cover` and `contain` values for this property, to have the possibility to still choose to display the entire image, so it can keep its rat
Original PR description
The "grid images" are grid items that only contain an image (i.e. the image is alone in its column). This distinction with other images in grid mode allows to set the `object-fit` CSS property to…
The "grid images" are grid items that only contain an image (i.e. the image is alone in its column). This distinction with other images in grid mode allows to set the `object-fit` CSS property to `cover` so they take the whole space of the grid item (see commits [1] and [2]). In commit [3], the "Position" option has been added, allowing to switch between the `cover` and `contain` values for this property, to have the possibility to still choose to display the entire image, so it can keep its ratio. However, only the images that are direct children of the column have been considered when checking if it was a grid image and in the related CSS rules. This means that an image with a link cannot be one, since the image is the child of an anchor element `<a>` in that case. It can therefore not be set as "cover" or have the "Position" option. This commit adds the support for images with a link set on them, so they can be considered as grid images too. Steps to reproduce: - Drop the "Masonry" snippet. - Click on the image and set a link on it. => The image is now "contain" and the "Position" option disappeared from the right panel so we cannot change it. [1]: https://github.com/odoo/odoo/commit/e9c7e020daf88022d6e02de0a5620074e8417b5a [2]: https://github.com/odoo/odoo/commit/d8c374e3e6b31bf88aa42952aadf3379936f7600 [3]: https://github.com/odoo/odoo/commit/faf19ef7f87fc043fb9a814516e01b8eeafd9b61 opw-3580128 Forward-Port-Of: odoo/odoo#148022 Forward-Port-Of: odoo/odoo#147884
## Description Saving a new `res.config.settings` (for ex: checking "Use QR code on ticket") can be extremely slow on database with a large number of `pos.order`. ## Analysis Saving a new `res.config.settings` creates a new instance of the config. This will invoke a check on the python constraints calling eventually `_check_currencies` of `pos.config`, which will invoke the compute of `currency_id` setting the field as dirty. The `_compute_currency_rate` of `pos.order` depends on the `curre
Original PR description
## Description Saving a new `res.config.settings` (for ex: checking "Use QR code on ticket") can be extremely slow on database with a large number of `pos.order`. ## Analysis Saving a new…
## Description Saving a new `res.config.settings` (for ex: checking "Use QR code on ticket") can be extremely slow on database with a large number of `pos.order`. ## Analysis Saving a new `res.config.settings` creates a new instance of the config. This will invoke a check on the python constraints calling eventually `_check_currencies` of `pos.config`, which will invoke the compute of `currency_id` setting the field as dirty. The `_compute_currency_rate` of `pos.order` depends on the `currency_id` of the current `pos.config` (via a related). This means the compute will be called with *all* `pos.order` ever made. As the compute itself makes a few calls to `_get_conversion_rate`, which makes a query, it can become slow when the method is called frequently. ## Solution Memoize the call to `_get_conversion_rate`, as similarly done in `account.move.line` from d8d47f9ff8554f4b39487fd2f13c153c7d6f958d to reduce the number queries necessary. ## Benchmark The `create` request to `res.config.settings` on a database with over 240k `pos.order` took | | Before | After | |-------------|-----------|----------| | Timing | 36.9 secs | 4.3 secs | | Query count | 47k | 627 | ## Reference opw-3632273 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147957 Forward-Port-Of: odoo/odoo#145810
When you install point_of_sale and then pos_restaurant, you end up with a pos_config with an archived journal. Then, if you change the chart of account via demo data, it doesn't delete the archived log and crashes. To correct this problem, we add `with_context(active_test=False)` to the pos.config search. Forward-Port-Of: odoo/odoo#147889
Original PR description
When you install point_of_sale and then pos_restaurant, you end up with a pos_config with an archived journal. Then, if you change the chart of account via demo data, it doesn't delete the archived log and crashes. To correct this problem, we add `with_context(active_test=False)` to the pos.config search. Forward-Port-Of: odoo/odoo#147889
When a message had more than 1 attachment, it was not possible to preview the attachment on a mobile device. This happens because the hover buttons for delete/download the file took the whole clickable area of attachment to see the preview. To enable quick actions in mobile, this require non-trivial UI tweaking. To match behaviour of version 16.0, these quick-actions have been disabled in mobile. opw-3664795 Before  After  Forward-Port-Of: odoo/odoo#148091
Steps to reproduce: - Select a cell from last column (Total) - Autofill vertically upwards by targeting a column header (drag upto measure, total or beyond) - It leads to a traceback error since in cases with step <= -2, incorrect params are being passed to `makePivotFormula` of `_autofillColFromValue` method. This PR fixes the issue by handling the case of last column seperately. It ensures that correct params are passed in each case, and hence an accurate resultant formula is formed.
Original PR description
Steps to reproduce: - Select a cell from last column (Total) - Autofill vertically upwards by targeting a column header (drag upto measure, total or beyond) - It leads to a traceback error since in cases with step <= -2, incorrect params are being passed to `makePivotFormula` of `_autofillColFromValue` method. This PR fixes the issue by handling the case of last column seperately. It ensures that correct params are passed in each case, and hence an accurate resultant formula is formed. Task ID : 3461853 Forward-Port-Of: odoo/enterprise#53568 Forward-Port-Of: odoo/enterprise#45685
When the user copies an article, the system copies the body of the article 'as-is' without updating the ID references stored within it. As a result, the embedded views of article items stored in the body of the copy will list the article items of the original article and not its own article items. This PR will address that issue by updating the context of the embedded views stored in the body of the copy. It will ensure that the embedded views listing the article items of the original article
Original PR description
When the user copies an article, the system copies the body of the article 'as-is' without updating the ID references stored within it. As a result, the embedded views of article items stored in the…
When the user copies an article, the system copies the body of the article 'as-is' without updating the ID references stored within it. As a result, the embedded views of article items stored in the body of the copy will list the article items of the original article and not its own article items. This PR will address that issue by updating the context of the embedded views stored in the body of the copy. It will ensure that the embedded views listing the article items of the original article will now list the article items of the copy. Steps to reproduce the issue: 1. Create an article 2. Insert an embedded view of article items (with /kanban or /list) 3. Insert a few articles 4. Create a copy of the article (using the "Create a Copy" button) => The embedded views of article items list the article items of the original article. TO BE: The embedded views of article items should list the article items of the newly created article. task-3349324 Forward-Port-Of: odoo/enterprise#51797 Forward-Port-Of: odoo/enterprise#42936
Forward-Port-Of: odoo/enterprise#53217
Original PR description
Forward-Port-Of: odoo/enterprise#53217
1. Have an MX company setup 2. Create a portal user for an mx customers (ex. INMOBILIARIA CVA) 3. Settings > Point of Sale > enable 'Use QR code on ticket' 4. Open POS, create 2+ orders, save the link from any qr 5. Close session 6. Open session in the backend, go to orders 7. Select all orders, Actions > Create Global Invoice 8. Open the qr link saved at 4. with the portal user created at 2. 9. Invoice will be automatically created 10. Go to the POS session in the backend (like 6.) 11
Original PR description
1. Have an MX company setup 2. Create a portal user for an mx customers (ex. INMOBILIARIA CVA) 3. Settings > Point of Sale > enable 'Use QR code on ticket' 4. Open POS, create 2+ orders, save the link from any qr 5. Close session 6. Open session in the backend, go to orders 7. Select all orders, Actions > Create Global Invoice 8. Open the qr link saved at 4. with the portal user created at 2. 9. Invoice will be automatically created 10. Go to the POS session in the backend (like 6.) 11. Open the order having the "Customer" field filled with portal partner 12. Check in the CFDI tab, the document with state 'Sent' Issue: TipoRelacion is '03', while it should be '01' when creating a credit note for an invoice opw-3600035 Forward-Port-Of: odoo/enterprise#52955