Monday, October 9, 2023
22 changes · master
New functionality added to Odoo
Users can now view the full edit history of spreadsheets, including dashboards and templates. They can return to an earlier version, restore it as a new copy, and name revisions to better organize important milestones.
Original PR description
This commits adds the possibility for the users to consult the whole edition history of their spreadsheets (which therefore includes dashboards and templates as well). Upon consultation, the users will be able to jump back to a previous state of the spreadsheet and to restore that state in the form of a new copy of the spreadsheet. They will also have the possibility to name/rename the revisions (i.e. modification steps) to organise their history at their will. Task: 3142006
Enhancements to existing features
Financial report PDFs now better match what users see on screen, with cleaner formatting and fewer unnecessary interface elements. The update also improves readability in Belgian reports, cash flow statements, journal reports, asset reports, and partner ledger outputs.
Original PR description
During the html and css change (https://github.com/odoo/enterprise/commit/2d774344109c2f9b55d9ea6160ae99aeca4f0420), the PDF were not modified. This PR will improve the different pdf of reports. Also this PR correct a UI problem on the cash flow statement. task: 3437257
Code cleanup and technical improvements
This update modernizes internal web request handling code across several Odoo Enterprise apps. It reduces outdated implementation patterns, making future maintenance easier without changing expected user-facing behavior.
Miscellaneous changes
The sale order report (and other reports) generated in the portal page does not render the images that could have been added with Studio Steps to reproduce: 1. Install Sales and Studio 2. Go to Sales and open any quotation 3. Toggle Studio and add an image field anywhere in the form 4. Go to reports and edit "Quotation / Order" 5. Add the new image field in the report and close Studio 6. Create a quotation for Joel Willis, add an image and a product 7. Send the quotation by mail 8. Op
Original PR description
The sale order report (and other reports) generated in the portal page does not render the images that could have been added with Studio Steps to reproduce: 1. Install Sales and Studio 2. Go to Sales…
The sale order report (and other reports) generated in the portal page does not render the images that could have been added with Studio Steps to reproduce: 1. Install Sales and Studio 2. Go to Sales and open any quotation 3. Toggle Studio and add an image field anywhere in the form 4. Go to reports and edit "Quotation / Order" 5. Add the new image field in the report and close Studio 6. Create a quotation for Joel Willis, add an image and a product 7. Send the quotation by mail 8. Open the sent mail (Settings > Technical > Email > Emails) 9. Open the sale order link in a new incognito tab 10. Download the sale order with the button at the top left of the page 11. The report doesn't contain the image Solution: Add the attribute `qweb_img_raw_data` on binary fields created in Studio in order to render the images as raw data directly in the html Problem: When generating the html that will be used to render the pdf, the image field is rendered with a src url. This url will then be resolved in the content_image route but the user is public so he has no rights on the field. Hence, the placeholder image is returned. opw-3100989 Forward-Port-Of: odoo/enterprise#47117 Forward-Port-Of: odoo/enterprise#46400
Spreadsheet global filters now handle month, quarter, and year selections more flexibly, avoiding results being limited to the current year when saved. Relation filters can also automatically select the current user where relevant, making personalized spreadsheet views easier to use.
Original PR description
Previously, when users selected the month or quarter filter and saved it, the filter would only return data from the current year. This issue has been fixed in this commit. Merge the month and…
Previously, when users selected the month or quarter filter and saved it, the filter would only return data from the current year. This issue has been fixed in this commit. Merge the month and quarter data filters into a single month/quarter filter. This will allow users to select a year which behave as year filter. If a user only selects a month or quarter, the filter will work accordingly. The year filter will be removed, as the month/quarter filter can now be used to filter data by year. In addition, a checkbox will be added to the relation filter that will allow users to automatically select the current user. This checkbox will only be displayed if the model is res.users. Task ID: 3370627 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 rresponding to that user. 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
Accounting teams can now choose separate handling modes for deferred revenues and deferred expenses, matching different business workflows for customer invoices and vendor bills. The update also improves auditability by showing grouped journal items for deferrals and prevents account changes that could disrupt existing deferred balances.
Original PR description
### [[FIX] account_reports: pass deferred type in options](https://github.com/odoo/enterprise/pull/48022/commits/24d4789fa1228c724d10daa3fb11c43f74ed0929) It seems the deferred type (revenue of…
### [[FIX] account_reports: pass deferred type in options](https://github.com/odoo/enterprise/pull/48022/commits/24d4789fa1228c724d10daa3fb11c43f74ed0929) It seems the deferred type (revenue of expense) was not correctly passed in the options to the JS view, which caused the action to view existing deferral entries to always show these of the revenues (the default option). ### [[IMP] account_*: separate modes for deferred expenses and revenues](https://github.com/odoo/enterprise/pull/48022/commits/67ca6d4930631b4f92575c93e576fc2b25ecbaff) *account_accountant,account_reports Currently one deferral mode can be selected for both deferred expenses and deferred revenues. Either the deferrals are created on validation, when the invoice/bill is posted (perfect when you don't have a lot of deferrals per month), or a grouped deferral entry is created manually by the user periodically (interesting when you have a lot of deferrals per month). Realistically the situation of a company is not the same concerning customer invoices and vendor bills. They might generate lots of customer invoices with deferrals, wanting a manual grouped entry. But on the other hand they might not have a lot of vendor bills with deferrals, so don't want to create a manual entry for this every month. In order to facilitate this, we now allow to select a different mode for both deferred revenues and deferred expenses. ### [[IMP] account_accountant: prevent account change of deferred line](https://github.com/odoo/enterprise/pull/48022/commits/aabde63ba57c5998d16a3c63c5778e89b95e4971) When opening the list view of journal items, a user can use multi-select to change the account of one or more lines. In the case where we have lines that are already deferred, changing the account would break the balance deferred by the already existing deferral moves. In order to prevent this, we don't allow changing the account of a line that is already deferred. ### [[IMP] account_*: show grouped journal items for deferrals](https://github.com/odoo/enterprise/pull/48022/commits/1e4ba5f5ad570c13f734ad758fc1cea16c891fc9) *account_accountant,account_reports Smart buttons allow navigating between invoices/bills and their deferral moves. When clicking a smart button, a list of moves is shown. In order to audit deferrals and their original invoices, you have to open every move separately, which makes it very inconvenient. In order to easy auditability and get an instant overview of what happens with the deferrals, we now show a list of journal items grouped by move. Related to https://github.com/odoo/upgrade/pull/5200 task-3516660
This update standardizes how activity plans are created and scheduled across several business areas, allowing users to apply activities or plans to multiple records through the newer scheduling flow. It also moves HR contract signing and subscription workflows onto the shared activity plan system, reducing duplicated behavior and making future improvements more consistent.
Original PR description
We apply the necessary changes following the generalization of the hr activity plan to any model (see odoo/odoo#134007). By introducing a new wizard that allows to create activity and apply plan on multiple records at once, we have introduced a new (ui) way to create activity. We apply here the same changes done on the activity form that was formerly used to create activity to the wizard that is now in charge of it. [IMP] various: convert hr.plan to mail.activity.plan Then we convert the custom hr plan implementation to use the generic one. Task-3390865
The Send & Print flow for Mexican electronic invoices now includes a Download option in list view. When selected, it processes immediately and provides a zip file with all generated or previously generated documents, replacing the separate Download Electronic Invoice action.
Original PR description
1. Add the "Download" option back into the Send & Print in list view 2. If the "Download" option is ticked, the Send & Print is run synchronously. 3. "Download" returns a zip containing all documents that are generated (or previously generated) 4. Remove completely "Download Electronic Invoice" Task-id: 3525932 Community: https://github.com/odoo/odoo/pull/137382
Spreadsheet exports now preserve dynamic filters such as today's date or the current user instead of converting them into fixed values. This keeps embedded views like activities, pipelines, charts, lists, and pivots accurate over time without manual updates.
Original PR description
Purpose
-------
Currently, views with a contextual filter/domain are not well managed: e.g.
Today Activities
=> domain=[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'>
My pipeline
=> domain=[('user_id', '=', uid)]
Currently, 'context_today().strftime('%Y-%m-%d')' or 'uid' would be replaced by
their values when the view is inserted into a spreadsheet.
If the view is inserted on the 1st June 2023, the date "01/06/2023" is
hard-coded in the spreadsheet.
Specification
-------------
Preserve the domain dynamic parts when inserted into a spreadsheet.
Task: 3414027The referral application status label now has enough spacing to display clearly. This small visual improvement makes status information easier for users to read at a glance.
Original PR description
[IMP] hr_referral: make status readable The padding of the status pill is not enough to display the status correctly. task-3498668
Documents now has a dedicated Trash area for archived files, replacing the old archived filter and making recovery easier. Deleted folder contents move to Trash, archived items can be restored with their workspaces, and trashed documents are automatically removed after the configured retention period.
Original PR description
This commit introduces the following changes : - Introduced a new Trash folder(fake folder) within the documents views. This folder is designed to contain any file that has been archived from any…
This commit introduces the following changes : - Introduced a new Trash folder(fake folder) within the documents views. This folder is designed to contain any file that has been archived from any other folder. - The archived filter has been removed. We now encourage users to utilize the Trash folder for this purpose instead. - Documents that are archived will now be automatically deleted after a span of 30 days. - When a user opts to delete a folder, the system will no longer offer the option to move its files to the parent folder. Instead, all the content from the deleted folder will be moved directly to the trash. - In the event a folder is deleted, it will be archived and will no longer be displayed in the search panel. The documents from this folder will be relocated to the trash, and any child folders will be archived in the same manner. - If a folder is archived and doesn't have any documents (be it active or inactive) linked to it, nor any child folder (that respect the same rules), the folder will be automatically deleted. - When a document is restored from the Trash, and its original folder has been archived, the system will restore the folder as well. If this folder had a parent, it will be restored as its child. If not, it will be placed as a root folder. - It's no longer possible to manually delete archived folders from the folder list view. This change was implemented since these archived folders might still have connections with archived documents in the Trash. As a result, the delete action has been made invisible for these folders. - A new filter for archived folders has been added to the folder list views for better user navigation. - It is possible to restore workspaces from the workspace list/form view. When restoring a workspace, all the documents and children folders linked to that workspace are restored as well. Remark: The Trash folder, labeled as a 'fake' folder, has been assigned an id="Trash". It isn't linked to any specific model but is designed to allow the search model to fetch inactive files. The decision to assign it an id="Trash" was influenced by the searchPanel's requirement for unique rootIds. TaskId-3046516 Co-authored-by: William Braeckman ( <wbr@odoo.com> )
Financial reports will now show the same totals to every user who has access to the report, regardless of individual record visibility rules. Users may see the impact of restricted records in report totals, but they still cannot open records they are not authorized to view.
Original PR description
Description of the issue/feature this commit addresses: The computation of the queries used for the data that will be shown by a report currently takes into account the record rules and uses them to…
Description of the issue/feature this commit addresses: The computation of the queries used for the data that will be shown by a report currently takes into account the record rules and uses them to adapt the query. This means that it could be possible that two users see different totals in a report since their record rules would not allow them to see all the data that is included in the complete report. It is debatable but record rules should not impair the data shown in a report. If the user has access to the report, he should be able to read it entirely (for example: regardless to the invoices he can read). --- Desired behavior after the commit is merged : This commit removes the inclusion of the record rules in the calculation of the query that a report will need to display its data. This means two thing: * The first is that ALL users that have access to a specific report will see the exact same data inside it. * The second is that users with record rules that would make it impossible for them to read specific data wan now see their impact on a report. If they try to open said data, they will have a message telling them they are not allowed to retrieve it but they will still be taken into account in the report they are consulting. Adding this improvement, record rules are no longer taken into account for report queries calculation. --- Post modification testing notes : This PR removes a line of the _query_get() method which purpose was to apply the record rules to the query before using it, a line using the _apply_ir_rules() method on the query. A comment was attached to that line explaining that it was applying ir rules to the query to avoid bypassing company access rights. After the modification, multiple tests were made in order to see if company access rights were bypassed in certain scenarios and data of "Company One" would be found in the reports of "Company Two". No specific set of user, groups, companies and record rules was able to produce such a behavior and debugging the _query_get() method would reveal that the exclusion of company restricted data would be applied to the query by the _where_calc(domain) method. With all the information gathered taken into account, it is believe most probable that no company restricted data would become available inside other companies' reports and the removal of this line can be done with no negative impact on the queries' quality. task-3347860
This change updates internal record selection components used in Accounting Reports and Studio to better match their purpose. Users should see the same overall workflows, with cleaner and more maintainable selection behavior behind the scenes.
Since odoo/odoo#109661 partial payments can confirm SO/subscriptions. For subscriptions, we have to force auto-invoice in this situation instead of waiting for the cron to invoice it with the risk of charging customer twice (as we do with payments in the portal). task-id : 3366756 Forward-Port-Of: odoo/enterprise#45572 Forward-Port-Of: odoo/enterprise#42925
Original PR description
Since odoo/odoo#109661 partial payments can confirm SO/subscriptions. For subscriptions, we have to force auto-invoice in this situation instead of waiting for the cron to invoice it with the risk of charging customer twice (as we do with payments in the portal). task-id : 3366756 Forward-Port-Of: odoo/enterprise#45572 Forward-Port-Of: odoo/enterprise#42925
To calculate the sum of the discounts and obtain the total for the EDI, the discount was recalculated considering the unit price. This calculation is wrong when we have a tax with the configuration of 'included in the price'. We fixed the calculation of the total discount using the '_l10n_ec_prepare_edi_vals_to_export_USD' method that returns the discount per line, in this way in the EDI both the total discount value matches the values in the lines Forward-Port-Of: odoo/enterprise#46361
Original PR description
To calculate the sum of the discounts and obtain the total for the EDI, the discount was recalculated considering the unit price. This calculation is wrong when we have a tax with the configuration of 'included in the price'. We fixed the calculation of the total discount using the '_l10n_ec_prepare_edi_vals_to_export_USD' method that returns the discount per line, in this way in the EDI both the total discount value matches the values in the lines Forward-Port-Of: odoo/enterprise#46361
Steps to reproduce: - Install sendcloud carrier and eCommerce - Create a new shipping method (with sendcloud as provider) - Enable other shipping method - visit /shop and cable box to cart and process to checkout Bug: user error page (delivery from US is not supported) Fix: if other carriers are avialable user should be able to proceed similar to "bpost_rate_shipment" Forward-Port-Of: odoo/enterprise#47550
Original PR description
Steps to reproduce: - Install sendcloud carrier and eCommerce - Create a new shipping method (with sendcloud as provider) - Enable other shipping method - visit /shop and cable box to cart and process to checkout Bug: user error page (delivery from US is not supported) Fix: if other carriers are avialable user should be able to proceed similar to "bpost_rate_shipment" Forward-Port-Of: odoo/enterprise#47550
When looking for a sales price and no product.pricing is found matching the product, recurrence, currency and price list the fallback must use the product variant sales price (product.product.lst_price) instead of the product template sales price (product.template.list_price), as the lst_price is computed using list_price of the template + price_extra of the variant. Forward-Port-Of: odoo/enterprise#42514
Original PR description
When looking for a sales price and no product.pricing is found matching the product, recurrence, currency and price list the fallback must use the product variant sales price (product.product.lst_price) instead of the product template sales price (product.template.list_price), as the lst_price is computed using list_price of the template + price_extra of the variant. Forward-Port-Of: odoo/enterprise#42514
Steps to reproduce: - Install eCommerce and sendcloud delivery - Add new shipping methods with sendcloud as provider and mondial relay 0/0.5/1/2 Kg - Add an item below 0.5Kg weight to the cart and proceed to checkout Bug: delivery product with minimum weight above the order are still displayed opw-3432905 Forward-Port-Of: odoo/enterprise#47579
Original PR description
Steps to reproduce: - Install eCommerce and sendcloud delivery - Add new shipping methods with sendcloud as provider and mondial relay 0/0.5/1/2 Kg - Add an item below 0.5Kg weight to the cart and proceed to checkout Bug: delivery product with minimum weight above the order are still displayed opw-3432905 Forward-Port-Of: odoo/enterprise#47579
Currently, if we have a really huge amount of `original_moves`, fetching their `deferred_move_ids` to add the newly created deferral entries will result in a MemoryError. This commit fixes this by creating the relation between the original deferred move and its deferral entry in SQL instead which speeds up the process. task-id 3349785 Forward-Port-Of: odoo/enterprise#48480
Original PR description
Currently, if we have a really huge amount of `original_moves`, fetching their `deferred_move_ids` to add the newly created deferral entries will result in a MemoryError. This commit fixes this by creating the relation between the original deferred move and its deferral entry in SQL instead which speeds up the process. task-id 3349785 Forward-Port-Of: odoo/enterprise#48480
Issue: ====== When an employee have canteen cost it doesnt show in the details of net salary. Steps to reproduce the error : ============================== - Install l10n_be_hr_contract_salary - Select My belgian company - Go to employees and select Laurie - Select in Contract Since smart button - Go to salary information and add a canteen cost - Click on generate offer and click save - Go to the created link in the offer form. - Click on details on net - There is no canteen cost
Original PR description
Issue: ====== When an employee have canteen cost it doesnt show in the details of net salary. Steps to reproduce the error : ============================== - Install l10n_be_hr_contract_salary - Select My belgian company - Go to employees and select Laurie - Select in Contract Since smart button - Go to salary information and add a canteen cost - Click on generate offer and click save - Go to the created link in the offer form. - Click on details on net - There is no canteen cost Solution: ========= In the override of the function , l10n_be_canteen _cost is always set to False , updating it with the value in the contract solved the problem. opw-3536125 Forward-Port-Of: odoo/enterprise#48466
### Steps - Log in as Marc Demo. - Upload a template and add elements. - Log out and log in with Mitchell. - Open the template (everything is ok, added elements appear). - Sign it, then open the template again. ### Issue The elements have disappeared but when log in with Marc Demo, they are there. ### Reason Security issue. BackPort-of: https://github.com/odoo/enterprise/pull/46087 opw-3520444 Forward-Port-Of: odoo/enterprise#48287
Original PR description
### Steps - Log in as Marc Demo. - Upload a template and add elements. - Log out and log in with Mitchell. - Open the template (everything is ok, added elements appear). - Sign it, then open the template again. ### Issue The elements have disappeared but when log in with Marc Demo, they are there. ### Reason Security issue. BackPort-of: https://github.com/odoo/enterprise/pull/46087 opw-3520444 Forward-Port-Of: odoo/enterprise#48287
When the user tries to export the translation of 'account_accountant, knowledge, web_studio' modules during that time errors will occur in the backend. To reproduce the issue of 'web_studio' module: 1) Install 'web_studio'. 2) Go to Settings -> Translations-> Eport Translation. 3) In the 'Apps To Export', select 'Studio' and Click on the 'Export' button Trancback will appear. The same steps are applied to other modules for their issue. https://github.com/odoo/enterprise/blob/45
Original PR description
When the user tries to export the translation of 'account_accountant, knowledge, web_studio' modules during that time errors will occur in the backend. To reproduce the issue of 'web_studio' module:…
When the user tries to export the translation of 'account_accountant, knowledge, web_studio' modules during that time errors will occur in the backend. To reproduce the issue of 'web_studio' module: 1) Install 'web_studio'. 2) Go to Settings -> Translations-> Eport Translation. 3) In the 'Apps To Export', select 'Studio' and Click on the 'Export' button Trancback will appear. The same steps are applied to other modules for their issue. https://github.com/odoo/enterprise/blob/4533bb91ef2d81f3e639784858469f73790470df/account_accountant/static/src/components/bank_reconciliation/bank_rec_widget.xml#L270 In the above line, The opening tag was a 'span' but closed with a 't-tag'. In knowledge, the closing of the 'templates' tag is mismatched https://github.com/odoo/enterprise/blob/4533bb91ef2d81f3e639784858469f73790470df/knowledge/static/src/components/html_field/html_field.xml#L2-L8 In the above line, The opening tag was 'template' instead of 'templates'. In web_studio, the closing of the 'Dialog' tag is not added. https://github.com/odoo/enterprise/blob/4533bb91ef2d81f3e639784858469f73790470df/web_studio/static/src/client_action/components/menu_creator.xml#L53-L71 In the above line, Added closing of the 'Dialog' tag This commit will apply the correct closing tag. sentry-3951803776 Community PR-https://github.com/odoo/odoo/pull/128221 Forward-Port-Of: odoo/enterprise#48412 Forward-Port-Of: odoo/enterprise#43975