Daily updates from Odoo
Navigate
Branch
Saturday, July 15, 2023
24 changes
New functionality added to Odoo
French companies can now submit VAT reports electronically to the government through the ASPOne service. The update adds a guided submission flow, stores each export for tracking, and processes pending submissions automatically in the background.
Original PR description
Allow to send the VAT report to the government, using the API of ASPOne.
Add a new model `account_report_async_export` to store the exports of a
report and process them using a CRON.
The flow for the french EDI VAT is as follows:
1. Open a wizard from the French VAT report
2. When confirming it, an account.report.async.export containing an xml
is created. The xml is also sent to ASPOne.
3. The list of account.report.async.export is available from the
"Reporting" > "EDI exports" menu
4. The CRON will process the pending account.report.async.export
For ASPOne, it's done in 2 phases. First, by calling
`getInterchangesByDepositID`, then by calling `getDeclarationDetails`.
Note that if attachments were generated (i.e. edifact files), they can
be retrieved using `getRecipientReports_v2`.
https://github.com/odoo/iap-apps/pull/624
task-2673918Enhancements to existing features
The planning tool now avoids copying shifts for project tasks when there is no remaining planned time available, matching existing behavior for sales order-based planning. Newly copied shifts are also shown more clearly, making it easier for planners to review what was just added.
Original PR description
*=project_timesheet_forecast_sale * When a planning was created from an SO confirmation, we copy it only if the related SOL has time left to plan. In this commit, we do the same for tasks without SO, but with a project (project.allocated_hours - project.total_forecast_time). * After copying, we now display the just planned shifts with more opacity (same as after "auto plan"). task-3251696
Knowledge dialogs for moving articles and choosing article links now use a newer, more sustainable selection menu. This keeps the experience searchable and familiar while preparing the app for the retirement of the older menu technology.
Original PR description
In this commit, we are transitioning the select2 inputs to an OWL version since select2 is bound to be deprecated in the future. In order to do that we are using a Component called SelectMenu. This…
In this commit, we are transitioning the select2 inputs to an OWL version since select2 is bound to be deprecated in the future. In order to do that we are using a Component called SelectMenu. This Component asks for a set of values linked to labels and it will search inside these values when you input text inside the searchBar. We needed to modify two dialogs that were using the old select2: `MoveArticleDialog` and `ArticleSelectionBehaviorDialog`. For `MoveArticleDialog`, we needed to use groups since this dialog also enabled the user top move an article inside a specific section. So we made two groups: an article group and a section group. For the section group we added the two sections 'Private' and 'Workspace', for the 'Private' section we added the image of the logged user beside its label using the `choice` slot of the `SelectMenu`, this slot enables us to customize each choice inside the `SelectMenu`. For `ArticleSelectionBehaviorDialog`, we only used the articles as the choices for the menu. We also added a `Create` button to the menu using the new `bottomArea` slot added by the JS team to the Component. This button creates a new article under the one we are currently, or inside the workspace if the command is called from outside Knowledge. If we are inside Knowledge, we trigger a render of the article tree to display the newly created article inside it. For each dialog, we are using the default slot to display the selected article. task-3134491
Subscription payments are now finalized through the standard reconciliation flow instead of relying on a payment callback, reducing the risk of inconsistent subscription or invoice states if processing is interrupted. The subscription payment route is also aligned with sales orders, and related fixes improve subscription template saving and remove obsolete pricing logic.
Original PR description
In subscription, we have two ways to do actions once the payment is validated (state done/authorized):
payment callback, synchronous.
reconcile after done, synchronous
The aim of the task is to avoid using the callback to use reconcile after done. callback are only used in subscription and are subject to issues if something crashes, we can be in a weird state in the cron with a draft invoice, a good payment and a confirmed transaction.
Before this commit, the transaction route was
/my/subscription/<int:order_id>/transaction
But in sale, the route is /my/orders/<int:order_id>/transaction
Having a similar route could help code consistancy:
some button could only add /transaction to the portal_url and we would have
the right behavior.
taskid: 3258616WebP images uploaded to Documents now display thumbnails and previews like other image formats. WebP files are also recognized in signing workflows, making it easier to review and sign these images without workarounds.
Original PR description
Before this commit webp images uploaded in documents did not appear with a thumbnail. After this commit webp images uploaded in documents are considered as images and therefore display their thumbnail. task-2774352
Users now see SAF-T report issues as warning banners when opening the report, instead of only discovering them after clicking export. This helps accounting teams identify missing information earlier and avoid failed or delayed SAF-T exports.
Original PR description
There are a few issues with the SAF-T report, particularly with the errors raised when generating it. For now, the user has to click the SAF-T button to be aware of potential issues/missing info. The goal is tho display those warnings as banners when the report is loaded, instead of waiting for the user to export it. task-2794931
Recruitment documents processed through OCR can now be scanned for known skill names even when the OCR service does not return structured skill data. This helps recruiters get applicant skill records created automatically, reducing manual data entry and improving candidate profiles.
Original PR description
As there is no skills extracted in the OCR results coming from the IAP server, we should search the skill names in the text and create corresponding "hr.applicant.skill" record for the applicant.
Resolved issues and error corrections
VoIP phone call records now include a missing database optimization for call status. This should make common call searches and missed-call checks faster and more reliable without changing user workflows.
Original PR description
Add missing index on `state` of `voip.phonecall` used in: - view search filters - `get_missed_call_info` task-3420528
Approval request status information is now easier for the system to find when counting requests, showing items to approve, and applying access rules. This helps keep approval screens and related counts responsive, especially as the number of requests grows.
Original PR description
Add missing index on `request_status` of `approval_request`, used in: - computing the count of request per category - in views of "to approve" request and + search filter - some ir.rules task-3420528
The Irish reports module now keeps deferred account definitions within Enterprise, preventing installation errors when using the standard Irish localization on its own. This improves reliability for companies setting up Irish accounting without requiring Enterprise report components.
Original PR description
Deferred accounts should be defined in Enterprise only, else it will cause error if you install l10n_ie only. https://runbot.odoo.com/runbot/build/47857050
A previously removed accounting action has been restored because it is still needed in parts of the system. This prevents affected accounting workflows from breaking when users access posted unreconciled journal items.
Original PR description
`action_move_line_posted_unreconciled` has been erronously removed in https://github.com/odoo/enterprise/pull/42337. The action is still in use in some places.
Code cleanup and technical improvements
Removed an internal cash flow report field that became unnecessary after a prior performance optimization. This reduces redundant code and helps keep the reporting engine easier to maintain, with no expected change for end users.
Original PR description
### Reason for the refactoring: This PR https://github.com/odoo/enterprise/pull/43971 introduced a query optimization that efficiently retrieves `payment_move_ids`. As a result, the `payment_move_ids` field has become redundant and no longer serves any purpose in the codebase. ### Current behavior: The codebase contains the `payment_move_ids` field, which is not relevant after the query optimization. ### Expected behavior: Remove the unnecessary `payment_move_ids` field to streamline the code and eliminate redundant functionality. ### Result: In this refactoring, the `payment_move_ids` field is removed from the codebase since it is no longer needed after the query optimization. This eliminates unnecessary code and simplifies the overall structure. opw-3220665
Miscellaneous changes
Before this commit: all timesheet > click on the magnifying glass in a grid section > odoo client error After this commit: The error is fixed task-3383403 Forward-Port-Of: odoo/enterprise#43184
Original PR description
Before this commit: all timesheet > click on the magnifying glass in a grid section > odoo client error After this commit: The error is fixed task-3383403 Forward-Port-Of: odoo/enterprise#43184
Description of the issue/feature this PR addresses: In the website when task of project is open, sub tasks notebook has dark shadow below the list. Shadow should be same as sub tasks list in backend. Current behavior before PR: Sub tasks notebook has dark shadow below the list in website. Desired behavior after PR is merged: Sub tasks notebook has same shadow as in backend project module. causes: in project sharing, gradient of 0.4 opacity is apply on shadow for dark mode in list_c
Original PR description
Description of the issue/feature this PR addresses: In the website when task of project is open, sub tasks notebook has dark shadow below the list. Shadow should be same as sub tasks list in backend. Current behavior before PR: Sub tasks notebook has dark shadow below the list in website. Desired behavior after PR is merged: Sub tasks notebook has same shadow as in backend project module. causes: in project sharing, gradient of 0.4 opacity is apply on shadow for dark mode in list_controller.dark.scss file so that shadow effect is shown in dark mode which is also apply on light mode therefore shadow is dark in light mode Fix: As all the list view in project sharing have same issue, so we remove list_controller.dark.scss file in manifest project.webclient, so that this effect is not apply in frontend. task-3217427 Forward-Port-Of: odoo/enterprise#40668
Adjust tests to use the account_move service See odoo/odoo#121023 part of task-3284218 Forward-Port-Of: odoo/enterprise#44083 Forward-Port-Of: odoo/enterprise#43319
Original PR description
Adjust tests to use the account_move service See odoo/odoo#121023 part of task-3284218 Forward-Port-Of: odoo/enterprise#44083 Forward-Port-Of: odoo/enterprise#43319
This commit allows to avoid the lost of precision when cliking to navigate on the map view. Before this commit, to display the popup on the map view, the address is converted to longitude/latitude. And when you click on the 'navigate' we use this longitude/latitude to specify the destination to google, and google will revert these coordinates to an address that could not be the same as the original. After this commit, we send the address to Google as destination when the user clicks on the
Original PR description
This commit allows to avoid the lost of precision when cliking to navigate on the map view. Before this commit, to display the popup on the map view, the address is converted to longitude/latitude. And when you click on the 'navigate' we use this longitude/latitude to specify the destination to google, and google will revert these coordinates to an address that could not be the same as the original. After this commit, we send the address to Google as destination when the user clicks on the 'Navigate' button. Forward-Port-Of: odoo/enterprise#44060
A fix for spacings between buttons in PR #42850 caused the indentations to disappear. This PR reverts commit 948a1ace4406bf0b4d593bb16c536baf0e4ab6bd , bringing the indentations back and adds spacings using margins instead task-3420295 Forward-Port-Of: odoo/enterprise#43919
Original PR description
A fix for spacings between buttons in PR #42850 caused the indentations to disappear. This PR reverts commit 948a1ace4406bf0b4d593bb16c536baf0e4ab6bd , bringing the indentations back and adds spacings using margins instead task-3420295 Forward-Port-Of: odoo/enterprise#43919
When creating or connecting an Instagram account, if the access token can't be fetched, this problem might arise. ``` KeyError: 'access_token' File "odoo/http.py", line 2115, in __call__ response = request._serve_db() File "odoo/http.py", line 1698, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "odoo/service/model.py", line 134, in retrying result = func() File "odoo/http.py", line 1725, in _serve_ir_http response = self.dispat
Original PR description
When creating or connecting an Instagram account, if the access token can't be fetched, this problem might arise. ``` KeyError: 'access_token' File "odoo/http.py", line 2115, in __call__ response =…
When creating or connecting an Instagram account, if the access token can't
be fetched, this problem might arise.
```
KeyError: 'access_token'
File "odoo/http.py", line 2115, in __call__
response = request._serve_db()
File "odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1838, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/auth_oauth/controllers/main.py", line 46, in wrapper
return func(self, *a, **kw)
File "home/odoo/src/enterprise/saas-16.2/social_instagram/controllers/main.py", line 38, in social_instagram_callback
self._instagram_create_accounts(access_token, extended_access_token)
File "home/odoo/src/enterprise/saas-16.2/social_instagram/controllers/main.py", line 120, in _instagram_create_accounts
instagram_access_token = account['access_token']
```
User Data for reference : -
```
data: [
{
access_token: [Filtered],
id: '113875561711167',
instagram_business_account: {"id":"'17841453272284278'"},
name: 'Daily Phrases - English_Português'
},
{
id: '105400745607535',
name: 'Expansion US'
},
{
id: '181502446050021',
name: 'Jordan Peterson Dublado'
},
{
id: '485449501930869',
name: 'Mitadas do Paulo Guedes'
},
{
id: '835584939869735',
name: 'Anúncios São Sebastião do Paraiso'
},
{
id: '1508985302718835',
name: 'Familia vende tudo - MG - Sudoeste'
}
]
```
In this User data, we can't get an access token.so, Applying these changes will resolve this issue.
sentry: - 4161897892
Forward-Port-Of: odoo/enterprise#43536
Forward-Port-Of: odoo/enterprise#41540Before this PR, the IoT devices were represented by font-awesome icons which did not correctly represent the devices (i.e.: a spanner for the caliper device). These have been replaced by "Milk" pictograms which represent the devices more accurately. task-3378296 part of task-3326263 Forward-Port-Of: odoo/enterprise#42833
Original PR description
Before this PR, the IoT devices were represented by font-awesome icons which did not correctly represent the devices (i.e.: a spanner for the caliper device). These have been replaced by "Milk" pictograms which represent the devices more accurately. task-3378296 part of task-3326263 Forward-Port-Of: odoo/enterprise#42833
- Steps: - Install sale_subscription and payment_demo module - Create Sale order and create token (error) - Change the system date 2 days in the future - Launch the scheduled action to invoice subscriptio - Go to emails, see the last sent email - Issue Currently we not passing payment_token in context so amount is not show in email template. - Fixed: In this commit, we pass a payment_token reference so that the amount will appear in the email templ
Original PR description
- Steps:
- Install sale_subscription and payment_demo module
- Create Sale order and create token (error)
- Change the system date 2 days in the future
- Launch the scheduled action to invoice subscriptio
- Go to emails, see the last sent email
- Issue
Currently we not passing payment_token in context so amount is not show in
email template.
- Fixed:
In this commit, we pass a payment_token reference so that the amount will
appear in the email template.
task-3387169
Forward-Port-Of: odoo/enterprise#44007If we have an invoice line that needs to be deferred, with a partial tax, where one part affects the tax closing and the other part is not. Currently we seem to defer the part that is affecting the tax report (if the account of the tax line is an income or expense one). Besides that, only the deferrals of the last line of the move are linked to the move. Since we want only the part **not** affecting the tax report to be deferred and we want all deferrals of the move linked, this fix solves
Original PR description
If we have an invoice line that needs to be deferred, with a partial tax, where one part affects the tax closing and the other part is not. Currently we seem to defer the part that is affecting the tax report (if the account of the tax line is an income or expense one). Besides that, only the deferrals of the last line of the move are linked to the move. Since we want only the part **not** affecting the tax report to be deferred and we want all deferrals of the move linked, this fix solves both issues. Also taxes were not recomputed when only the start and end dates of a line were changed (or added). Therefore they were not deferred when the dates for the base line were added after a first save. This change also fixes that. [task-3420780](https://www.odoo.com/web#id=3420780&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#43931
Before this commit: ==================== In tablet view when a register component check has no stock.move.line(e.g. not reserved). During the record production the quantity on the check will be set to 0. And the registered quantity will be loss on the check (but exists on sml) After this commit: =================== We never write the quantity on the check during the extra move line process task-3212121 Forward-Port-Of: odoo/enterprise#43518 Forward-Port-Of: odoo/enterprise#41690
Original PR description
Before this commit: ==================== In tablet view when a register component check has no stock.move.line(e.g. not reserved). During the record production the quantity on the check will be set to 0. And the registered quantity will be loss on the check (but exists on sml) After this commit: =================== We never write the quantity on the check during the extra move line process task-3212121 Forward-Port-Of: odoo/enterprise#43518 Forward-Port-Of: odoo/enterprise#41690
When importing bank statement lines from a CSV file, using debit, credit and balance fields (with at least one of the column for debit or credit before the column for balance), the 'balance_start' and 'balance_end_real' computed by the _parse_import_data function will be incorrect. This is because of the order of the operations in that function. First, the imported data ('imported_data') is parsed into a variable named 'data'. Then, the 'imported_data' will be checked for 'debit' and 'credit
Original PR description
When importing bank statement lines from a CSV file, using debit, credit and balance fields (with at least one of the column for debit or credit before the column for balance), the 'balance_start'…
When importing bank statement lines from a CSV file, using debit, credit and balance fields (with at least one of the column for debit or credit before the column for balance), the 'balance_start' and 'balance_end_real' computed by the _parse_import_data function will be incorrect.
This is because of the order of the operations in that function. First, the imported data ('imported_data') is parsed into a variable named 'data'.
Then, the 'imported_data' will be checked for 'debit' and 'credit' column. If they are found, they are processed then these columns are deleted from 'imported_data'.
Lastly, 'imported_data' is checked for the 'balance' column. If it is found, its index in 'imported_data' is stored and then accessed in 'data'. This is the incorrect part. Since we deleted two columns from 'imported_data', the index for balance is not the same as in 'data' anymore (since it still contains 'debit' and/or 'credit' before 'balance').
As discussed with POWA, the correct fix would be to delete the debit/credit column after processing the balance column in the imported data, so the indexes remain the same.
This actually reverts the code back to it's [previous state 7 years ago ](https://github.com/odoo/enterprise/blame/c0344c205c86754415f3d52b2ea58c84dc800d95/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L78-L80)
opw-3380610
Forward-Port-Of: odoo/enterprise#43766If a user creates a sign request for an employee without providing the partner's information and address, and the employee opens the sign request, an error will occur. Steps to produce: - Create a signature request for an employee(Eg. Jennie Fletcher) without address and partner. - After creating the signature request click on the 'Signature Requests' smart button. By following above steps you will be able to produce the error. Traceback on Sentry: ``` TypeError: inconsistent mode
Original PR description
If a user creates a sign request for an employee without providing the partner's information and address, and the employee opens the sign request, an error will occur. Steps to produce: - Create a…
If a user creates a sign request for an employee without providing the partner's
information and address, and the employee opens the sign request, an error will
occur.
Steps to produce:
- Create a signature request for an employee(Eg. Jennie Fletcher) without address and partner.
- After creating the signature request click on the 'Signature Requests' smart button.
By following above steps you will be able to produce the error.
Traceback on Sentry:
```
TypeError: inconsistent models in: sign.request() + sign.request.item()
File "odoo/http.py", line 2114, 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 1921, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._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/web/controllers/dataset.py", line 34, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.3/hr_contract_sign/models/hr_employee.py", line 42, in open_employee_sign_requests
sign_request_ids = sign_from_contract + sign_from_role + self.sign_request_ids
File "odoo/models.py", line 5991, in __add__
return self.concat(other)
File "odoo/models.py", line 6001, in concat
raise TypeError(f"inconsistent models in: {self} + {arg}")
```
This commit will allow the employee without partner and adress to open the sign requests.
sentry-4252955108
Forward-Port-Of: odoo/enterprise#42756