Thursday, July 6, 2023
26 changes · master
New functionality added to Odoo
Users can now combine two or more selected PDF files into a single new PDF from the Documents app. The original files remain available, and the merged document keeps the tags from the source files for easier organization.
Original PR description
PURPOSE: User should be able to merge two or more pdf documents. SPECIFICATIONS: - When two files (or more) are selected, and all of them are PDF type, display a new merge icon next to the split option for the folders expect 'All' folder. - Previous files are not deleted. - All the tags of the merged files are copied to the result file. Task-2657855
Enhancements to existing features
Time-off requests in Belgian payroll now update related payroll benefits much faster on large databases. This reduces waiting time for HR users when posting time off, improving day-to-day responsiveness without changing payroll behavior.
Original PR description
## Description Taking a time-off in the Time Off application is taking around 7s on a large database. ## Analysis The bottleneck is `_compute_work_entry_dependent_benefits`, especially the query on…
## Description Taking a time-off in the Time Off application is taking around 7s on a large database. ## Analysis The bottleneck is `_compute_work_entry_dependent_benefits`, especially the query on the report `l10n_be.work.entry.daily.benefit. report`. It's making 2 `CROSS JOIN LATERAL`, making an expensive cross product, and filtering afterward based on conditions, that could have been checked during the `JOIN`s, before doing any `CROSS JOIN`. This reduces the total rows that Postgres is manipulating during the query. Moving the conditions earlier in the chain of joins, allows Postgres to make earlier filtering before doing any `CROSS JOIN`. Another issue is the ordering. When searching based a set of employees and a date range, we order based on the default order of the report, but it's never used afterward. We use a `dictfetchall()` so order is irrelevant. Removing the ordering, allows us to ditch the `id` in the `SELECT` of the report, which is an expensive window function doing ordering on potentially many rows. ## Results Posting a time-off passes from 11.13 secs to 16 ms --- task-3387393
Resolved issues and error corrections
The Documents app now opens the activity panel correctly when users click the activity icon, instead of closing the chatter on the first attempt. This makes it easier for users to view and act on document-related activities without extra clicks or confusion.
Original PR description
**PURPOSE** when click on the activity icon, it close the chatter first time.it should be open activity box below activity button. **SPECIFICATIONS** Activity box will open properly. Task-2645613
Miscellaneous changes
To reproduce: 1) Choose Belgian company 2) Go to Payroll/ Reporting/ Belgium/ Paid Time Off Allocation 3) Generate time off for some employees When allocations are generated 'employee_id' is indicated correctly, but 'employee_ids' is left empty. As a result, when we draft the allocation, we see 'employee_ids', which is either incorrectly populated, or left empty. To fix the issue - we correctly set 'employee_ids' during step 3. Forward-Port-Of: odoo/enterprise#43721
Original PR description
To reproduce: 1) Choose Belgian company 2) Go to Payroll/ Reporting/ Belgium/ Paid Time Off Allocation 3) Generate time off for some employees When allocations are generated 'employee_id' is indicated correctly, but 'employee_ids' is left empty. As a result, when we draft the allocation, we see 'employee_ids', which is either incorrectly populated, or left empty. To fix the issue - we correctly set 'employee_ids' during step 3. Forward-Port-Of: odoo/enterprise#43721
Documents for invoice, expense, and recruitment extraction can now be picked up directly by the OCR service when ready, reducing delays caused by shared scheduled jobs. This improves responsiveness for SaaS users while keeping an option to disable the new pull mode if needed.
Original PR description
This commit introduces a new way to send documents to databases which can receive POST request from the OCR server. An issue we currently have with SAAS databases is that they share resources for the…
This commit introduces a new way to send documents to databases which can receive POST request from the OCR server. An issue we currently have with SAAS databases is that they share resources for the crons. This means that the cron sending the documents is not immediately launched whenever it is triggered. This leads to waiting longer than it should. The new introduced way is activated when the webhook is reached by setting the config parameter `iap_extract.extract_can_pull` to `'True'`. When active, it allows the user to make its parse request synchronously, and the server will be able to request the document through the newly introduced `request_attachment` route, whenever it is ready. A new field `extract_date_pull_requested` was added to the mixin to determine if we tried to send the file already and for some reason, there was an issue and then disable the `iap_extract.extract_can_pull`. To force disable the pull mode, the user can edit the system parameter and set it to `False`. When set to this value, it is not toggled back to True. task-3263472 odoo/iap-apps#625
The accounting button label has been updated from “Send for digitization” to “Digitize PDF.” This makes the action clearer for users because the digitization option applies specifically to PDF documents.
Original PR description
We decided to change the name of the account button "Send for digitization" to "digitize PDF" since there is only a digitized options for PDF. task-id: 3326780
Documents users can now use keyboard shortcuts to move through their documents more quickly. This reduces manual clicking and makes everyday document review and organization faster, including when working with document spreadsheets.
Original PR description
This commit add's a new feature that enhances navigation ease by adding a hotkey functionality. Users can now utilize a designated hotkey combination to navigate through the documents effortlessly. Task-3282933
Spreadsheet users can now insert Odoo formulas directly from the topbar insert menu. This removes a previous limitation that prevented those formulas from appearing there and adds test coverage to help keep the behavior reliable.
Original PR description
## Description Previously, users were unable to insert Odoo formulas from the topbar insert menu due to the absence of the category key in the function description. Introduced in PR#127372, this commit includes a corresponding test case. Task : 3371655
The subscription renewal quote buttons now avoid counting cancelled quotes and restore access to quote history. This helps sales teams see clearer renewal information and reduces confusion when managing subscriptions.
Original PR description
- The stat button should not mention cancelled quote - put back the history stat button task-id: 3391973
Steps to reproduce: - Activate French language - Install `marketing_automation` and `Projects` modules - Go to a project and create a stage and translate it's name: EN: New stage FR: Nouveau stage - Create a task and set it to the new stage - Go to Marketing Automation > Campaigns and create a campaign - Select 'Task' as the model - Set `[['stage_id', '=', 'Nouveau stage']]` as Domain - Add an email activity that is triggerd directly when the flow begins - Start the
Original PR description
Steps to reproduce: - Activate French language - Install `marketing_automation` and `Projects` modules - Go to a project and create a stage and translate it's name: EN: New stage FR: Nouveau stage -…
Steps to reproduce:
- Activate French language
- Install `marketing_automation` and `Projects` modules
- Go to a project and create a stage and translate it's name: EN: New stage FR: Nouveau stage
- Create a task and set it to the new stage
- Go to Marketing Automation > Campaigns and create a campaign
- Select 'Task' as the model
- Set `[['stage_id', '=', 'Nouveau stage']]` as Domain
- Add an email activity that is triggerd directly when the flow begins
- Start the campaign
- Go to Settings > Technical > Automation > Scheduled Actions
- Run the actions:
- Marketing Automation: sync participants
- Marketing Automation: execute activities
Issue:
Participants and activities are not created.
Cause:
Not using the responsible but the current user language to sync
participants and execute activities.
Therefore, when using the campaign domain to fetch records, we are
using the user language who is different than the responsible language
(who should have set the domain with it's own language).
Solution:
Sync participants and execute activities in the responsible language.
opw-3251968
Forward-Port-Of: odoo/enterprise#43712
Forward-Port-Of: odoo/enterprise#42666Since changes made in https://github.com/odoo/odoo/pull/111850, the body is escaped, so as we are providing html link in this case, we need to use Markup to correctly display the link. Forward-Port-Of: odoo/enterprise#43651
Original PR description
Since changes made in https://github.com/odoo/odoo/pull/111850, the body is escaped, so as we are providing html link in this case, we need to use Markup to correctly display the link. Forward-Port-Of: odoo/enterprise#43651
The check to know if a line should be considered a tax line or a base line was not optimal, which led to lines with a VAT account (411xxx or 451xxx) to get taxed. The analytic items amounts are also opposed between Odoo and Winbooks. opw-3198906 Forward-Port-Of: odoo/enterprise#43568 Forward-Port-Of: odoo/enterprise#42468
Original PR description
The check to know if a line should be considered a tax line or a base line was not optimal, which led to lines with a VAT account (411xxx or 451xxx) to get taxed. The analytic items amounts are also opposed between Odoo and Winbooks. opw-3198906 Forward-Port-Of: odoo/enterprise#43568 Forward-Port-Of: odoo/enterprise#42468
Before this commit when one tries to share an empty workspace with sample records it caused a traceback. This commit fix the issue. Task-3344751 Forward-Port-Of: odoo/enterprise#41702
Original PR description
Before this commit when one tries to share an empty workspace with sample records it caused a traceback. This commit fix the issue. Task-3344751 Forward-Port-Of: odoo/enterprise#41702
Some buttons such as "Save" and "Discard" were stuck together. Some had too much spacing. This PR aims to adjust the spacing between buttons. Community PR : https://github.com/odoo/odoo/pull/125768 task-3378519 part of task-3326263 Forward-Port-Of: odoo/enterprise#42850
Original PR description
Some buttons such as "Save" and "Discard" were stuck together. Some had too much spacing. This PR aims to adjust the spacing between buttons. Community PR : https://github.com/odoo/odoo/pull/125768 task-3378519 part of task-3326263 Forward-Port-Of: odoo/enterprise#42850
This commit rewords the confirm button for the restricting access dialog of the PermissionPanel. The confirm button is now 'Restrict access' when restricting the access of another user and 'Restrict own access' when the user is restricting its permission on the article. task-3381759 Forward-Port-Of: odoo/enterprise#43452
Original PR description
This commit rewords the confirm button for the restricting access dialog of the PermissionPanel. The confirm button is now 'Restrict access' when restricting the access of another user and 'Restrict own access' when the user is restricting its permission on the article. task-3381759 Forward-Port-Of: odoo/enterprise#43452
task-3250954 Forward-Port-Of: odoo/enterprise#43702 Forward-Port-Of: odoo/enterprise#43575
Original PR description
task-3250954 Forward-Port-Of: odoo/enterprise#43702 Forward-Port-Of: odoo/enterprise#43575
If user create new transaction keeping amount zero and try to add new line for validate, traceback will appear To reproduce the issue: - Install 'Accounting' - Go to 'Settings' - From Users > Enable 'Multi Currencies' - Go to 'Currencies' and activate 'EUR' > Save - Now go to Accounting > Configuration > Journals - In 'Miscellaneous Operations' select 'EUR' as the currency - In Accounting > Journal Entries and create a journal entry - Add two lines and change the currency to 'USD' i
Original PR description
If user create new transaction keeping amount zero and try to add new line for validate, traceback will appear To reproduce the issue: - Install 'Accounting' - Go to 'Settings' - From Users > Enable…
If user create new transaction keeping amount zero and try to add new line for validate, traceback will appear
To reproduce the issue:
- Install 'Accounting'
- Go to 'Settings'
- From Users > Enable 'Multi Currencies'
- Go to 'Currencies' and activate 'EUR' > Save
- Now go to Accounting > Configuration > Journals
- In 'Miscellaneous Operations' select 'EUR' as the currency
- In Accounting > Journal Entries and create a journal entry
- Add two lines and change the currency to 'USD' in line then enter value in credit and debit
- One line entry must be '121000 Account Receivable' > Post that entry
- Go to Accounting Dashboard > Bank
- Create a new transaction with amount = 0.0 and Foreign Currency = 'EUR'
- Click 'Save and Close'
- Select the transaction and click on the journal entry you have just created Error: A traceback appear: 'ZeroDivisionError: float division by zero'
see:-
```
ZeroDivisionError: float division by zero
File "odoo/http.py", line 2116, 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 1923, 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 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, 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.2/account_accountant/models/bank_rec_widget.py", line 923, in onchange
return super(BankRecWidget, self.with_context(recursive_onchanges=False)).onchange(values, field_name, field_onchange)
File "odoo/models.py", line 6529, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "odoo/models.py", line 6240, in _onchange_eval
method_res = method(self)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 662, in _onchange_todo_command
self._process_todo_command(command_split[0], command_split[1:])
File "home/odoo/src/enterprise/saas-16.2/account_accountant_batch_payment/models/bank_rec_widget.py", line 131, in _process_todo_command
super()._process_todo_command(command_name, command_args)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 634, in _process_todo_command
self._action_add_new_amls(amls)
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1564, in _action_add_new_amls
if not self._lines_widget_check_apply_early_payment_discount() and allow_partial:
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 1110, in _lines_widget_check_apply_early_payment_discount
auto_balance_line_vals = self._lines_widget_prepare_auto_balance_line()
File "home/odoo/src/enterprise/saas-16.2/account_accountant/models/bank_rec_widget.py", line 984, in _lines_widget_prepare_auto_balance_line
.round(line.amount_currency * abs(transaction_amount / journal_amount))
```
Adding the journal entries to validate in bank reconciliation which have multi currencies in it and the amount is set zero of the transaction, it will lead to the above traceback.
sentry-4223219496
Forward-Port-Of: odoo/enterprise#42752This commit sets the new selected state (border + light bg) to the kaban view of documents module task-3412797 part of task-3326263 Forward-Port-Of: odoo/enterprise#43663
Original PR description
This commit sets the new selected state (border + light bg) to the kaban view of documents module task-3412797 part of task-3326263 Forward-Port-Of: odoo/enterprise#43663
Before this commit in planning.slot list view when we create & edit a new resource on the fly user_id is shown. After this commit in planning.slot list view now when we create & edit a new resource on the fly user_id is not visible task - 3217930 Forward-Port-Of: odoo/enterprise#43614 Forward-Port-Of: odoo/enterprise#38681
Original PR description
Before this commit in planning.slot list view when we create & edit a new resource on the fly user_id is shown. After this commit in planning.slot list view now when we create & edit a new resource on the fly user_id is not visible task - 3217930 Forward-Port-Of: odoo/enterprise#43614 Forward-Port-Of: odoo/enterprise#38681
Prior to this commit, the layout of the availability popover was broken. This commit fixes this issue. Requires: - https://github.com/odoo/odoo/pull/127195 task-3397905 Par of task-3326263 Forward-Port-Of: odoo/enterprise#43576
Original PR description
Prior to this commit, the layout of the availability popover was broken. This commit fixes this issue. Requires: - https://github.com/odoo/odoo/pull/127195 task-3397905 Par of task-3326263 Forward-Port-Of: odoo/enterprise#43576
This PR fixes the font-size and alignments of status buttons that should have been included in commit bd946d903caea9b5dae289f264ed5610ed931b7f. Reported in `milk-testing` pad: - Forgotten stat buttons https://tinyurl.com/2o78v96t and https://tinyurl.com/2ndefjzc A previous PR for the same kind of fix on stat buttons was done and merged https://github.com/odoo-dev/enterprise/pull/556 and https://github.com/odoo-dev/odoo/pull/2494 task-3326558 part of task-3326263 Related to Commun
Original PR description
This PR fixes the font-size and alignments of status buttons that should have been included in commit bd946d903caea9b5dae289f264ed5610ed931b7f. Reported in `milk-testing` pad: - Forgotten stat buttons https://tinyurl.com/2o78v96t and https://tinyurl.com/2ndefjzc A previous PR for the same kind of fix on stat buttons was done and merged https://github.com/odoo-dev/enterprise/pull/556 and https://github.com/odoo-dev/odoo/pull/2494 task-3326558 part of task-3326263 Related to Community PR: https://github.com/odoo/odoo/pull/121367 Forward-Port-Of: odoo/enterprise#41041
This commit reverts partially https://github.com/odoo/odoo/pull/116388 Intent of commit above was to solve a UX issue when user wanted to send a message containing an emoji at the end, by using an emoticon. For example, user expects to type `:)` then `Enter` to post a message with happy smiley, but instead it adds the 1st canned response matching search term `)`. The solution of commit was to enable canned response only in livechat and in helpdesk. However, canned responses are more popu
Original PR description
This commit reverts partially https://github.com/odoo/odoo/pull/116388 Intent of commit above was to solve a UX issue when user wanted to send a message containing an emoji at the end, by using an…
This commit reverts partially https://github.com/odoo/odoo/pull/116388 Intent of commit above was to solve a UX issue when user wanted to send a message containing an emoji at the end, by using an emoticon. For example, user expects to type `:)` then `Enter` to post a message with happy smiley, but instead it adds the 1st canned response matching search term `)`. The solution of commit was to enable canned response only in livechat and in helpdesk. However, canned responses are more popular than we thought, and they are even used in other apps like Project. The users of Project either use canned responses a lot or never. So it's not a good option to simply disable canned responses in this app. This commit make canned responses available in all threads except `discuss.channel` that are not livechat. In other words, canned responses are specifically disabled in - Public discuss channels - Direct Messages chats - Group chats We think that conflicting features canned responses and emoticons happen mostly in chats. - Livechat needs canned response so there's still this clash, but canned response have a lot of value so it's fine for emoticon to be slightly harder to use. - Public channels, group chats, and DM chats have no use for canned responses, therefore disabling canned response makes sense! https://github.com/odoo/odoo/pull/127382 Forward-Port-Of: odoo/enterprise#43670
Issue before this commit:- The requested document is not linked to the related task Step to reproduce: -Install documents & project. -Go to the project and open a task. -Click on the document stat button. -Request a document. -Upload the requested document. -Go back to the task and click the documents stat button. The requested document is not shown in the view. After this commit, Desired functionality is achieved. Task:- 3266059 Forward-Port-Of: odoo/enterprise#43329 Forward-P
Original PR description
Issue before this commit:- The requested document is not linked to the related task Step to reproduce: -Install documents & project. -Go to the project and open a task. -Click on the document stat button. -Request a document. -Upload the requested document. -Go back to the task and click the documents stat button. The requested document is not shown in the view. After this commit, Desired functionality is achieved. Task:- 3266059 Forward-Port-Of: odoo/enterprise#43329 Forward-Port-Of: odoo/enterprise#41277
This PR fixes the following issues: **[EDI] Calendar: Dropdown items under Share Availability look like ugly buttons https://www.awesomescreenshot.com/image/39781887?key=d67b9856835522d9fa1467a971538299** The dropdown items displayed as buttons stacked on top of eachother. Removing the `.btn` classes fixes the issue, leaving the dropdown-items to their normal behavior. This commit also removes the misspelt class `font-weigth-bold` on these elements. task-3326567 part of task-33262
Original PR description
This PR fixes the following issues: **[EDI] Calendar: Dropdown items under Share Availability look like ugly buttons https://www.awesomescreenshot.com/image/39781887?key=d67b9856835522d9fa1467a971538299** The dropdown items displayed as buttons stacked on top of eachother. Removing the `.btn` classes fixes the issue, leaving the dropdown-items to their normal behavior. This commit also removes the misspelt class `font-weigth-bold` on these elements. task-3326567 part of task-3326263 Community PR: https://github.com/odoo/odoo/pull/121392 Forward-Port-Of: odoo/enterprise#41050
In the document inspector, the spreadsheet bundle is dynamically loaded. It appears `loadBundle` takes more than one tick. Queuing a tick with `nextTick` and awaiting is not enough. With this commit, we explicitely load and wait the bundle before it's dynamically loaded in the code under test. Since the loading is memoized, it's done in a single tick when it's encountered in the document inspector runbot error 22383 Forward-Port-Of: odoo/enterprise#43689
Original PR description
In the document inspector, the spreadsheet bundle is dynamically loaded. It appears `loadBundle` takes more than one tick. Queuing a tick with `nextTick` and awaiting is not enough. With this commit, we explicitely load and wait the bundle before it's dynamically loaded in the code under test. Since the loading is memoized, it's done in a single tick when it's encountered in the document inspector runbot error 22383 Forward-Port-Of: odoo/enterprise#43689
when parent order next invoice date is updated taskid: 3344789 Forward-Port-Of: odoo/enterprise#43638 Forward-Port-Of: odoo/enterprise#42486
Original PR description
when parent order next invoice date is updated taskid: 3344789 Forward-Port-Of: odoo/enterprise#43638 Forward-Port-Of: odoo/enterprise#42486