Thursday, January 13, 2022
26 changes · master
Enhancements to existing features
Test runs now reduce duplicate error messages caused by automatic retries, making build pages easier to read. This helps teams spot the real issue faster without changing product behavior for end users.
Original PR description
Since auto-retry, real errors will lead to doubled errors on runbot. This can be noisy and hard to understand. This commit will help with this by using a lower log level on the first execution. Log 25 are kepts.
This update standardizes how messaging and live chat interface components identify and connect to their underlying data. It is an internal cleanup that should make the mail and live chat features easier to maintain without changing day-to-day user workflows.
Original PR description
task-2732017
This update tidies internal code, improves developer documentation, and resolves IDE warnings across several Odoo areas. It should make future maintenance easier with little to no direct change for end users.
Original PR description
Got kinda carried away when fixing IDE warnings.
This update reorganizes and tidies the Sales module’s setup, demo, view, and security files without changing business functionality. The cleanup makes the module easier to maintain and reduces clutter for future updates.
Original PR description
* indentation * group records by models * products records (& attributes, values, ...) in the `product_demo.xml` file * group SO & SOL records together * group SO's confirmation in one place * ... * move `model_sale_order_action_share` server action to the correct `views` folder * remove useless nodes/indentation * split security files by models -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The mail app now creates the file selection control directly where it is needed instead of relying on a separate uploader component. This streamlines the underlying implementation while keeping the user experience for adding attachments unchanged.
Original PR description
Before this PR the only purpose of the file_uploader component was to inject a `<input type="file">` inside the DOM. We can now create this input directly inside the FileUploader model without register a component. task-2727815
The mail enterprise test suite was updated to match a change in the file upload input. This helps keep automated checks reliable without changing the user-facing attachment experience.
Original PR description
task-2727815
This update removes an unnecessary internal code step in the enterprise mail interface because related functions are now handled automatically. It does not change user-facing behavior, but it simplifies maintenance and reduces the chance of future technical issues.
Original PR description
All record methods are automatically bound since Task-2731656. Task-2731656 Task-2734101
Helpdesk tickets are now assigned with better awareness of each team member's working schedule and time off. This helps route tickets to available staff more reliably, with fallback checks over the next week if no one is currently available.
Original PR description
Purpose of the commit is to improve the random/balance assignation methods of ticket based on working calendar and time off of the member to handle the ticket in a timely manner. So in this commit, assign the ticket based on their resource calendar and on their time off. If none of the team members are available, fallback on the following period until there is a match OR maximum upto the next 7 days. TaskID: 2515170
Resolved issues and error corrections
This fixes an internal error that could occur when someone tried to duplicate system configuration records, an action that is normally blocked. The change ensures the intended user-friendly warning is shown consistently instead of a broken error.
Original PR description
Apparently a migration error in 0fd773a486fbc1aeef7f00ec5eab3eaf0e4c6a9d, probably never noticed because nobody ever tries to copy config objects since there's a bespoke widget, and it's specifically forbidden. Also fix the signature of the method itself to match the normal one. Moved over from #73535
Features or functions removed from Odoo
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Traceback on the ticket: https://pastebin.com/mCAFJVWG A browse should take an id or a list of ids as parameter. ```python record = env['mail.compose.message'].browse(1) attachments = env['ir.attachment'].sudo().browse(record.attachment_ids) print(attachments) attachments = env['ir.attachment'].sudo().browse(record.attachment_ids.ids) print(attachments) ``` OPW-2728748 Forward-Port-Of: odoo/odoo#82647
Original PR description
Traceback on the ticket: https://pastebin.com/mCAFJVWG A browse should take an id or a list of ids as parameter. ```python record = env['mail.compose.message'].browse(1) attachments = env['ir.attachment'].sudo().browse(record.attachment_ids) print(attachments) attachments = env['ir.attachment'].sudo().browse(record.attachment_ids.ids) print(attachments) ``` OPW-2728748 Forward-Port-Of: odoo/odoo#82647
Steps to reproduce the bug: - Create two batches, one with picking and one without - Try to compute their state together with an RPC call Problem: If the first has no picking, the second batch does not compute state because we use `”return”` instead of `”continue”` opw-2725988 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82619
Original PR description
Steps to reproduce the bug: - Create two batches, one with picking and one without - Try to compute their state together with an RPC call Problem: If the first has no picking, the second batch does not compute state because we use `”return”` instead of `”continue”` opw-2725988 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82619
There was some confusion about all the types of hybrid vehicles. Also changes the order in which they are displayed. TaskId-2629318 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82659
Original PR description
There was some confusion about all the types of hybrid vehicles. Also changes the order in which they are displayed. TaskId-2629318 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82659
Before this commit a "List" command hint was set as placeholder in navigation items without content upon selection of the header menu. This showed up when using the sidebar template of the header menu. After this commit the command hints are blacklisted for nav-items. task-2677310 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.
Original PR description
Before this commit a "List" command hint was set as placeholder in navigation items without content upon selection of the header menu. This showed up when using the sidebar template of the header menu. After this commit the command hints are blacklisted for nav-items. task-2677310 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78937
Whenever adding a snippet from the powerbox, the postprocessing was not made. This could result in unexpected behavior of the snippet. Task-2601600 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80417
Original PR description
Whenever adding a snippet from the powerbox, the postprocessing was not made. This could result in unexpected behavior of the snippet. Task-2601600 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#80417
This reverts commit 11fd24856e436136236d67f01dd88acc00105e9b. Removing the "21% S." tax made sense for Belgium, but created an issue for the mapping of fiscal positions. A task is being created to use the tax_scope instead (in master). Issue: https://github.com/odoo/odoo/pull/77549#issuecomment-1000103421 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82689
Original PR description
This reverts commit 11fd24856e436136236d67f01dd88acc00105e9b. Removing the "21% S." tax made sense for Belgium, but created an issue for the mapping of fiscal positions. A task is being created to use the tax_scope instead (in master). Issue: https://github.com/odoo/odoo/pull/77549#issuecomment-1000103421 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82689
When there are no emails to fetch, you get this error: ``` INFO odoo odoo.addons.fetchmail.models.fetchmail: start checking for new emails on pop server XXXX INFO odoo odoo.addons.fetchmail.models.fetchmail: General failure when trying to fetch mail from pop server XXXX. Traceback (most rec
Original PR description
When there are no emails to fetch, you get this error: ``` INFO odoo odoo.addons.fetchmail.models.fetchmail: start checking for new emails on pop server XXXX INFO odoo…
When there are no emails to fetch, you get this error:
```
INFO odoo odoo.addons.fetchmail.models.fetchmail: start checking for new emails on pop server XXXX
INFO odoo odoo.addons.fetchmail.models.fetchmail: General failure when trying to fetch mail from pop server XXXX.
Traceback (most recent call last):
File "/opt/odoo/auto/addons/fetchmail/models/fetchmail.py", line 210, in fetch_mail
_logger.info("Fetched %d email(s) on %s server %s; %d succeeded, %d failed.", num, server.server_type, server.name, (num - failed_in_loop), failed_in_loop)
UnboundLocalError: local variable 'num' referenced before assignment
```
The fix is pretty obvious.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
MT-118 @moduon
Forward-Port-Of: odoo/odoo#82371Forward-Port-Of: odoo/odoo#82687
Original PR description
Forward-Port-Of: odoo/odoo#82687
Description of the issue/feature this PR addresses: https://github.com/odoo/upgrade-specific/pull/1594 Current behavior before PR: `find` treated as a single record, leading to `ValueError` at https://github.com/odoo/odoo/blob/14.0/addons/website/models/ir_module_module.py#L158 if it happens to contain more than one record. Desired behavior after PR is merged: <strike>Loop over `find` as it may contain more than one record.</strike> Strengthen the search to ensure that find always cont
Original PR description
Description of the issue/feature this PR addresses: https://github.com/odoo/upgrade-specific/pull/1594 Current behavior before PR: `find` treated as a single record, leading to `ValueError` at https://github.com/odoo/odoo/blob/14.0/addons/website/models/ir_module_module.py#L158 if it happens to contain more than one record. Desired behavior after PR is merged: <strike>Loop over `find` as it may contain more than one record.</strike> Strengthen the search to ensure that find always contain one record. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#79197
Create a demo database installing l10n_ar and sale_timesheet, something like: `odoo -i l10n_ar,sale_timesheet` Current behavior: We get the error `- 'Hotel Accommodation' belongs to company 'YourCompany' and 'Partner' (partner_id: 'YourCompany, Marc Demo') belongs to another company. ` Desired behavior: Everything fine. There is no need to set company_id = responsable inscripto for partner demo and admin Forward-Port-Of: odoo/odoo#80489
Original PR description
Create a demo database installing l10n_ar and sale_timesheet, something like: `odoo -i l10n_ar,sale_timesheet` Current behavior: We get the error `- 'Hotel Accommodation' belongs to company 'YourCompany' and 'Partner' (partner_id: 'YourCompany, Marc Demo') belongs to another company. ` Desired behavior: Everything fine. There is no need to set company_id = responsable inscripto for partner demo and admin Forward-Port-Of: odoo/odoo#80489
Forward-Port-Of: odoo/enterprise#23468
Original PR description
Forward-Port-Of: odoo/enterprise#23468
Task-2721316 Forward-Port-Of: odoo/enterprise#23274
Original PR description
Task-2721316 Forward-Port-Of: odoo/enterprise#23274
Do not index route /helpdesk/rating as it does not make sens to have it in the sitemap. Forward-Port-Of: odoo/enterprise#22940
Original PR description
Do not index route /helpdesk/rating as it does not make sens to have it in the sitemap. Forward-Port-Of: odoo/enterprise#22940
Adds new rules for hybrid vehicles for tax deductions and updates the coefficients. CNG now also takes in account the horsepower of the vehicle. TaskId-2629318 Forward-Port-Of: odoo/enterprise#23455
Original PR description
Adds new rules for hybrid vehicles for tax deductions and updates the coefficients. CNG now also takes in account the horsepower of the vehicle. TaskId-2629318 Forward-Port-Of: odoo/enterprise#23455
Purpose ======= From the 1rst of January 2022, a distinction should be made between the employer expenses based with or without serious standards. The representation fees are based on serious standard until 279.31 € Only part of the representation costs are pro-rated because certain costs are fully covered for the company (teleworking costs, mobile phone, internet, etc., namely: - 144.31 € (Tax, since 2021 - coronavirus) - 30 € (internet) - 25 € (phone) - 80 € (car management
Original PR description
Purpose ======= From the 1rst of January 2022, a distinction should be made between the employer expenses based with or without serious standards. The representation fees are based on serious standard until 279.31 € Only part of the representation costs are pro-rated because certain costs are fully covered for the company (teleworking costs, mobile phone, internet, etc., namely: - 144.31 € (Tax, since 2021 - coronavirus) - 30 € (internet) - 25 € (phone) - 80 € (car management fees) = Total € 279.31 The remaining part of the representation fees should be declared separately in the payslips and the 281.10 sheet. TaskID: 2732895 Forward-Port-Of: odoo/enterprise#23414
Steps : - Create a Product - General Information > Product Type : Storable Product - Inventory > Traceability > Tracking : By Unique S/N - On Hand : Create a S/N - Create a Product (Component) - General Information > Product Type : Storable Product - Create a Helpdesk Team > Settings > After-Sales > Repairs : activate - Create a Ticket - Product : your Product - Serial Number : your S/N - Click Repair > Parts > Add your Component - Click Confirm Repair, Start Repair, End Repair
Original PR description
Steps : - Create a Product - General Information > Product Type : Storable Product - Inventory > Traceability > Tracking : By Unique S/N - On Hand : Create a S/N - Create a Product (Component) -…
Steps : - Create a Product - General Information > Product Type : Storable Product - Inventory > Traceability > Tracking : By Unique S/N - On Hand : Create a S/N - Create a Product (Component) - General Information > Product Type : Storable Product - Create a Helpdesk Team > Settings > After-Sales > Repairs : activate - Create a Ticket - Product : your Product - Serial Number : your S/N - Click Repair > Parts > Add your Component - Click Confirm Repair, Start Repair, End Repair Issue : - Validation Error : The lot (Product) is incompatible with this product (Component) Cause : - When clicking repair in Helpdesk, default_lot_id is put in the context. - When ending the repair, a stock.move.line is created. Its product is the Component. - Because the lot_id of the Product is still in the context, it is added by default on the stock.move.line. - Then a check happens : if line.lot_id and line.product_id != line.lot_id.sudo().product_id throw ValidationError Fix: - Override action_repair_end to get the lot_id out of the context. opw-2714093 Forward-Port-Of: odoo/enterprise#23277 Forward-Port-Of: odoo/enterprise#23269