Daily updates from Odoo
Navigate
Branch
Monday, July 17, 2023
20 changes
Security fixes and vulnerability patches
Employees who are managers on an employee record will no longer automatically see that person's appraisals unless they are also assigned as a manager on the appraisal. This prevents appraisal information from being shown to people who should not have access.
Original PR description
…ers on employee but not on appraisal task - 3293253
New functionality added to Odoo
Manufacturing barcode users can now see the quality check action when a production order has pending checks. Validation is blocked until those checks are completed, helping prevent production orders from being finalized before required quality controls are done.
Original PR description
Before this commit ================== Currently, The quality check button was not visible in the barcode when there is quality checks to do for manufacturing orders. After this commit ================= With this commit enable quality check button and disable validation button on production with barcode when there still quality checks to do on the manufacturing order. task - 3358263
Enhancements to existing features
Subscription sales now behave more predictably when users create quotes, send emails, or manage order lines. The update keeps subscription quotations visible when appropriate, requires recurrence details for recurring products before emailing, and limits deletions on confirmed subscriptions to recurring lines only.
Original PR description
Form view : - Remove the "quick create" in the subscription template dropdown of the Subscription but keep the "create and edit". - Make "recurrence field" mandatory when clicking on Send by email if the SO contains any recurring product. - Only recurring line can be deleted from a Subscription with Sale order state : sale order (done) List View: - Then a quotation is created from Subscription, it should stay visible in the list of subscription quotations even if it does not contain any recurrence. The subscription state "Subscription quotation" should not be removed while the SO status is quotation but when the SO is sent or confirmed, if recurrence is empty (and no recurring product), it should no longer be consider as a subscription (subscription state should be empty). task-id : 3339772
This update adds automated checks for the task Gantt view in Project Enterprise. It helps ensure scheduling and planning screens continue to work as expected when future changes are made.
Original PR description
This PR adds different tests for the gantt view of tasks, in project_enterprise. task-3338313
Resolved issues and error corrections
This fix adds missing database indexing for key engineering change approval and status fields. It should make approval queues, counters, filters, and related searches respond faster without changing user workflows.
Original PR description
Add missing index on `approval_type` of `mrp.eco.approval.template`, `status` of `mrp.eco.approval`, `state` of `mrp.eco` used in: - `_search_awaiting_my_validation` - `_compute_nb` - in search view filters - a few searches on 'mrp.eco' task-3420528
Features or functions removed from Odoo
The separate Website Sale dashboard is being removed because it will be rebuilt as part of the broader Dashboard App. This reduces duplicate dashboard handling and prepares the website reporting experience for the upcoming redesign.
Original PR description
This dashboard depends on the website dashboard which is to be re-done in OWL. Instead of keeping this dashboard as a separate component, it will be re-done in the Dashboard App (see task-3222991). The enterprise module referenced the community dashboard to hide it, this is no longer needed. task-3164163
Miscellaneous changes
When the SOL field was moved from the 'Invoicing' tab to the 'Settings' tab in the project form view, the visibility of the field was not properly updated. An override in `industry_fsm_sale` erroneously removes the condition that the project has to be billable and have a partner set. This commit adds this condition to the override. Forward-Port-Of: odoo/enterprise#44203
Original PR description
When the SOL field was moved from the 'Invoicing' tab to the 'Settings' tab in the project form view, the visibility of the field was not properly updated. An override in `industry_fsm_sale` erroneously removes the condition that the project has to be billable and have a partner set. This commit adds this condition to the override. Forward-Port-Of: odoo/enterprise#44203
[FIX] *: minor settings spacing issues The purpose of this commit is to review the responsiveness and spacing of a few settings that were broken. The nested checkboxes were growing too much on smaller screens making the content overflow. Same goes for some inputs that were missing their row class (rental and accounting settings). Finally it realigns the Fiscal Years settings from accounting by using a col-lg-6 such as the other settings and deleting the custom styling Befor
Original PR description
[FIX] *: minor settings spacing issues The purpose of this commit is to review the responsiveness and spacing of a few settings that were broken. The nested checkboxes were growing too much on…
[FIX] *: minor settings spacing issues The purpose of this commit is to review the responsiveness and spacing of a few settings that were broken. The nested checkboxes were growing too much on smaller screens making the content overflow. Same goes for some inputs that were missing their row class (rental and accounting settings). Finally it realigns the Fiscal Years settings from accounting by using a col-lg-6 such as the other settings and deleting the custom styling Before:   After:   Task-3113372 Community: https://github.com/odoo/odoo/pull/108902 Forward-Port-Of: odoo/enterprise#42875 Forward-Port-Of: odoo/enterprise#35323
This commit is the extension of d8ca8683f0ad89cd9b75d3ec6edbc2ce5dff97d1 Related PR https://github.com/odoo/enterprise/pull/42833 task-3378296 part of task-3326263 Forward-Port-Of: odoo/enterprise#44127
Original PR description
This commit is the extension of d8ca8683f0ad89cd9b75d3ec6edbc2ce5dff97d1 Related PR https://github.com/odoo/enterprise/pull/42833 task-3378296 part of task-3326263 Forward-Port-Of: odoo/enterprise#44127
Steps to reproduce ================== - Use a mobile sized viewport / mobile device - Go to Manufacturing - Click on a computer icon next to the "Plan Orders" button - Click on the dropdown arrow - Click on "Log In" -> A popup should appear but nothing happens Cause of the issue ================== The popups are placed after the Kanban/List viewbuttons. On mobile, this is a collapsed section. Solution ======== For dialogs, there is a `useService("dialog")` designed to ha
Original PR description
Steps to reproduce
==================
- Use a mobile sized viewport / mobile device
- Go to Manufacturing
- Click on a computer icon next to the "Plan Orders" button
- Click on the dropdown arrow
- Click on "Log In"
-> A popup should appear but nothing happens
Cause of the issue
==================
The popups are placed after the Kanban/List viewbuttons. On mobile, this is a collapsed section.
Solution
========
For dialogs, there is a `useService("dialog")` designed to handle those usecases. In order to use the service, the component need to be inside a `<Dialog/>` component. For that, we can create a DialogWrapper component. We then edit the `useConnectedEmployee` hook to use the dialog service. With that, we need to pass the props directly. They are taken from the previous template.
opw-3418639
Forward-Port-Of: odoo/enterprise#44040…ld item Before this PR you could set a item that had already been sold as recurring. This would lead to issue with timesheeted product. This PR resolve the issue by disallowing the change on recurring_invoice if the product has already been confirmed. opw-3347301 Forward-Port-Of: odoo/enterprise#43863
Original PR description
…ld item Before this PR you could set a item that had already been sold as recurring. This would lead to issue with timesheeted product. This PR resolve the issue by disallowing the change on recurring_invoice if the product has already been confirmed. opw-3347301 Forward-Port-Of: odoo/enterprise#43863
When the user tries to upload a corrupted PDF in the document module, they will face the KeyError. Steps to produce: - Open the document module. - Use the following link to download the PDF document. Link: https://github.com/py-pdf/PyPDF2/files/9066120/UTA_OSHA_3115_Fall_Protection_Training_09162021_.pdf - Click on the Upload button to select a downloaded PDF document. - Error will be produced This commit addresses the traceback issue `KeyError` '/Pages' that occurs when uploading
Original PR description
When the user tries to upload a corrupted PDF in the document module, they will face the KeyError. Steps to produce: - Open the document module. - Use the following link to download the PDF document.…
When the user tries to upload a corrupted PDF in the document module, they will
face the KeyError.
Steps to produce:
- Open the document module.
- Use the following link to download the PDF document.
Link: https://github.com/py-pdf/PyPDF2/files/9066120/UTA_OSHA_3115_Fall_Protection_Training_09162021_.pdf
- Click on the Upload button to select a downloaded PDF document.
- Error will be produced
This commit addresses the traceback issue `KeyError` '/Pages' that occurs when
uploading a document in the document module. The problem arises when a PDF
document is uploaded, and the function `PdfFileReader` from the external library
`PyPDF2` is called. This function is responsible for returning the number of
pages in the PDF document and setting the `is_multipage` field to either `true`
or `false`. To resolve this problem, added a `KeyError` exception handler within
the existing `try-catch` block. By doing so, the `KeyError` that is causing the
traceback will be caught and handled appropriately.
See traceback
```
KeyError: '/Pages'
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 135, in retrying
env.cr.flush() # submit the changes to the database
File "odoo/sql_db.py", line 135, in flush
self.transaction.flush()
File "odoo/api.py", line 845, in flush
env_to_flush.flush_all()
File "odoo/api.py", line 706, in flush_all
self._recompute_all()
File "odoo/api.py", line 702, in _recompute_all
self[field.model_name]._recompute_field(field)
File "odoo/models.py", line 6377, in _recompute_field
field.recompute(records)
File "odoo/fields.py", line 1365, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1338, in apply_except_missing
func(records)
File "odoo/fields.py", line 1387, in compute_value
records._compute_field_value(self)
File "addons/mail/models/mail_thread.py", line 396, in _compute_field_value
return super()._compute_field_value(field)
File "odoo/models.py", line 4486, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 99, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-16.3/documents/models/documents_document.py", line 127, in _compute_is_multipage
document.is_multipage = bool(document._get_is_multipage()) # None => False
File "home/odoo/src/enterprise/saas-16.3/documents_spreadsheet/models/documents_document.py", line 210, in _get_is_multipage
is_multipage = super()._get_is_multipage()
File "home/odoo/src/enterprise/saas-16.3/documents/models/documents_document.py", line 199, in _get_is_multipage
return PdfFileReader(stream, strict=False).numPages > 1
File "PyPDF2/pdf.py", line 1158, in <lambda>
numPages = property(lambda self: self.getNumPages(), None, None)
File "PyPDF2/pdf.py", line 1155, in getNumPages
self._flatten()
File "PyPDF2/pdf.py", line 1506, in _flatten
pages = catalog["/Pages"].getObject()
File "PyPDF2/generic.py", line 520, in __getitem__
return dict.__getitem__(self, key).getObject()
```
Sentry-4292606596
Forward-Port-Of: odoo/enterprise#43826When user selects wrong product for wrong 'pos_config_id' in 'Preparation Display' and ties to 'Open Display' traceback raises. To produce the issue: 1) Install 'pos_restaurant_preparation_display' 2) Open pos and click on 'new session' for Shop 3) Now select any product and click payments then payment method and validate 4) Now click 'backend' in three lines of right corner 5) Now click Orders/Preparation Display in menuitems 6) Create a new Preparation Display and select 'Point o
Original PR description
When user selects wrong product for wrong 'pos_config_id' in 'Preparation Display' and ties to 'Open Display' traceback raises. To produce the issue: 1) Install 'pos_restaurant_preparation_display'…
When user selects wrong product for wrong 'pos_config_id' in 'Preparation Display' and ties to 'Open Display' traceback raises.
To produce the issue:
1) Install 'pos_restaurant_preparation_display'
2) Open pos and click on 'new session' for Shop
3) Now select any product and click payments then payment method and validate
4) Now click 'backend' in three lines of right corner
5) Now click Orders/Preparation Display in menuitems
6) Create a new Preparation Display and select 'Point of sale' as Shop
7) Select any product in product category except 'Chairs'.
8) Save the record and back to 'Preparation Display' in menuitems/Orders
9) Click on "Open Display" of the above created record.
```
TypeError: 'NoneType' object does not support item assignment
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 1927, 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 30, in call_kw
return 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/pos_preparation_display/models/preparation_display.py", line 40, in get_preparation_display_data
'orders': self.env["pos_preparation_display.order"].get_preparation_display_order(self.id)
File "home/odoo/src/enterprise/saas-16.3/pos_preparation_display/models/preparation_display_order.py", line 146, in get_preparation_display_order
order_ui = order._export_for_ui(preparation_display)
File "home/odoo/src/enterprise/saas-16.3/pos_restaurant_preparation_display/models/preparation_display_order.py", line 10, in _export_for_ui
order_for_ui['table'] = {
```
On '_export_for_ui' method in 'pos_preparation_display_order', order_for_ui variable trying to assign an item .
https://github.com/odoo/enterprise/blob/6abe363298db59bc2d695abeabbda44403f6959a/pos_restaurant_preparation_display/models/preparation_display_order.py#L7-L17
In the above usecase because of in supercall, 'order_for_ui' return None and when trying for item assignment it leads to the above traceback.
Sentry-4265840428
Forward-Port-Of: odoo/enterprise#43039Steps to reproduce: - Create a product with 1 unit available; - Create a rental order with this product: the wizard mentions: 1 Unit available - Add 1 delivered quantity and save: 0 Unit in hand - Remove the delivered quantity and save; Still 0 unit in hand, and try to add it to a new rental order, the wizard mentions: 0 unit available. The problem is that if the quantity returned and delivered on the sale order line are 0, the stock move is not created. OPW-3324198 Forward-Port-Of
Original PR description
Steps to reproduce: - Create a product with 1 unit available; - Create a rental order with this product: the wizard mentions: 1 Unit available - Add 1 delivered quantity and save: 0 Unit in hand - Remove the delivered quantity and save; Still 0 unit in hand, and try to add it to a new rental order, the wizard mentions: 0 unit available. The problem is that if the quantity returned and delivered on the sale order line are 0, the stock move is not created. OPW-3324198 Forward-Port-Of: odoo/enterprise#44177 Forward-Port-Of: odoo/enterprise#44146
before this commit, in the invisible condition for the button, '=' operator is used instead of 'in' the comparison after this commit, wrong operator will be corrected to 'in' operator Forward-Port-Of: odoo/enterprise#43641
Original PR description
before this commit, in the invisible condition for the button, '=' operator is used instead of 'in' the comparison after this commit, wrong operator will be corrected to 'in' operator Forward-Port-Of: odoo/enterprise#43641
Prior to this commit, the calculated line height of `o_gantt_row_header` took into account the border-bottom of the cell. As a result, the content exceeded the cell by 1px, hiding the border when the cell was hovered. Before :  After:  After:  task-3419354 Part of task-3326263 Forward-Port-Of: odoo/enterprise#43887
It wasn't possible to merge `res.users` records because the reified groups didn't exists as fields and checking their groups would therefore fail. task-3424126 Forward-Port-Of: odoo/enterprise#44099
Original PR description
It wasn't possible to merge `res.users` records because the reified groups didn't exists as fields and checking their groups would therefore fail. task-3424126 Forward-Port-Of: odoo/enterprise#44099
Before this commit, the shipping request for international shipments did not include `CommodityCode` and `ImportCommodityCode`. These fields may be included when the HS code is defined for the product. opw-3373602 Forward-Port-Of: odoo/enterprise#43715
Original PR description
Before this commit, the shipping request for international shipments did not include `CommodityCode` and `ImportCommodityCode`. These fields may be included when the HS code is defined for the product. opw-3373602 Forward-Port-Of: odoo/enterprise#43715
Before this commit, when a rental product is away (rented by a customer), it is considered as unavailable while it has not been returned, i.e. by a manual return on SO. It should only be considered unavailable for the rental period (+ the security time if one is defined). Steps to reproduce: - Select a product that can be rented, of storable type and that is not configured as "continue selling" when out-of-stock - Have one unit in stock of this product - Rental app: rent this product for
Original PR description
Before this commit, when a rental product is away (rented by a customer), it is considered as unavailable while it has not been returned, i.e. by a manual return on SO. It should only be considered unavailable for the rental period (+ the security time if one is defined). Steps to reproduce: - Select a product that can be rented, of storable type and that is not configured as "continue selling" when out-of-stock - Have one unit in stock of this product - Rental app: rent this product for any period of time > confirm the SO > validate the pickup - Go into the website and try to rent for any other period than the one selected previously - "Out-of-stock" message The sale order lines to take into account the availability should not be restricted to the dates of the desired rental period. task-3040381 opw-3324198 Forward-Port-Of: odoo/enterprise#38709
In the _facebook_comment_fetch method, the logger is updated to use the 'warning' level instead of the 'error' level. this error might be generated due to invalid data or having a problem with permission on Facebook. The changes have been made to reduce the noise level in the sentry. sentry Message:- ``` An error occurred while fetching the comment: {"error":{"message":"Unsupported get request. Object with ID '100721852881741_208802622074285' does not exist, cannot be loaded due to mis
Original PR description
In the _facebook_comment_fetch method, the logger is updated to use the 'warning' level instead of the 'error' level.
this error might be generated due to invalid data or having a problem with permission on Facebook.
The changes have been made to reduce the noise level in the sentry.
sentry Message:-
```
An error occurred while fetching the comment: {"error":{"message":"Unsupported get request. Object with ID '100721852881741_208802622074285' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"Arg0Pq9KX2b7OFh-o1KTj9T"}}
```
sentry-4242012184
Forward-Port-Of: odoo/enterprise#42339