Friday, July 9, 2021
26 changes · master
Enhancements to existing features
This update standardizes how Odoo apps access session information by requiring them to use a shared web module. It helps keep user and session data handling more consistent across features such as mail, point of sale, website, and autocomplete.
Original PR description
* google_recaptcha, mail, partner_autocomplete, point_of_sale, website Now, to read session information, the module "@web/session" must be imported. Not that, there is also the user service with all the user information
The settings menu item previously labeled “Template” is now labeled “Email Templates.” This makes it easier for users to distinguish email templates from other template types in Odoo, reducing confusion when navigating settings.
Original PR description
Description of the issue/feature this PR addresses: Rename the menu item 'Template' from the settings to 'Email template' . -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Tour guidance popups now center on the actual text content rather than the surrounding container. This makes onboarding and walkthrough tips look more precise when text is left- or right-aligned.
Original PR description
Before, the tour tip was centered on the container tag instead of the text content. That asymmetry was visible for text with a text-align different than center. Therefore the _reposition method of the tip has been modified to better handle such text elements. If its anchor element has inner text we use a range to get the width of the text. task-2477212 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The web editor code has been brought directly into the main Odoo codebase instead of being maintained in a separate repository. This reduces coordination overhead for future updates and should make maintenance of website editing tools simpler, with no major immediate change expected for end users.
The enterprise mail tests were updated to stop relying on an old email sending field on mail channels. This supports the platform change that moves that behavior into a dedicated mail group area, reducing future maintenance risk without affecting day-to-day users.
Original PR description
Purpose ======= Remove the usage of the "email_send" field on the <mail.channel>. Links ===== Task-2510267 See odoo/odoo/pull/71599 See odoo/enterprise/pull/19296 See odoo/upgrade/pull/2600
Several Odoo Enterprise areas now read session information through a shared session module. This keeps session-dependent behavior more consistent across documents, mobile mail, timesheet synchronization, Enterprise web menus, and Studio, reducing maintenance risk without changing normal user workflows.
Original PR description
* documents, mail_mobile, project_timesheet_synchro, web_studio Now, to read session information, the module "@web/session" must be imported. Not that, there is also the user service with all the user information.
Resolved issues and error corrections
This fix prevents old-style help popups from lingering on screen after a user clicks a button while hovering over it. It improves the web interface by keeping the page cleaner and avoiding confusing leftover popups.
Original PR description
Before this commit, when hovering a button with a bootstrap tooltip set on it (form view with header button in debug mode) and then clicking while staying hover the tooltip was not destroyed and there was no easy means to destroy it. After this commit, any click within a legacy context remove any bootstrap tooltip from the DOM, since popper and tooltip are not meant to be used in the future in a wowl setting. 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 pull request restructures internal XML import handling to make the code easier to maintain. It does not introduce new features or remove existing behavior, so business impact should be minimal while improving future development reliability.
Original PR description
Follows odoo/odoo#27383 with more refactorings & cleanups of `import_xml.rng` and the corresponding Python code. As of the PR creation, this only contains (incomplete/wip) refactorings, not new features or deprecations/removals.
Miscellaneous changes
- Install Sales > Configuration > Settings and activate Delivery Methods - Create a SO as followed: * Add a section (i.e. Section 1) * Add a product (i.e. Product A) * Add a product (i.e. Product B) * Add a shipping (i.e. Delivery X) * Add a section (i.e. Section 2) * Add a product (i.e. Product C) - Move (drag & drop) Delivery X to the first place SO lines are reordered, but Product B is moved after Section 2. It comes from the fact that some lines have the same sequence
Original PR description
- Install Sales > Configuration > Settings and activate Delivery Methods - Create a SO as followed: * Add a section (i.e. Section 1) * Add a product (i.e. Product A) * Add a product (i.e. Product B)…
- Install Sales > Configuration > Settings and activate Delivery Methods - Create a SO as followed: * Add a section (i.e. Section 1) * Add a product (i.e. Product A) * Add a product (i.e. Product B) * Add a shipping (i.e. Delivery X) * Add a section (i.e. Section 2) * Add a product (i.e. Product C) - Move (drag & drop) Delivery X to the first place SO lines are reordered, but Product B is moved after Section 2. It comes from the fact that some lines have the same sequence and that only the lines between the source and the destination position are re-sequenced. Before the move, the sequencing is as followed: 1) Section 1: 10 2) Product A: 10 3) Product B: 10 4) Delivery X: 11 5) Section 2: 12 6) Product C: 13 After the move, only lines from 1 to 4 are re-sequenced. Leading to the following sequencing: 1) Delivery X: 10 2) Section 1: 11 3) Product A: 12 4) Product B: 13 5) Section 2: 12 6) Product C: 13 As Product B has now a greater sequence than Section 2, it will be moved after it. If some lines between the source and the destination position have the same sequence, all lines should be re-sequenced to prevent such a behavior. opw-2531524 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#73423 Forward-Port-Of: odoo/odoo#73085
Website page creation now correctly handles content containing ampersands during setup. This prevents installation failures in the website configurator when page text includes characters like '&'.
Original PR description
`_render('<h1> quick & flupke </h1>') `=>` '<h1> quick & flupke </h1>'`
what cannot be parsed in xml after.
Before this commit, if you try to install a page that contains a '&' via
the configurator, you had a traceback:
xmlParseEntityRef: no name, line 1, column 13
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-prThis change reorganizes part of Odoo's web client action handling to make the code easier to maintain and evolve. It should not noticeably change day-to-day user workflows, but it can help reduce future development complexity in the web interface.
Original PR description
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
Context * postgres 12.5 * Odoo 14 DB Stats * pos.payment: 645 K * pos.order by company: 379 K, 1 K, 973 K, 19 K total_payments_amount ===================== Result: 0.02 sec vs 33.6 sec POS Session Stats: * pos.order: 27 K * pos.payment: 39 K BEFORE 22 33.467 0.123 (number of queries, query time, rest time) AFTER read_group refactoring: 4 3.952 0.006 AFTER read_group + session_id index 4 2.770 0.009 AFTER read_group + session_id i
Original PR description
Context * postgres 12.5 * Odoo 14 DB Stats * pos.payment: 645 K * pos.order by company: 379 K, 1 K, 973 K, 19 K total_payments_amount ===================== Result: 0.02 sec vs 33.6 sec POS Session…
Context * postgres 12.5 * Odoo 14 DB Stats * pos.payment: 645 K * pos.order by company: 379 K, 1 K, 973 K, 19 K total_payments_amount ===================== Result: 0.02 sec vs 33.6 sec POS Session Stats: * pos.order: 27 K * pos.payment: 39 K BEFORE 22 33.467 0.123 (number of queries, query time, rest time) AFTER read_group refactoring: 4 3.952 0.006 AFTER read_group + session_id index 4 2.770 0.009 AFTER read_group + session_id index + store company_id 4 0.009 0.006 _compute_cash_balance ===================== Result: 0.1 sec vs 9.2 sec POS Session Stats: * pos.order: 59 K * pos.payment: 82 K BEFORE 399 1.695 7.587 AFTER 21 0.123 0.016 _compute_picking_count ====================== Result: 0.7 sec vs 3.5 sec POS Session stats * pos.order: 107 K * stock.picking: 60 K BEFORE 126 1.007 2.452 AFTER 5 0.723 0.011 --- opw-2514640 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#69933
Printing a kitchen ticket with arabic product name lead to bad css layout. The layout has been switched to make it no matter language is used. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#73427
Original PR description
Printing a kitchen ticket with arabic product name lead to bad css layout. The layout has been switched to make it no matter language is used. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#73427
When adding several PO to a bill, if they don't have the same currency, it will lead to incorrect amounts To reproduce the error: 1. In Settings, enable "Multi-Currencies" 2. Invoicing > Configuration > Currencies: - EUR: Active, Current Rate = 2 - USD: Active, Current Rate = 1 3. Create a PO: - Currency: USD - Products: - One product, no taxes, unit price 1000 4. Confirm PO 5. Edit PO: - Qty Received: 1 6. Repeat 3 -> 5 with EUR instead of USD 7. Ope
Original PR description
When adding several PO to a bill, if they don't have the same currency,
it will lead to incorrect amounts
To reproduce the error:
1. In Settings, enable "Multi-Currencies"
2. Invoicing > Configuration > Currencies:
- EUR: Active, Current Rate = 2
- USD: Active, Current Rate = 1
3. Create a PO:
- Currency: USD
- Products:
- One product, no taxes, unit price 1000
4. Confirm PO
5. Edit PO:
- Qty Received: 1
6. Repeat 3 -> 5 with EUR instead of USD
7. Open a new Bill
8. Add the first PO to the field "Auto-Complete"
9. Add the second PO to the field "Auto-Complete"
Error: Both invoice lines are now expressed in EUR and both subtotals
are equal to 1000 even though the exchange rate isn't 1
This commit suggests not to change the currency of the account move if
the latter already has some AML. Moreover, the amounts must be converted
if they come from a PO that uses another currency
OPW-2573748
Forward-Port-Of: odoo/odoo#73247Steps to reproduce the bug: - Go to Accounting > Vendors > Bills - Create a new Bills - Delete the contents of the 'Accounting Date' field. - Click off that field. Problem: -An AttributeError is triggered because we try to recalculate a new name via the function `"_compute_name"` and we base ourselves on the date field, but we do not check if it is null or not before accessing it. This field is only used for purchase receipts, vendor bills, vendor credit notes, payments and regular
Original PR description
Steps to reproduce the bug: - Go to Accounting > Vendors > Bills - Create a new Bills - Delete the contents of the 'Accounting Date' field. - Click off that field. Problem: -An AttributeError is triggered because we try to recalculate a new name via the function `"_compute_name"` and we base ourselves on the date field, but we do not check if it is null or not before accessing it. This field is only used for purchase receipts, vendor bills, vendor credit notes, payments and regular journal entries. Other move types are unaffected here. opw-2511799 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#73465
Description of the issue/feature this PR addresses: - In POS with pos_six installed - create an order - add a payment with SIX, paid - Click on reversed - Pay in cash --> Issue on the receipt the payment and refund by SIX doesn't appear on the ticket @pimodoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71262
Original PR description
Description of the issue/feature this PR addresses: - In POS with pos_six installed - create an order - add a payment with SIX, paid - Click on reversed - Pay in cash --> Issue on the receipt the payment and refund by SIX doesn't appear on the ticket @pimodoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71262
*: web_editor, website In this PR, the following changes have been made: - Disable link edition (Popover) in snippet navigation. - The first element is selected once the snippet is visible at the bottom of screen. task-2431484 Forward-Port-Of: odoo/odoo#72509
Original PR description
*: web_editor, website In this PR, the following changes have been made: - Disable link edition (Popover) in snippet navigation. - The first element is selected once the snippet is visible at the bottom of screen. task-2431484 Forward-Port-Of: odoo/odoo#72509
Actually only one payment method is allowed by iot device type because we take only the first one found by iot device type With this fix we loop on all payment method to instantiate the terminal proxy on each payment method Forward-Port-Of: odoo/enterprise#19561 Forward-Port-Of: odoo/enterprise#19536
Original PR description
Actually only one payment method is allowed by iot device type because we take only the first one found by iot device type With this fix we loop on all payment method to instantiate the terminal proxy on each payment method Forward-Port-Of: odoo/enterprise#19561 Forward-Port-Of: odoo/enterprise#19536
On the module installation all values are empty, no need to fetch all `account.move.line` just to set zero value to subscription_mrr. This commit prevents memory limit error. --- opw-2579185 Forward-Port-Of: odoo/enterprise#19436
Original PR description
On the module installation all values are empty, no need to fetch all `account.move.line` just to set zero value to subscription_mrr. This commit prevents memory limit error. --- opw-2579185 Forward-Port-Of: odoo/enterprise#19436
This reverts commit d5ae2245ee5b3c9b70a384608542041ed8218fba Package dimensions are encoded with integers and in meters, so users are forced to use packages of minimum 1x1x1 meter. Without the fix, the UoM used in the requests sent to UPS will be the one configured on the carrier's form. Forward-Port-Of: odoo/enterprise#19534 Forward-Port-Of: odoo/enterprise#19517
Original PR description
This reverts commit d5ae2245ee5b3c9b70a384608542041ed8218fba Package dimensions are encoded with integers and in meters, so users are forced to use packages of minimum 1x1x1 meter. Without the fix, the UoM used in the requests sent to UPS will be the one configured on the carrier's form. Forward-Port-Of: odoo/enterprise#19534 Forward-Port-Of: odoo/enterprise#19517
When the tests are executed, we should not contact the web-service and therefore mock the calls to the web-services. Before this commit, not all tests were correctly mocked. Forward-Port-Of: odoo/enterprise#19522
Original PR description
When the tests are executed, we should not contact the web-service and therefore mock the calls to the web-services. Before this commit, not all tests were correctly mocked. Forward-Port-Of: odoo/enterprise#19522
Before this commit, we were using the first bank account set on the partner associated to the payment for which we are generating the XML file. We should use the bank account set on the payment itself to avoid inaccuracies in case multiple bank accounts are set on the partner. opw-2573113 Forward-Port-Of: odoo/enterprise#19540 Forward-Port-Of: odoo/enterprise#19463
Original PR description
Before this commit, we were using the first bank account set on the partner associated to the payment for which we are generating the XML file. We should use the bank account set on the payment itself to avoid inaccuracies in case multiple bank accounts are set on the partner. opw-2573113 Forward-Port-Of: odoo/enterprise#19540 Forward-Port-Of: odoo/enterprise#19463
- Have a [DEMO] product: - Tracket by SN - Manufactured - The BOM for [DEMO] has: - product [COMPONENT] tracked by lot - At least an operation - Add at least 1 lot with 2 units to [COMPONENT] - Create a manufacturing order for [DEMO], specifying 2 units to produce - Confirm, check availability - In Workorders tab start the production and go to tablet mode - Assign the serial to [DEMO], change the lot of [COMPONENT] to a new lot, then mark as done Error will raise opw-257
Original PR description
- Have a [DEMO] product: - Tracket by SN - Manufactured - The BOM for [DEMO] has: - product [COMPONENT] tracked by lot - At least an operation - Add at least 1 lot with 2 units to [COMPONENT] - Create a manufacturing order for [DEMO], specifying 2 units to produce - Confirm, check availability - In Workorders tab start the production and go to tablet mode - Assign the serial to [DEMO], change the lot of [COMPONENT] to a new lot, then mark as done Error will raise opw-2577094 Forward-Port-Of: odoo/enterprise#19490
The format for this export changed in 2021. The specification of what changed can be found here: https://www.agenciatributaria.es/AEAT.internet/Inicio/Ayuda/Disenos_de_registro/Modelos_300_al_399/Modelos_300_al_399.shtml The file format should be fixed without even updating the module. For a more complete feature, people can update l10n_es_reports, to view the new report lines, and install the new module l10n_es_reports_2021 (which will have to be merged with l10n_es_reports in master later o
Original PR description
The format for this export changed in 2021. The specification of what changed can be found here: https://www.agenciatributaria.es/AEAT.internet/Inicio/Ayuda/Disenos_de_registro/Modelos_300_al_399/Modelos_300_al_399.shtml The file format should be fixed without even updating the module. For a more complete feature, people can update l10n_es_reports, to view the new report lines, and install the new module l10n_es_reports_2021 (which will have to be merged with l10n_es_reports in master later on). This module adds fields in the BOE and mod 303 wizards to allow manually setting of the new report lines' value. OPW 2496289, 2411661 Forward-Port-Of: odoo/enterprise#19480 Forward-Port-Of: odoo/enterprise#19052
Forward-Port-Of: odoo/enterprise#19510 Forward-Port-Of: odoo/enterprise#18914
Original PR description
Forward-Port-Of: odoo/enterprise#19510 Forward-Port-Of: odoo/enterprise#18914
Problem: Traceback occurs when in projects - tasks - Gant View if you group by assigned to then project. This only occurs if there is no tasks that are unassigned if 1 task is unassigned it works as it should. Solution: Use an empty array by default instead of sending undefined OPW-2587882 Forward-Port-Of: odoo/enterprise#19515 Forward-Port-Of: odoo/enterprise#19445
Original PR description
Problem: Traceback occurs when in projects - tasks - Gant View if you group by assigned to then project. This only occurs if there is no tasks that are unassigned if 1 task is unassigned it works as it should. Solution: Use an empty array by default instead of sending undefined OPW-2587882 Forward-Port-Of: odoo/enterprise#19515 Forward-Port-Of: odoo/enterprise#19445