Daily updates from Odoo
Navigate
Branch
Monday, November 21, 2022
19 changes
Enhancements to existing features
Amazon-related sales screens now show the Amazon order reference in key views, making it easier for users to find and track marketplace orders. Account and delivery order pages also display clear status badges, helping teams quickly see whether an Amazon account is linked and whether a delivery is waiting for Amazon synchronization.
Original PR description
This commit adds: - the field `amazon_order_ref` in the list, form and search views, - a badge "Linked Account" or "Unlinked Account" on the form view of Amazon accounts, - a badge "Waiting Amazon Synchronization" on the form view of delivery orders. task-2806571
The salary simulation wizard now only displays the option to request a new car when the employee has already reached the allowed number of used cars. This keeps the form cleaner and helps users focus on choices that apply to their situation.
Original PR description
Purpose: Generally, the user is not able to pick the new car if the amount of used cars is already reached. But it can be overruled by ticking the field 'new_car' on the 'Generate a Simulation Link' wizard. Thus it makes sense to show 'new_car' only when it is needed. Now 'new_car' is always visible on the wizard. After this commit the field 'new_car' will only be visible on the wizard if the amount of used cars is already reached. task - 3035820
Resolved issues and error corrections
This fix ensures help text in empty lists displays with the intended formatting instead of showing raw or broken HTML. It improves the clarity of guidance shown to users when no records are available.
Original PR description
Some cases require usage of Markup in order to correctly display HTML content and avoid escaped or invalid statements. Task-3074357
This change refreshes internal performance test expectations for appointment, discussion, and mail features to match the current system baseline. It helps teams more reliably detect future performance changes without affecting day-to-day users.
Original PR description
…counters Update to current runbot state, in order to better spot changes potentially introduced with this PR. Task-2710804 (Mail: Clean MailThread API)
Code cleanup and technical improvements
This change standardizes how rendering options are passed when generating email and document content in follow-up, appraisal, and survey-related workflows. It is an internal cleanup that should make future mail rendering changes safer and more consistent, with little direct impact on day-to-day users.
Original PR description
Note: various: account_followup, helpdesk, hr_appraisal(_survey) Due to recent improvements (Jinja -> Qweb, safe rendering) rendering API supports several ways of giving options to the rendering…
Note: various: account_followup, helpdesk, hr_appraisal(_survey) Due to recent improvements (Jinja -> Qweb, safe rendering) rendering API supports several ways of giving options to the rendering process. Those have mainly two usage * ``preserve_comments`` : keep comments in rendered HTML, used notably in mass mailing or digest to keep browser-specific comments; * ``post_process`` : perform a post processing on rendered HTML, used notably to process local links and add tracking to shortened links; All those are now given directly inside an optional ``options`` parameter given to ``_render_field`` and its sub-method ``_render_template``. They can also be defined at field level, using ``render_options`` field parameter. Impacts are * when rendering a MailTemplate field using ``_render_field``: options now come from the template fields definition (see ``body_html`` and ``subject`` generally); * when rendering content using ``render_template``, use ``options`` dict to propagate options; Add engine used for rendering, even if it is the default value, better explicit than sorry. See community PR for more details. Task-2710804 (Mail: Clean MailThread API) Prepares Task-2088884 (Mail: Use editable computed stored fields in composer)
Miscellaneous changes
This commit addresses two bugs: 1. A call to `ormService` when trying to save a spreadsheet as template was still using the old API and would crash when trying to convert a pivot with several levels of group by. 2. The conversion of a template to a standard spreadsheet would traceback when it contained a pivot without user data; i.e. a pivot for which the combination of model/domain would not have any data. opw 3060534 Co-authored-by: Lucas Lefèvre <lul@odoo.com> Forward-Port-Of: od
Original PR description
This commit addresses two bugs: 1. A call to `ormService` when trying to save a spreadsheet as template was still using the old API and would crash when trying to convert a pivot with several levels of group by. 2. The conversion of a template to a standard spreadsheet would traceback when it contained a pivot without user data; i.e. a pivot for which the combination of model/domain would not have any data. opw 3060534 Co-authored-by: Lucas Lefèvre <lul@odoo.com> Forward-Port-Of: odoo/enterprise#34194
Purpose ======= When an article has a cover and an icon the remaining buttons are hidden behind the icon. Specs ===== The buttons were moved below the icon and the css for the `o_overlap_cover` class has been slightly modified to accomodate the changes. task-3046408 Forward-Port-Of: odoo/enterprise#33365
Original PR description
Purpose ======= When an article has a cover and an icon the remaining buttons are hidden behind the icon. Specs ===== The buttons were moved below the icon and the css for the `o_overlap_cover` class has been slightly modified to accomodate the changes. task-3046408 Forward-Port-Of: odoo/enterprise#33365
# Current behaviour When we are printing a report and then the report fails to generate (for ex. wkhtmltopdf memory limit/timeout), the incorrect state is committed to the database. # Expected behaviour We should rollback when generating reports fails, since it is an error state. # Steps to reproduce To reproduce the behaviour, we need to force an error state. - In odoo/addons/base/models/ir_actions_report.py:`_run_wkhtmltopdf()`, raise an exception before spawning the subprocess (for
Original PR description
# Current behaviour When we are printing a report and then the report fails to generate (for ex. wkhtmltopdf memory limit/timeout), the incorrect state is committed to the database. # Expected…
# Current behaviour
When we are printing a report and then the report fails to generate (for ex. wkhtmltopdf memory limit/timeout),
the incorrect state is committed to the database.
# Expected behaviour
We should rollback when generating reports fails, since it is an error state.
# Steps to reproduce
To reproduce the behaviour, we need to force an error state.
- In odoo/addons/base/models/ir_actions_report.py:`_run_wkhtmltopdf()`, raise an exception before spawning the subprocess (for ex. adding a 1/0).
- In addons/web/controllers/main.py:`report_download()`#L2126, add this little code snippet:
```python
ids = [int(x) for x in docids.split(",")]
report = request.env['ir.actions.report']._get_report_from_name(reportname)
obj = request.env[report.model].browse(ids)
if getattr(obj, 'message_post'):
obj.message_post(body='This report was committed!')
```
- Install Inventory
- Pick a delivery order and try to print it, there should be an error (whatever exception you decided to raise in `_run_wkhtmltopdf()`)
- See that in the message board we got a message that the report has been committed, which isn't the case, it failed to generate.
# Reason for the problem
Controllers are catching the exception when generating reports, but never reset the state of the database.
# Fix
Raise an InternalServerError with an error code of 500 to trigger a database rollback.
# Affected versions
- 14.0
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master
---
opw-3001950
Forward-Port-Of: odoo/enterprise#34177
Forward-Port-Of: odoo/enterprise#33443Forward-Port-Of: odoo/enterprise#33542
Original PR description
Forward-Port-Of: odoo/enterprise#33542
Mock requests for the different delivery providers + bug fixes. Forward-Port-Of: odoo/enterprise#33403
Original PR description
Mock requests for the different delivery providers + bug fixes. Forward-Port-Of: odoo/enterprise#33403
In some conditions, due to a server error, it is not possible to validate a QC to register a consumed quantity To reproduce the issue: 1. Create two storable products P_compo, P_finished 2. Set the on-hand quantity of both products to 1 3. Edit the operation type Manufacturing: - Reservation Method: Manually 4. Create a bill of materials BoM - Product: P_finished - Type: Manufacture - Operations: a new operation OP - Components: - P_finished, Consumed in
Original PR description
In some conditions, due to a server error, it is not possible to validate a QC to register a consumed quantity To reproduce the issue: 1. Create two storable products P_compo, P_finished 2. Set the…
In some conditions, due to a server error, it is not possible to
validate a QC to register a consumed quantity
To reproduce the issue:
1. Create two storable products P_compo, P_finished
2. Set the on-hand quantity of both products to 1
3. Edit the operation type Manufacturing:
- Reservation Method: Manually
4. Create a bill of materials BoM
- Product: P_finished
- Type: Manufacture
- Operations: a new operation OP
- Components:
- P_finished, Consumed in OP
5. Create and confirm a MO with BoM
6. Open the tablet view of the work order
7. Set the quantities:
- Producing: 1
- P_compo's qty: 1
8. Validate the quality check
Error: an Odoo Error is displayed "AttributeError: 'quality.check'
object has no attribute 'product_uom_id'"
Before Odoo 15.5, the method `_create_extra_move_lines` was defined on
`mrp.workorder`, which has the field `product_uom_id`. From now on, it
is defined on the model `quality.check` which does not have such a
field.
OPW-3053568
Forward-Port-Of: odoo/enterprise#34045Recently a sepa mapping was added in odoo/enterprise#33957. Few characters were missing from the regex and they should be added for the complete mapping. Characters <,>,& do not need to be in the mapping (and they're not) because they are correctly formatted when an XML file is generated (<,>,&) Forward-Port-Of: odoo/enterprise#34114 Forward-Port-Of: odoo/enterprise#34096
Original PR description
Recently a sepa mapping was added in odoo/enterprise#33957. Few characters were missing from the regex and they should be added for the complete mapping. Characters <,>,& do not need to be in the mapping (and they're not) because they are correctly formatted when an XML file is generated (<,>,&) Forward-Port-Of: odoo/enterprise#34114 Forward-Port-Of: odoo/enterprise#34096
Fixes two issues (one real bugs and at least two race conditions). Forward-Port-Of: odoo/enterprise#34104
Original PR description
Fixes two issues (one real bugs and at least two race conditions). Forward-Port-Of: odoo/enterprise#34104
Steps: - Go to Subscription - Open studio and create a new blank report - Try to add Subtotal & Total block - traceback Add an dialog alert to explain to the user that the subotal & total block cannot be used everywhere opw-3020075 Forward-Port-Of: odoo/enterprise#33170
Original PR description
Steps: - Go to Subscription - Open studio and create a new blank report - Try to add Subtotal & Total block - traceback Add an dialog alert to explain to the user that the subotal & total block cannot be used everywhere opw-3020075 Forward-Port-Of: odoo/enterprise#33170
Have a kanban arch with sample="1" set on the kanban node of the arch. The kanban must be grouped by a many2one field. Open that kanban in studio. Before this commit, there was a crash, because sample data are not meant to be dealt with by studio. Instead, when no data is present a fake empty record should be shown. After this commit, there is no crash. Forward-Port-Of: odoo/enterprise#34140
Original PR description
Have a kanban arch with sample="1" set on the kanban node of the arch. The kanban must be grouped by a many2one field. Open that kanban in studio. Before this commit, there was a crash, because sample data are not meant to be dealt with by studio. Instead, when no data is present a fake empty record should be shown. After this commit, there is no crash. Forward-Port-Of: odoo/enterprise#34140
- Add tests for a previous fix who was merged without test ( [[FIX] stock: don't auto remove 0 quant with user](https://github.com/odoo/odoo/commit/7c5143e95ef1fcceafe5e331c3e8649e08666ae7) ); - Fix a bug where `dummy_id` (sometime a string, sometime a number) was compared with the line's virtual ID (always a number); - Fix visual issues (summary line's background was transparent and the button to dismiss a picking's note was ugly as hell); - Fix a bug where the wrong quant was updated in mul
Original PR description
- Add tests for a previous fix who was merged without test ( [[FIX] stock: don't auto remove 0 quant with user](https://github.com/odoo/odoo/commit/7c5143e95ef1fcceafe5e331c3e8649e08666ae7) ); - Fix a bug where `dummy_id` (sometime a string, sometime a number) was compared with the line's virtual ID (always a number); - Fix visual issues (summary line's background was transparent and the button to dismiss a picking's note was ugly as hell); - Fix a bug where the wrong quant was updated in multilocation. See commits' message for more information. Forward-Port-Of: odoo/enterprise#33084
This is a revert of a previous fix. In Odoo 16 the translation of python code is not saved in the database. The translation is read directly from the po files. Thus the previous workaround isn't needed anymore in Odoo 16. Fix: undo the renaming of "Average", remove en.po and change it in pot file Related commit: https://github.com/odoo/enterprise/commit/fcfb4ff96647960e99f2b230b817f0c1a94c3e73 Forward-Port-Of: odoo/enterprise#33953
Original PR description
This is a revert of a previous fix. In Odoo 16 the translation of python code is not saved in the database. The translation is read directly from the po files. Thus the previous workaround isn't needed anymore in Odoo 16. Fix: undo the renaming of "Average", remove en.po and change it in pot file Related commit: https://github.com/odoo/enterprise/commit/fcfb4ff96647960e99f2b230b817f0c1a94c3e73 Forward-Port-Of: odoo/enterprise#33953
If a package already has a location, the user will not be able to use it as destination package in the Barcode app. To reproduce the issue: 1. In Settings, enable "Packages" 2. Create a package PK 3. Create a product P - Storable - With a barcode 4. Update the on hand quantity of P: - 1 x P in package PK 5. Barcode > Operations > Receipts, Create 6. Scan P 7. Scan PK Error: an error message is displayed "You are expected to scan more products or a destination locati
Original PR description
If a package already has a location, the user will not be able to use it as destination package in the Barcode app. To reproduce the issue: 1. In Settings, enable "Packages" 2. Create a package PK 3.…
If a package already has a location, the user will not be able to use it
as destination package in the Barcode app.
To reproduce the issue:
1. In Settings, enable "Packages"
2. Create a package PK
3. Create a product P
- Storable
- With a barcode
4. Update the on hand quantity of P:
- 1 x P in package PK
5. Barcode > Operations > Receipts, Create
6. Scan P
7. Scan PK
Error: an error message is displayed "You are expected to scan more
products or a destination location."
If the user edits the line added at step 6, he will be able to select
the package PK. This flow also works from the Inventory app. Therefore,
scanning PK should also work.
Server-side, when loading the view state, we get the available packages
for each picking:
https://github.com/odoo/enterprise/blob/b2080c9aa9d8318d381d9e0f5a1b4a94eb86a258/stock_barcode/models/stock_picking.py#L69-L70
However, the domain is incorrect: it gets all packages that do not have
any location yet. It should also include all packages that are already
at the destination location of the related picking.
OPW-2997713
Forward-Port-Of: odoo/enterprise#34117
Forward-Port-Of: odoo/enterprise#33437Currently, switching from one article to another reloads the tree panel on the side, which in many cases is not necessary as nothing changed in the articles structure. This commit removes that unnecessary refresh, saving a RPC and making the interface smoother. Task-3017497 Forward-Port-Of: odoo/enterprise#32791
Original PR description
Currently, switching from one article to another reloads the tree panel on the side, which in many cases is not necessary as nothing changed in the articles structure. This commit removes that unnecessary refresh, saving a RPC and making the interface smoother. Task-3017497 Forward-Port-Of: odoo/enterprise#32791