Daily updates from Odoo
Navigate
Branch
Monday, August 7, 2023
25 changes
Enhancements to existing features
Mexican e-invoicing certificates are now tied directly to a specific company, making access rules simpler and easier to maintain. The update also streamlines how certificate keys are converted, reducing reliance on external system commands and aligning the process with other localization modules.
Original PR description
This commit adds a required `company_id` on `l10n_mx_edi.certificate` and changes the `l10n_mx_edi_certificate_ids` on `res.company` to a One2many field. This allows for the simplification of the security rule. Also, instead of calling a subprocess to run an openssl command to convert a key from der format to pem, this commit makes use of the existing `load_der_private_key` method to load the key, so that it's then possible to get it in the pem format. It is also more similar to how it is done in other l10n modules where certificates are loaded. task-3276992
The File menu now only shows the Add to dashboard option to users who have permission to create dashboards. This reduces confusion and prevents users from seeing an action they cannot complete, while keeping existing dashboard templates and dashboards working normally.
Original PR description
This PR hides the "Add to dashboard" menu item in File top bar menu from users who don't have rights to add new dashboards. The basic idea is to overwrite join_spreadsheet_session function in `documents.document` model. Hence no additional RPC call, and templates & dashboards can bypass. task [3378496](https://www.odoo.com/web#id=3378496&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Document requests can now be addressed to contacts instead of only internal users, making it easier to request files from external people. The request flow also uses clearer wording and better assigns follow-up activities and emails to the right recipient.
Original PR description
**This commit does the following improvements in the request document process:** -The document requestee is now a partner rather than a user. -The 'owner_id' field of 'documents.request_wizard' is rename to 'requestee_id'. -The request note string is changed from 'Note' to 'Message'. -When scheduling activity related to document request the user is related to the requestee, if it doesn't exist, the user is the requester. -We change owner_id of 'documents.share' from 'res_user' to 'res_partner' for sending email to requestee of the document. Task-3290827
Users can now create a new blank spreadsheet dashboard directly from the dashboard configuration dialog when adding a spreadsheet. This streamlines dashboard setup by removing the need to create the blank dashboard elsewhere first.
Original PR description
This PR allows creating a new blank dashboard from the dialog when users click "Add a spreadsheet" in dashboard configuration panel. task [3390543](https://www.odoo.com/web#id=3390543&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Spreadsheet pivot tables now handle dates more consistently in pivot formulas and related interactions. This makes reporting workflows more reliable when users analyze time-based business data in spreadsheets.
Original PR description
See community PR Task 3413243
The spreadsheet engine was updated to a newer version, improving spreadsheet behavior across documents and enterprise spreadsheet features. Pivot table date handling and autofill behavior were reworked, helping users get more reliable reporting results.
Resolved issues and error corrections
A test was added to ensure spreadsheet global filters show the correct updated record name. This helps prevent confusing filter labels for users working with documents and spreadsheets.
Original PR description
This PR adds a test for the fix for updating display name in record selector on time of global filters. task [3453374](https://www.odoo.com/web#id=3453374&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
The reconciliation wizard no longer includes two fields that are not used anymore. This keeps the accounting workflow cleaner and reduces the chance of confusion or unnecessary maintenance without changing day-to-day behavior.
Original PR description
Fields 'transfer_amount' and 'transfer_amount_currency' are no longer used by the reconciliation wizard.
Features or functions removed from Odoo
An obsolete setting used to control order creation display has been removed because it is no longer used. This keeps the field service sales code cleaner and reduces maintenance without changing expected business workflows.
Original PR description
The field `display_create_order` is no longer used anywhere and can safely be removed Community: https://github.com/odoo/odoo/pull/128986 Upgrade: https://github.com/odoo/upgrade/pull/4996
Code cleanup and technical improvements
Spreadsheet actions now share common behavior, making spreadsheets, templates, and dashboards easier to maintain consistently. This also enables copying dashboards and fixes when revision history is copied, reducing the risk of incorrect duplicated data.
This update removes older internal patching code and replaces it with the current supported approach across several Odoo apps. It helps keep the codebase easier to maintain and reduces future upgrade risk, with no intended change to day-to-day user workflows.
Original PR description
This commit removes legacy patch/unpatch functions and adapts their use by using the modern patch. There was also a custom patch function used in tests which has been replaced too.
Miscellaneous changes
When the user tries to preview an invoice by performing the following steps, a traceback will be generated Steps to reproduce: 1. Install the `l10n_pe_edi` module. 2. Switch to PE company 3. Go to invoice app. 4. Create a new invoice with `operation_type` in ['1001' to '1004'] 5. Select a product in the `invoice lines` which have the value `Withhold Percentage` greater than 0, save it. 6. Click on `preview` button. With the recent changes in commit [1] the condition is to check `nati
Original PR description
When the user tries to preview an invoice by performing the following steps, a traceback will be generated Steps to reproduce: 1. Install the `l10n_pe_edi` module. 2. Switch to PE company 3. Go to…
When the user tries to preview an invoice by performing the following steps, a traceback will be generated
Steps to reproduce:
1. Install the `l10n_pe_edi` module.
2. Switch to PE company
3. Go to invoice app.
4. Create a new invoice with `operation_type` in ['1001' to '1004']
5. Select a product in the `invoice lines` which have the value `Withhold Percentage` greater than 0, save it.
6. Click on `preview` button.
With the recent changes in commit [1] the condition is to check `national_bank_account` has been removed because of that, the error is generated.
Traceback in sentry:
```
IndexError: tuple index out of range
File "<1417>", line 3262, in template_1417
File "<1417>", line 3244, in template_1417_content
File "<1417>", line 571, in template_1417_t_call_0
File "home/odoo/src/enterprise/saas-16.3/l10n_pe_edi/models/account_move.py", line 174, in _l10n_pe_edi_get_spot
national_bank_account_number = national_bank_account[0].acc_number
File "odoo/models.py", line 6135, in __getitem__
return self.browse((self._ids[key],))
QWebException: Error while render the template
IndexError: tuple index out of range
Template: l10n_pe_edi.report_invoice_document
Path: /t/t/div[2]/div[1]/h2/span[1]
Node: <span t-if="proforma"/>
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, 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 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1840, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/account/controllers/portal.py", line 121, in portal_my_invoice_detail
return self._show_report(model=invoice_sudo, report_type=report_type, report_ref='account.account_invoices', download=download)
File "addons/portal/controllers/portal.py", line 491, in _show_report
report = getattr(ReportAction, method_name)(report_ref, list(model.ids), data={'report_type': report_type})[0]
File "odoo/addons/base/models/ir_actions_report.py", line 887, in _render_qweb_html
return self._render_template(report.report_name, data), 'html'
File "odoo/addons/base/models/ir_actions_report.py", line 626, in _render_template
return view_obj._render_template(template, values).encode()
File "odoo/addons/base/models/ir_ui_view.py", line 2164, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 588, in _render
result = ''.join(rendering)
File "<494>", line 110, in template_494
File "<494>", line 92, in template_494_content
File "<494>", line 80, in template_494_t_call_0
File "<1417>", line 3268, in template_1417
```
This commit fixes the above issue by allowing a preview of invoices when the national bank account is not present and handles the error if the user deleted the `peruvian_national_bank` by adding `raise_if_not_found`.
commit [1] -
https://github.com/odoo/enterprise/commit/fd3ac630f50542668b456397bf08abc383e23011#diff-deaab3f5010fea8defc8af11dc186415ecc9079d86d307537b09222dda7ab751L176
sentry-4337938778
Forward-Port-Of: odoo/enterprise#44565Base the condition to show and apply belgian tax report extra options to be based on the existence of Belgian Accounting Package, instead of the company's country This allows company with different country that has a Belgian Accounting localization to have the desired Belgian Tax Report options task-id: 3420790 Forward-Port-Of: odoo/enterprise#45193 Forward-Port-Of: odoo/enterprise#43987
Original PR description
Base the condition to show and apply belgian tax report extra options to be based on the existence of Belgian Accounting Package, instead of the company's country This allows company with different country that has a Belgian Accounting localization to have the desired Belgian Tax Report options task-id: 3420790 Forward-Port-Of: odoo/enterprise#45193 Forward-Port-Of: odoo/enterprise#43987
This commit fixes a bug with embedded views where filters would be lost when opening a record inside an embedded view and coming back to the original article via the breadcrumbs. With this commit we are creating a new service *knowledgeEmbedViewsFilters*. With it we will store the various filters of embedded views without clogging any of the browser storage. This service is comprised of 2 commands: * `saveFilters` that takes as arguments: the current controller, the embed ID and
Original PR description
This commit fixes a bug with embedded views where filters would be lost when opening a record inside an embedded view and coming back to the original article via the breadcrumbs. With this commit we…
This commit fixes a bug with embedded views where filters would be lost when
opening a record inside an embedded view and coming back to the original
article via the breadcrumbs.
With this commit we are creating a new service
*knowledgeEmbedViewsFilters*. With it we will store the various filters
of embedded views without clogging any of the browser storage.
This service is comprised of 2 commands:
* `saveFilters` that takes as arguments: the current controller, the embed ID
and the searchModel. The objective is to save the searchModel for a
specific embedded ID and a specific controller. So we need to create an
entry in the embeddedFilters object for the embed ID that will store for
each encountered controller, the searchModel of the embedded view.
* `applyFilters` that takes as arguments: ViewProps, the current controller
and the embed ID. This function will update ViewProps with the appropriate
searchModel. The appropriate searchModel would be the one stored for the
correct embed ID and with the same controller as provided to the function.
If we cannot find an appropriate search model then we do not update the
ViewProps.
After applying the filter, we remove it from our storage since it has been
applied and is no longer needed. If we go back to the start of our
breadcrumbs or the current controller doesn't exist, then we remove all the
filters linked to the embed ID from embeddedFilters.
When moving via the breadcrumbs we have 2 situations that can happen:
* We come back to an older article via the breadcrumb, then we apply the
searchModel to the embedded view and we remove it from the storage.
* We open an older article from the sidebar or via the search, it
behaves like it's the first time that we open the article and we do not
apply the searchModel.
task-3186083
Forward-Port-Of: odoo/enterprise#45311
Forward-Port-Of: odoo/enterprise#38947*: account_reports Fixes a bug that occurred when opening the "Bank" journal report for the first time after a refresh or changing the filters in specific cases. Steps to reproduce : 1 - Go to Journal Reports 2 - Click on "Bank (BNK1)" to unfold the journal 3 - A traceback should pop This is fixed by modifying the behavior of the unfold function. When the total line is added to the lines that will be displayed, a check is done to verify that it exists. If said line does not exist,
Original PR description
*: account_reports Fixes a bug that occurred when opening the "Bank" journal report for the first time after a refresh or changing the filters in specific cases. Steps to reproduce : 1 - Go to Journal Reports 2 - Click on "Bank (BNK1)" to unfold the journal 3 - A traceback should pop This is fixed by modifying the behavior of the unfold function. When the total line is added to the lines that will be displayed, a check is done to verify that it exists. If said line does not exist, then it is not added so the traceback doesn't pop. task-3424016 Forward-Port-Of: odoo/enterprise#45195 Forward-Port-Of: odoo/enterprise#44112
The bank reconciliation widget shows the link to the corresponding bank journal entry. Currently this also happens when the entry is not reconciled. The unreconciled entry is only a placeholder that will be filled with the "real" information upon reconciliation. Thus the link to the bank journal entry should not be shown before it is reconciled (it is not ready yet). This commit removes the links for unreconciled entries. task-3425233 Forward-Port-Of: odoo/enterprise#45153 Forward-Port-
Original PR description
The bank reconciliation widget shows the link to the corresponding bank journal entry. Currently this also happens when the entry is not reconciled. The unreconciled entry is only a placeholder that will be filled with the "real" information upon reconciliation. Thus the link to the bank journal entry should not be shown before it is reconciled (it is not ready yet). This commit removes the links for unreconciled entries. task-3425233 Forward-Port-Of: odoo/enterprise#45153 Forward-Port-Of: odoo/enterprise#44294
The l10n_mx test contact "INMOBILIARIA" doesn't work anymore for testing the PAC Finkok (triggers error CFDI40144) Replacing it with "INMOBILIARIA CVA" fixes this. Forward Port of #44528 , as l10n_mx_edi_40 was replaced by l10n_mx_edi opw-3430050 Forward-Port-Of: odoo/enterprise#45205
Original PR description
The l10n_mx test contact "INMOBILIARIA" doesn't work anymore for testing the PAC Finkok (triggers error CFDI40144) Replacing it with "INMOBILIARIA CVA" fixes this. Forward Port of #44528 , as l10n_mx_edi_40 was replaced by l10n_mx_edi opw-3430050 Forward-Port-Of: odoo/enterprise#45205
Purpose: - This commit includes various small layout fixes in knowledge: - Add white space under the workspace section of the sidebar if this section is empty (it was only done for portal users) - Fix the icon layout for articles in public view (it was hiding the article's first lines) - Count published articles on which the user has been invited in the knowledge articles entry of the user's "/my" page (it only counted articles accessible by the user that were not published) Task-3433622
Original PR description
Purpose: - This commit includes various small layout fixes in knowledge: - Add white space under the workspace section of the sidebar if this section is empty (it was only done for portal users) - Fix the icon layout for articles in public view (it was hiding the article's first lines) - Count published articles on which the user has been invited in the knowledge articles entry of the user's "/my" page (it only counted articles accessible by the user that were not published) Task-3433622 Forward-Port-Of: odoo/enterprise#44564
Misc. change: Remove unused array 'account_lines' Main change: Currently exactly 1 hierarchy will be calculated for all the input lines. The account lines are removed from the input lines, and the lines corresponding to the new hierarchy are then inserted at the end of the lines. The created hierarchy may span several sections of the report. This i.e. causes the following problem in the Cash Flow Statement. * The accounts relating to opening and closing balance respectively
Original PR description
Misc. change: Remove unused array 'account_lines' Main change: Currently exactly 1 hierarchy will be calculated for all the input lines. The account lines are removed from the input lines, and the…
Misc. change: Remove unused array 'account_lines'
Main change:
Currently exactly 1 hierarchy will be calculated for all the input lines. The account lines are removed from the input lines, and the lines corresponding to the new hierarchy are then inserted at the end of the lines. The created hierarchy may span several sections of the report.
This i.e. causes the following problem in the Cash Flow Statement.
* The accounts relating to opening and closing balance
respectively are put into the same hierarchy
(since they represent the same account, just at different times).
* All the hierarchy lines get added at the very bottom of the report.
I.e. including: bank and cash accounts relating to opening and
closing balance and the cash flow entries.
The fact that opening and closing balance lines are put in the same hierarchy leads to a crash in 16.3: Both created lines have the same ID and the ID is used as key which must be unique.
In this commit the hierarchy computation is changed such that the sections of the report are respected better. Each time a new section is encountered the current hierarchy is rendered and the hierarchy is reset. Thus a new hierarchy will be created for the following section.
This places the hierarchy lines in the correct spot and prevents the hierarchy from spanning multiple sections.
This i.e. fixes the problems in the Cash Flow Statement.
Forward-Port-Of: odoo/enterprise#45282
Forward-Port-Of: odoo/enterprise#43861We change account_edi to be auto_install=False to avoid installing it when it is not nedeed and create noise data that will always be empty. It was previously auto_installed when Invoicing was installed. Note that auto_install=['parent_module'] will automatically install the module when 'parent_module' is installed (in this case the localization) AND install missing dependencies (in particular here 'account_edi'). Community: https://github.com/odoo/odoo/pull/130836 Task-3454076 Forward-
Original PR description
We change account_edi to be auto_install=False to avoid installing it when it is not nedeed and create noise data that will always be empty. It was previously auto_installed when Invoicing was installed. Note that auto_install=['parent_module'] will automatically install the module when 'parent_module' is installed (in this case the localization) AND install missing dependencies (in particular here 'account_edi'). Community: https://github.com/odoo/odoo/pull/130836 Task-3454076 Forward-Port-Of: odoo/enterprise#45244
On the accounting reports there is an option called "Unfold All". Selecting this option unfolds all the lines of the report. Some lines of the report that have no children lines (neither now, nor through an expansion / unfolding) will falsely be marked as unfolded by the "Unfold All" option. This leads to the following: For some of those lines a total line will be added to the report. This total line should not appear since there are no children lines to total. This commit fixes how / whe
Original PR description
On the accounting reports there is an option called "Unfold All". Selecting this option unfolds all the lines of the report. Some lines of the report that have no children lines (neither now, nor through an expansion / unfolding) will falsely be marked as unfolded by the "Unfold All" option. This leads to the following: For some of those lines a total line will be added to the report. This total line should not appear since there are no children lines to total. This commit fixes how / when some lines get marked as unfolded in case the "Unfold All" option is enabled. This also fixes the unnecessary total lines when "Unfold All" is enabled. task-3380117 Forward-Port-Of: odoo/enterprise#45217 Forward-Port-Of: odoo/enterprise#44068
Steps to reproduce: ------------------- - go to Field Service app; - go to Planning / By User tab; - create a task. Issue: ------ The default user will always be the user and the default dates will be today's dates. Cause: ------ The context will be used to create the task on the server side to obtain the default values. The three values that concern the problem of this flow are: `rowId`, `start`, `stop`. With the patch, we no longer have `rowId` and therefore we no longe
Original PR description
Steps to reproduce: ------------------- - go to Field Service app; - go to Planning / By User tab; - create a task. Issue: ------ The default user will always be the user and the default dates will be today's dates. Cause: ------ The context will be used to create the task on the server side to obtain the default values. The three values that concern the problem of this flow are: `rowId`, `start`, `stop`. With the patch, we no longer have `rowId` and therefore we no longer have the selected frontend user. In addition, `start` and `stop` are the times of the current day's date. Solution: --------- Patch the controller used for the task gantt view. opw-3420789 Forward-Port-Of: odoo/enterprise#44601
Steps to reproduce: ------------------- 1. Have at least two companies 2. Set a logo image for both companies 3. Use the second company (id = 2) 4. Go to Sign -> Upload a PDF to sign -> Send 5. Send the pdf by email 6. Go to Settings/technical/emails and search for the last email you sent 7. Click on “Sign Document” 8. In the header of the website the logo is wrong, using the logo from company id=1 Issue: ------ When creating a sign document from any other company different than th
Original PR description
Steps to reproduce: ------------------- 1. Have at least two companies 2. Set a logo image for both companies 3. Use the second company (id = 2) 4. Go to Sign -> Upload a PDF to sign -> Send 5. Send…
Steps to reproduce: ------------------- 1. Have at least two companies 2. Set a logo image for both companies 3. Use the second company (id = 2) 4. Go to Sign -> Upload a PDF to sign -> Send 5. Send the pdf by email 6. Go to Settings/technical/emails and search for the last email you sent 7. Click on “Sign Document” 8. In the header of the website the logo is wrong, using the logo from company id=1 Issue: ------ When creating a sign document from any other company different than the main company, it doesn't take the logo of the company that is creating the document. For all documents, it is taking the logo of the main company (the first company created in the database with id=1) Cause: ------ The XML file is displaying the logo image from the path `logo.png` without specifying the company_id. To fix this issue we need to pass the parameter `?company=<id>` and we also have to modify the controller to ensure that this parameter is passing correctly to the XML file. OPW-3427766 Forward-Port-Of: odoo/enterprise#44500
### Current behaviour In sign module, when modifying a Selection type field in a template: - if you add an option value, exit and re-open the template, the only remaining value is the last one you added - if you remove an option value, exit and re-open the template, there is no more value. ### Expected behaviour Get the right values set in the Selection field ### Steps to reproduce - Go to Sign, upload a pdf template. - Add a selection field with 2 values (eg. "a" and "b") and save.
Original PR description
### Current behaviour In sign module, when modifying a Selection type field in a template: - if you add an option value, exit and re-open the template, the only remaining value is the last one you…
### Current behaviour
In sign module, when modifying a Selection type field in a template:
- if you add an option value, exit and re-open the template, the only remaining value is the last one you added
- if you remove an option value, exit and re-open the template, there is no more value.
### Expected behaviour
Get the right values set in the Selection field
### Steps to reproduce
- Go to Sign, upload a pdf template.
- Add a selection field with 2 values (eg. "a" and "b") and save.
- Exit and re-open the modified template(everything is ok).
- Modify the field added, remove or add a value(eg. "c").
- Validate, exit and re-open the template.
### Issue
There is no value or only one("c") in the selection field.
### Reason of the problem
When updating the selection field in ``SignTemplate.update_from_pdfviewer()``, the dictionary used to update the ``SignItem`` has the field ``option_ids`` for values as a list of strings and those strings are meant to be ``SignItemOption.id``. So when ``SignItem`` overwrites its values, invalid ``SignOptionItem`` objects are returned but no error is raised.
opw-3201124
Forward-Port-Of: odoo/enterprise#44855user without administration access rigths on approval request cannot submit approvals in approval types where there is an approver_seuqence set. That is due to the fact that they don't have access rights to change approval.aprover records and thus a sudo is needed, just as there already is one on the end of the method Forward-Port-Of: odoo/enterprise#44972 Forward-Port-Of: odoo/enterprise#44697
Original PR description
user without administration access rigths on approval request cannot submit approvals in approval types where there is an approver_seuqence set. That is due to the fact that they don't have access rights to change approval.aprover records and thus a sudo is needed, just as there already is one on the end of the method Forward-Port-Of: odoo/enterprise#44972 Forward-Port-Of: odoo/enterprise#44697