Monday, May 15, 2023
24 changes · master
New functionality added to Odoo
Adds new spreadsheet dashboards for subscription sales, including views focused on overall subscriptions and salesperson performance. This helps business teams monitor recurring revenue activity and sales effectiveness more easily from ready-made dashboards.
This adds Thailand-specific reporting tools for sales and purchase audit journals, plus CSV tax reports for PND3 and PND53 filings. Businesses operating in Thailand can more easily produce required local tax and audit documentation from Odoo.
Original PR description
Description of the issue/feature this PR addresses: Thailand localization report requirements: - 2 excel report files for sale/purchase audit journal - 2 csv report files for tax report related to PND3 and PND53 2879718, 2895669 -- I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr)
Enhancements to existing features
The subscription app now uses the required permissions when checking payment transaction records. This keeps subscription payment processing compatible with recent platform access changes and helps avoid interruptions for users.
Original PR description
This commit adapts the subscription module to the new access rules for the model `payment.transaction` made on the community PR. See https://github.com/odoo/odoo/pull/113515 for more information. Task - 3102824
Resolved issues and error corrections
This change fixes an unreliable automated test in the subscription renewal area that could fail unpredictably. It helps keep the development and release process smoother by reducing false test failures unrelated to customer-facing behavior.
Original PR description
Before this commit, the following error could happen: ``` FAIL: TestSubscription.test_renew_different_currency Traceback (most recent call last): File…
Before this commit, the following error could happen:
```
FAIL: TestSubscription.test_renew_different_currency
Traceback (most recent call last):
File "/data/build/enterprise/sale_subscription/tests/test_sale_subscription.py", line 2555, in test_renew_different_currency
self.assertEqual(renew_data,
AssertionError: Lists differ: [('1_expansion', datetime.date(2023, 4, 29),[108 chars]4,))] != [('3_transfer', FakeDate(2023, 4, 29), 200, [90 chars]4,))]
First differing element 0:
('1_expansion', datetime.date(2023, 4, 29), 400.0, 600.0, res.currency(124,))
('3_transfer', FakeDate(2023, 4, 29), 200, 200, res.currency(124,))
+ [('3_transfer', FakeDate(2023, 4, 29), 200, 200, res.currency(124,)),
- [('1_expansion', datetime.date(2023, 4, 29), 400.0, 600.0, res.currency(124,)),
? ^ ^ ^ ^^^^^^ -- -- ^
+ ('1_expansion', FakeDate(2023, 4, 29), 400, 600, res.currency(124,))]
? ^ ^ ^ ^ ^
- ('3_transfer', datetime.date(2023, 4, 29), 200.0, 200.0, res.currency(124,))]
```Code cleanup and technical improvements
The Peruvian electronic delivery guide module now includes support for SUNAT's newer delivery guide API, replacing the deprecated older setup. This keeps delivery guide sending usable for Peruvian companies and improves the related configuration, messages, and translations.
Original PR description
In 16.0, the module `l10n_pe_edi_stock_20` was written to support sending delivery guides via the new SUNAT API. The old API is now deprecated, so `l10n_pe_edi_stock` on its own is useless. We are therefore merging the two modules. Task: 3146160 Upgrade PR: https://github.com/odoo/upgrade/pull/4291
Miscellaneous changes
Steps: 1. Go to general settings > enable the option variants. 2. Go to sale application > configuration > attributes > create an attribute for any subscription product 3. Go to products > create new service product > define attributes and values > under the time based pricing tab define period and price > Publish it. 4. Go to website application > shop page > search for that subscription product > select any variant > add and go to cart. Issue: The price is always the same as
Original PR description
Steps: 1. Go to general settings > enable the option variants. 2. Go to sale application > configuration > attributes > create an attribute for any subscription product 3. Go to products > create new service product > define attributes and values > under the time based pricing tab define period and price > Publish it. 4. Go to website application > shop page > search for that subscription product > select any variant > add and go to cart. Issue: The price is always the same as the first variant's price. Cause: When trying to get the product pricing, when there are multiple matches, we just return the first without checking if there is one with the current product in the list of variants. opw-3254502 Forward-Port-Of: odoo/enterprise#40644
The planning workflow now labels the previous “Plan orders” action as “Auto Plan” and uses it to automatically assign available resources to open shifts and related sales orders. Assignments consider role fit, time off, availability, conflicts, and workload, helping teams fill schedules faster while avoiding overbooking.
Original PR description
- Change "Plan orders" button's label to "Auto Plan". - This button should assign resources to open shifts: \- same default role > same role \- not on time off \- if not flexible, in their calendar availabilities \- not in conflict with their shifts \- no subsequent overload. - Change the toast notification: \- Success : "Open shifts and sales orders have successfully been assigned." \- Failure : "All open shifts and sales orders have already been assigned, or there are no resources available to take them." task-2959882
Users can now share Odoo spreadsheets with external or internal recipients while controlling what data is exposed. External viewers receive a read-only frozen copy so they see the shared values without needing database access, and shared spreadsheet files can be included in portal zip downloads.
Original PR description
This commit allows to share spreadsheets to other users (public, portal or internal without the required access rights) The challenges of sharing odoo spreadsheets…
This commit allows to share spreadsheets to other users (public, portal or internal without the required access rights) The challenges of sharing odoo spreadsheets ------------------------------------------- Odoo spreadsheets can have any data from the database. ODOO.PIVOT and ODOO.LIST functions specifically can target *any model* and *any field*. The values are dynamically loaded with RPC calls when the spreadsheet is open. Normal access rights apply to load this kind of "embeded" data. A user can open a spreadsheet if he can read the `documents.document` record, but odoo specific functions might result in errors if the user doesn't have the access rights on the underlying model. That's obviously not what we want when sharing a spreadsheet to an external person. We want this person to see the values and not a spreadsheet full of errors. Giving access to external user? --------------------------------- Users must have a very clear understanding what they are "leaking" when they share a spreadsheet. Sharing a spreadsheet should not open any door the user wouldn't think of or wouldn't understand. The best way is to be very strict with the data we are sharing. That means: only the specific models, specific fields and specific records visible in the spreadsheet by the user who is sharing (different users can see different values for the same spreadsheet, depending on their access rights). We also want to consider the following scenario: Alice is a newcomer (with very limited access rights) and she shares a spreadsheet to a customer. A few years later, she is manager and has a lot more access rights (groups, ir.rules, etc.). The forgotten spreadsheet shared years ago should not leak more data because Alice now has access to all company data. Specification ============= With all those challenges in mind, here is a first approach of shared spreadsheet: Readonly freezed spreadsheet for external users ----------------------------------------------- When sharing a spreadsheet, we actually copy and freeze the spreadsheet at that time. Odoo formulas are replaced with their value. This is the easiest and safest way to deal with access rights to other models: there's no access to other models at all ^^ The spreadsheet is displayed in readonly since it would only be editing a copy. If the external person wants data to be updated, he can ask a new sharing link. Read/Write for internal users ----------------------------- The situation for internal users is different. We can rely on their actual access rights. When an internal user opens a spreadsheet sharing link, he is redirected to the regular spreadsheet client action. A token is used to read/write the `documents.document` record (and other linked models such as `spreadsheet.revision`), but the data for pivots, lists, etc. is loaded with the user's own access rights. If the user doesn't have the rights to read a model or field, the function results in an error and that's the expected behavior. This sharing strategy is perfectly fine for all spreadsheets that doesn't contain any odoo data (think of all the Google Sheets we receive internally by email to register to an event or any other stuff). Future work ----------- From a functional point of view, the spec is far from perfect. Users would probably expect the data to "update" itself (not freezed). People will want write access for external users as well. Given the complexity of getting it right (from a tecnical, security and functional POV), this is left for a later work Technical notes --------------- The excel file is saved along with the freezed spreadsheet. We could export the spreadsheet as excel, on demand, from the portal (as save a bit of storage) but it would require to make the `/spreadsheet/xlsx` route public to zip the generated files to the excel file. And I don't want to do that. Changes in the generic `spreadsheet_edition` module allows to easily implement sharing for other business objects, such as spreadsheet dashboards. Task: 3045808 community https://github.com/odoo/odoo/pull/114040
The appointment onboarding setup now includes image filenames so uploaded images can be displayed without showing unnecessary file size details. This creates a cleaner onboarding experience for users setting up appointment features.
Original PR description
Used to not show file size on the file widget. Also, image filenames are changed in COM PR. Task-3297572
The spreadsheet features were updated to a newer library version, bringing refinements and reliability improvements. This helps users working with spreadsheet documents and pivot views benefit from the latest improvements without changing their workflow.
Original PR description
…-alpha.8
This fixes an intermittent automated test issue in Odoo Studio by ensuring the test selects the intended activity field option. The change helps reduce false test failures and improves confidence in future Studio updates without changing user-facing behavior.
Original PR description
Before this commit, sometimes but rarely, the test_rename tour selected account.account to make a many2many relation and enabled "color" on that field. That color field (or rather, label) conflicted with consolidation_color. Without being able to reproduce, I have a possible explanation. In tours, the "text" command first does a click on the target element, then writes text and then fires input and change events. In the many2one field widget, the first click triggers a first name_search that, if it returns in time, may bypass the input and trigger the next step of the tour intempestively. If the next step doesn't test for the values available in the many2one's dropdown, it way then succeed without having selected the value we wanted. Hence this commit, makes the tour wait for a precise name_search value, then clicks on the one we want. We hope that the undeterministic issue is gone after that.
Point of Sale test scenarios now run with dedicated standard and administrator demo users instead of a generic accounting user. This makes it clearer which permissions each Point of Sale workflow actually needs, reducing the risk of permission issues being missed during testing.
Original PR description
Before the PoS tours were mainly run with the `accountman` user, which did not allow us to have a clear view of the permissions required for each function of the Point of Sale. Now, two users have been created for the PoS: - `pos_user` - `pos_admin` The first one has no particular permission, he is a normal user of the Point of Sale and Odoo, the second one is an administrator of the Odoo application. If the user `pos_user` is used and some permissions are missing in a tour, these are added to the user with starting the test.
Users generating coupons or gift cards from helpdesk sales now receive a confirmation when they enter a validity or expiration date in the past. This helps prevent accidental creation of already-expired discounts, coupons, or gift cards while still allowing intentional exceptions.
Original PR description
Before commit : ---------------------------------------------------- In helpdesk sale loyalty Discount & Loyalty we allow to set previous Validity and the same with generate coupons Valid Until and gift card Expiration date. After commit : ----------------------------------------------- If the user sets the previous validity, Valid Until and expiration date then takes a confirmation. task-2975858
Fixed an issue where adding an external embedded view to a Knowledge article could crash the app. The editor now places the embed correctly at the end of the article, improving reliability for users working with embedded content.
Original PR description
This commit fixes a bug where inserting an external view inside a Knowledge article could lead to a crash of the application. This bug is caused by the rendering of data templates that includes `\n` chars in their rendering, meaning that the HTML body of the rendered data articles contained undesired characters that should not be present inside an HTML field. These undesired characters were then taken into account when using the function `setCursorEnd` with normalize set to true. The editor tried to insert the view/link inside the textNode containing `\n`, which leads to an unwanted behavior inside the editor that tries to add the view/link to the text node. Now before inserting the view we set the cursor to the end of the article so that the container selected by the editor is indeed the full body of the article. task-3288551
The Website Studio form manager has been updated to a newer interface framework. This keeps the form-building experience maintainable and aligned with current Odoo technology without changing the core business workflow.
The grid view’s navigation button template was moved to the file that now owns that behavior, keeping the code structure aligned with the current design. An unused range button template was also removed, reducing maintenance overhead without expected user-facing changes.
Original PR description
Since the commit odoo/enterprise@0cf0f1107a1c60d1df382e302d218c291f49ec79 the web_grid.NavigationButtons logic has been moved into the renderer of the view. This commit take the template and move it where it should be. Also, we remove the `web_grid.RangeButtons` template as its seems to not be used by no one.
This update adjusts how internal callbacks are passed into shared view components, keeping enterprise features aligned with recent platform changes. Users should not see functional changes, but it helps maintain compatibility in areas such as accounting reconciliation and knowledge embedded views.
Original PR description
The callback recorders have now to be passed as optional props to the View component (see https://github.com/odoo/odoo/pull/121050). We adapt the enterprise code to that change.
This change updates automated tests to match a cleaner attachment link format introduced elsewhere. It helps keep accounting and document workflows reliably covered without changing day-to-day user behavior.
Original PR description
https://github.com/odoo/odoo/pull/121256
The abandoned cart indicator used in sales reporting has been moved into the core eCommerce module. This makes abandoned cart data available for the eCommerce dashboard in the community edition, improving visibility without requiring the enterprise dashboard module.
Original PR description
Task 3222991
This work restructures internal handling of actions, views, and search behavior across several Odoo Enterprise apps. It should make future improvements easier and more consistent, with limited direct change for day-to-day users while the work remains in progress.
Original PR description
Work in progress PR to simplify the API of actions/views/searchModel. community: https://github.com/odoo/odoo/pull/105937
### Bug When the `sale_loyalty_taxcloud` is installed and 'Lock Confirmed Sales' is enabled, confirming a SO impossible. ### Setup - install `sale_management` and `sale_loyalty_taxcloud` - activate Taxcloud (with test credentials) - enable 'Lock Confirmed Sales' in the settings ### Steps to reproduce - create a quotation, fill the necessary fields and add a product - in the 'Other Info' tab, set the fiscal position to 'Automatic Tax Mapping (TaxCloud)' - attempt to confirm the quota
Original PR description
### Bug When the `sale_loyalty_taxcloud` is installed and 'Lock Confirmed Sales' is enabled, confirming a SO impossible. ### Setup - install `sale_management` and `sale_loyalty_taxcloud` - activate Taxcloud (with test credentials) - enable 'Lock Confirmed Sales' in the settings ### Steps to reproduce - create a quotation, fill the necessary fields and add a product - in the 'Other Info' tab, set the fiscal position to 'Automatic Tax Mapping (TaxCloud)' - attempt to confirm the quotation You should be met with a message stating that you can't modify the tax on a locked order. ### Cause This issue was introduced by odoo/enterprise@ea954b8 Community PR: odoo/odoo#120998 opw-3289657 Forward-Port-Of: odoo/enterprise#40952 Forward-Port-Of: odoo/enterprise#40880
…midnight Before this commit, the test could fail with the following traceback: ``` FAIL: TestSubscriptionController.test_automatic_invoice_token Traceback (most recent call last): File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 154, in test_automatic_invoice_token subscription = self._portal_payment_controller_flow() File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 231, in _portal_payment_c
Original PR description
…midnight
Before this commit, the test could fail with the following traceback:
```
FAIL: TestSubscriptionController.test_automatic_invoice_token
Traceback (most recent call last):
File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 154, in test_automatic_invoice_token
subscription = self._portal_payment_controller_flow()
File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 231, in _portal_payment_controller_flow
self.assertEqual(subscription.invoice_ids.mapped('state'), ['posted', 'draft'])
AssertionError: Lists differ: ['draft', 'posted'] != ['posted', 'draft']
First differing element 0:
'draft'
'posted'
- ['draft', 'posted']
+ ['posted', 'draft']
```
Forward-Port-Of: odoo/enterprise#41037Steps to reproduce: - Create two assets - Set an analytical distribution to one of the asset - Go on "Depreciation Schedule" report - Set the analytical filter Issue: - No filter is applied Cause: The analytic account is not taken into account in the query fetching the data Solution: Inspired from the ledger report in which the compute of the `where` clause https://github.com/odoo/enterprise/blob/b54a971d50c136a24bb65fc956cada5869075fbf/account_reports/models/account_general_ledg
Original PR description
Steps to reproduce: - Create two assets - Set an analytical distribution to one of the asset - Go on "Depreciation Schedule" report - Set the analytical filter Issue: - No filter is applied Cause: The analytic account is not taken into account in the query fetching the data Solution: Inspired from the ledger report in which the compute of the `where` clause https://github.com/odoo/enterprise/blob/b54a971d50c136a24bb65fc956cada5869075fbf/account_reports/models/account_general_ledger.py#L203 includes the the analytic account https://github.com/odoo/enterprise/blob/4cf8213f88f5eee45382386a3389e51cb2b75f4b/account_reports/models/account_analytic_report.py#L168-L179 opw-3200519 Forward-Port-Of: odoo/enterprise#40974 Forward-Port-Of: odoo/enterprise#40883
The setUpClass in class TestAgedReceivableReport copies the receivable account with the .copy() method. If we are working with a CoA that uses account code with no integer format E.g. 0.112001 it can't duplicate correctly applying increments. Proposed solution: Change the method copy by `copy_account` Forward-Port-Of: odoo/enterprise#40480
Original PR description
The setUpClass in class TestAgedReceivableReport copies the receivable account with the .copy() method. If we are working with a CoA that uses account code with no integer format E.g. 0.112001 it can't duplicate correctly applying increments. Proposed solution: Change the method copy by `copy_account` Forward-Port-Of: odoo/enterprise#40480