Tuesday, July 5, 2022
28 changes · master
Enhancements to existing features
Odoo now lets users archive contact titles, such as “Doctor”, instead of deleting them. This prevents removed titles from coming back after a system upgrade while keeping historical data intact.
Original PR description
Description of the issue/feature this PR addresses: - Delete a res.partner.title, exemple "Docteur" - Upgrade base --> Issue Docteur re appear -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The mail interface logic that decides where the chatter appears on forms has been simplified and cleaned up. This makes the behavior easier to maintain and reduces the chance of layout inconsistencies without changing the user-facing workflow.
Original PR description
This better highlights the different cases that need to be handled. Part of task-2871070
Resolved issues and error corrections
Kanban views with progress bars now handle records that have an empty progress value without crashing. This keeps dashboards and workflow boards accessible when some data is missing or uncategorized.
Miscellaneous changes
Description of the issue/feature this PR addresses: On installation, _compute_eta_response_data may cause a time out in databases with high number of account.move records Current behavior before PR: _compute_eta_response_data causes time out when account.move > 350k Desired behavior after PR is merged: _compute_eta_response_data no longer causing time out on installation -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/od
Original PR description
Description of the issue/feature this PR addresses: On installation, _compute_eta_response_data may cause a time out in databases with high number of account.move records Current behavior before PR: _compute_eta_response_data causes time out when account.move > 350k Desired behavior after PR is merged: _compute_eta_response_data no longer causing time out on installation -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#93281
This fix improves how certain accounting screens adapt to different screen sizes by removing unnecessary layout wrappers. Users should see better responsiveness in tax and partner accounting views, especially in the web client.
Original PR description
Both the CE and EE web clients don't support proper responsivity when a subtree view is inside a `<group>`. By removing them (they were unnecessary anyway) we recover proper responsivity in these views. @moduon MT-688 OPW-2843895 See (video is from v15, but the same problem exists in v14 and v13): https://user-images.githubusercontent.com/973709/167584174-e2405df7-8a60-4be6-ab81-b722ec82bb78.mp4 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix removes obsolete website page-management styling from public search results pages. Search result tables now better follow the site's theme instead of using outdated colors and spacing, improving visual consistency for visitors.
Original PR description
Commit [1] made a mistake of copy/pasting the "list_website_pages" ID in two views related to the "search in everything" and "search in pages" views (used when checking all results after a search…
Commit [1] made a mistake of copy/pasting the "list_website_pages" ID in
two views related to the "search in everything" and "search in pages"
views (used when checking all results after a search using the "search"
snippet that you can configure to search in everything or in pages).
At the time, that ID induced some CSS rules and JS related to the page
manager (not made for visitors).
- For the "search in everything" page, both the CSS rules and JS had no
effect (except instantiating an useless widget in JS).
- For the "search in pages" page, the JS had no effect (except the same
instantiation of an useless widget) but the CSS had an impact on the
`<table>` used to display the results:
- The header used an hardcoded odoo-purple background color.
- The table paddings were not the ones defined by the theme.
Of course, in custos, more of the CSS could have had an impact (for
example some icons would use bootstrap blue info color by default for
no apparent reason).
Since [2], the page manager was removed (converted into a backend view)
so the CSS and JS rules actually became totally useless. The JS was
removed with [2] but the CSS was kept thinking it was necessary for the
"search in everything" and "search in pages" pages.
This commit removes the useless CSS and the useless ID in the two views.
It also modifies the "search in pages" layout a bit.
A fix could be made in stable later on to at least remove the hardcoded
odoo-purple background color in the "search in pages" page. The rest
should stay as per-stable policy.
[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
[2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3bFixed an issue in the Mail app that could cause an error when users clicked reply on a message. This improves reliability for everyday communication and adds test coverage to help prevent the problem from returning.
Original PR description
Fix bug introduced in https://github.com/odoo/odoo/pull/94948.
This fixes an internal test issue that occurred when Odoo was run with only the base setup and a settings form contained no fields. The change avoids an unnecessary read step in that case, helping keep automated validation stable without affecting everyday users.
Original PR description
Since #91909, the settings form view is tested with different levels of access rights, post install. But when the test is run with only the base module, it crashes because the settings view specified in base is empty, without any field. On save, the test form reads the view fields, but read fallbacks on all fields if no field is specified, and it breaks when we try to compare the read results to the fields requested (empty). This commit skips the read when no fields is present in the view. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
New products will now start with a Sales Price of 0.00 instead of 1.00. This prevents unintended default pricing and lets users set the correct price when needed.
Original PR description
Ref #49822 Description of the issue/feature this PR addresses: product `Sales Price` had a default of 1.0 Current behavior before PR: product `Sales Price` had a default of 1.0 Desired behavior after PR is merged: Sales Price should be set to 0.0 by default, a user can change this value if necessary -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When freezegun is used, the profiler and sql_db time are freezed, Making the profile and sql perf counters invalids. A possible solution would be to black list some modules in freezegun but this doens't look possible in the pinned version (0.3.x). Saving the builtin time.time is not enough, it looks like freezegun will find all occurences and replace them. We need to get the __call__ instead. Description of the issue/feature this PR addresses: Current behavior before PR: Desir
Original PR description
When freezegun is used, the profiler and sql_db time are freezed, Making the profile and sql perf counters invalids. A possible solution would be to black list some modules in freezegun but this doens't look possible in the pinned version (0.3.x). Saving the builtin time.time is not enough, it looks like freezegun will find all occurences and replace them. We need to get the __call__ instead. 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#95059 Forward-Port-Of: odoo/odoo#94998
Steps to reproduce the bug: - Enable “Expiration date” in inventory settings - Create a Storable product “P1” - Tracking: by serial number - Enable the expiration date option - Update the quantity: - Create a new Lot “SN1”: - select today's date as the alert date - Go to inventory > reporting > Inventory Report - Try to filter by “Expiration Alerts” Problem: The product P1 is not selected, because the filter checks the removal date instead of the a
Original PR description
Steps to reproduce the bug:
- Enable “Expiration date” in inventory settings
- Create a Storable product “P1”
- Tracking: by serial number
- Enable the expiration date option
- Update the quantity:
- Create a new Lot “SN1”:
- select today's date as the alert date
- Go to inventory > reporting > Inventory Report
- Try to filter by “Expiration Alerts”
Problem:
The product P1 is not selected, because the filter checks the removal
date instead of the alert date
Solution:
The filter should check if the alert date is less than or equal
to today's date to display products or not, as it is for lots:
https://github.com/odoo/odoo/blob/14.0/addons/product_expiry/views/production_lot_views.xml#L30-L39
opw-2889737
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#94654Steps (runbot 15.0): - Go to subscription / Quotation template / Monthly template - Change "Create Invoice" to "Send after successful payment" - Create a subscription and assign it to Joel Willis and confirm it - Connect to odoo with portal user (Joel Willis) and go to portal/subscription - Select the last subscription and set a payment method (test mode) - With admin account run the scheduled action "generate recurring invoices and payments"
Original PR description
Steps (runbot 15.0): - Go to subscription / Quotation template / Monthly template - Change "Create Invoice" to "Send after successful payment" - Create a subscription and assign it to Joel Willis and…
Steps (runbot 15.0):
- Go to subscription / Quotation template / Monthly template
- Change "Create Invoice" to "Send after successful payment"
- Create a subscription and assign it to Joel Willis and confirm it
- Connect to odoo with portal user (Joel Willis)
and go to portal/subscription
- Select the last subscription and set a payment method (test mode)
- With admin account run the scheduled action
"generate recurring invoices and payments"
- With portal account go to portal/invoices
The last invoice contains Paid tag and Pay now button

This fix also corrects Status position in the header
before:

after:

opw-2817794
Forward-Port-Of: odoo/odoo#94127Before this commit wire transfer was using this line to generate qr code `payment_tx_id.acquirer_id.sudo().journal_id.bank_account_id.build_qr_code_base64` But this is a problem has transfert doesn't use `journal_id`. Instead we can use the bank_id of the company's partner_id. opw-2855065 Forward-Port-Of: odoo/odoo#94276
Original PR description
Before this commit wire transfer was using this line to generate qr code `payment_tx_id.acquirer_id.sudo().journal_id.bank_account_id.build_qr_code_base64` But this is a problem has transfert doesn't use `journal_id`. Instead we can use the bank_id of the company's partner_id. opw-2855065 Forward-Port-Of: odoo/odoo#94276
### OPW 2901176 ### Solves Issue https://github.com/odoo/odoo/issues/95155 Now the way of access to an action is using the method `_for_xml_id` of the model `ir.actions.actions` and not reading the action itself because they need the access of the group "Administration/Settings" which not all the users have it, so we were having an error with users that have the permissions to see MRP Picking Types but they didn't have the group mentioned above. -- I confirm I have signed the CLA and rea
Original PR description
### OPW 2901176 ### Solves Issue https://github.com/odoo/odoo/issues/95155 Now the way of access to an action is using the method `_for_xml_id` of the model `ir.actions.actions` and not reading the action itself because they need the access of the group "Administration/Settings" which not all the users have it, so we were having an error with users that have the permissions to see MRP Picking Types but they didn't have the group mentioned above. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#95156
Purpose of this commit to fix the UI in Manufacture app. So, in this commit done following changes As suggested in Task: - Able to expand next activity column of MO list view - Added tooltip of capacity field on work center - Added quantity tooltip of BOM - Removed the 'copy' from the operation name when using the 'copy existing operation' functionnality in MRP - In the mass produce wizard, modified error message when user indicates 0 quantity and tries
Original PR description
Purpose of this commit to fix the UI in Manufacture app. So, in this commit done following changes As suggested in Task: - Able to expand next activity column of MO list view - Added tooltip of…
Purpose of this commit to fix the UI in Manufacture app.
So, in this commit done following changes As suggested in Task:
- Able to expand next activity column of MO list view
- Added tooltip of capacity field on work center
- Added quantity tooltip of BOM
- Removed the 'copy' from the operation name when using the
'copy existing operation' functionnality in MRP
- In the mass produce wizard, modified error message when user indicates 0
quantity and tries to generate SNs -> https://tinyurl.com/yjqh79vt
- Hide sequence field from the Operation configuration ~(in pop up and form view)~
- ~expected and real work order time columns make optional=hide in list view~
- for the mass produce wizard, modified error message when user tries to
trigger mass produce although several lots reserved per product
- In demo data for the product Table 9666, removed the consumption steps
for the bolt and the screw
TaskID - 2689994
PR - #93378
Forward-Port-Of: odoo/odoo#95200
Forward-Port-Of: odoo/odoo#93378- Pasting blocks at the beginning of the editable pasted the content in the wrong place (after the first node instead of before it). - Pasting a list within a list resulted in wrongly nested li elements (`<li><li>text</li></li>`). This applies the same principles for pasting lists within lists as were already applied for blocks within paragraphs. task-2879892 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#95281 Forward-
Original PR description
- Pasting blocks at the beginning of the editable pasted the content in the wrong place (after the first node instead of before it). - Pasting a list within a list resulted in wrongly nested li elements (`<li><li>text</li></li>`). This applies the same principles for pasting lists within lists as were already applied for blocks within paragraphs. task-2879892 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#95281 Forward-Port-Of: odoo/odoo#94542
The urgentSave fix at f9d27d41 was broken by 9e02cec48. Do not wait for the resolution of the cleanForSave promise to update the internal value in case this happens during an urgentSave as the beforeunload event does not play well with asynchronicity. It is better to have a partially cleared value than to lose changes. When this function is called outside of an urgentSave context, the full cleaning is still awaited below and `_super` will reupdate the value. Task-2861050 Forward-Port
Original PR description
The urgentSave fix at f9d27d41 was broken by 9e02cec48. Do not wait for the resolution of the cleanForSave promise to update the internal value in case this happens during an urgentSave as the beforeunload event does not play well with asynchronicity. It is better to have a partially cleared value than to lose changes. When this function is called outside of an urgentSave context, the full cleaning is still awaited below and `_super` will reupdate the value. Task-2861050 Forward-Port-Of: odoo/odoo#92142
Complement of this commit 7d7c53edf714a07409316750b2b09deaa089a12d because added records were missed during fw-port. opw-2862296 opw-2877133 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#95284
Original PR description
Complement of this commit 7d7c53edf714a07409316750b2b09deaa089a12d because added records were missed during fw-port. opw-2862296 opw-2877133 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#95284
Rationale Due to business decisions mass mailing themes are moved to community repository. As some other moves are planned, notably coupon or mobile UI that are coming to community repository, this makes sense to have mailing templates along with the mobile UI. Having a responsive and mailing-friendly mailing is now part of community standards. For any questions please refer to decision makers. Task-2903948 Forward-Port-Of: odoo/odoo#95314
Original PR description
Rationale Due to business decisions mass mailing themes are moved to community repository. As some other moves are planned, notably coupon or mobile UI that are coming to community repository, this makes sense to have mailing templates along with the mobile UI. Having a responsive and mailing-friendly mailing is now part of community standards. For any questions please refer to decision makers. Task-2903948 Forward-Port-Of: odoo/odoo#95314
The product's weight is utilised on the intrastat report, but the section used to define these values on the product is actually only accesible when the stock module is installed. To fix this, this commit creates another user group 'group_intrastat_weight_volume', which is added to the default user, and added to the corresponding page on the product using an xpath. task-id: 2884474 Forward-Port-Of: odoo/enterprise#29084 Forward-Port-Of: odoo/enterprise#28617
Original PR description
The product's weight is utilised on the intrastat report, but the section used to define these values on the product is actually only accesible when the stock module is installed. To fix this, this commit creates another user group 'group_intrastat_weight_volume', which is added to the default user, and added to the corresponding page on the product using an xpath. task-id: 2884474 Forward-Port-Of: odoo/enterprise#29084 Forward-Port-Of: odoo/enterprise#28617
Rationale Due to business decisions mass mailing themes are moved to community repository. As some other moves are planned, notably coupon or mobile UI that are coming to community repository, this makes sense to have mailing templates along with the mobile UI. Having a responsive and mailing-friendly mailing is now part of community standards. For any questions please refer to decision makers. Task-2903948 Forward-Port-Of: odoo/enterprise#29112
Original PR description
Rationale Due to business decisions mass mailing themes are moved to community repository. As some other moves are planned, notably coupon or mobile UI that are coming to community repository, this makes sense to have mailing templates along with the mobile UI. Having a responsive and mailing-friendly mailing is now part of community standards. For any questions please refer to decision makers. Task-2903948 Forward-Port-Of: odoo/enterprise#29112
In the _get_compute_results method of l10n_be_hr_contract_salary, the 'wage_with_holidays' key is not always present in the resume dictionnary. This causes a Key Error when accessed and not existing Forward-Port-Of: odoo/enterprise#29096
Original PR description
In the _get_compute_results method of l10n_be_hr_contract_salary, the 'wage_with_holidays' key is not always present in the resume dictionnary. This causes a Key Error when accessed and not existing Forward-Port-Of: odoo/enterprise#29096
Currently, Register consumption type step not working, no matter what the BOM set up is, consumption registration always asked in the last operation no matter what. Step to Produce: 1) Create BOM with 2 components and add 2 operations 2) Add quality control point with type `Register Consumed Materials` in all operations in BOM 3) Leave all `Consumed in Operation` field empty in BOM Components 2) Create Manufacturing Order and Confirm the MO 3) Click on Open
Original PR description
Currently, Register consumption type step not working, no matter what the BOM
set up is, consumption registration always asked in the last operation no matter
what.
Step to Produce:
1) Create BOM with 2 components and add 2 operations
2) Add quality control point with type `Register Consumed Materials` in all
operations in BOM
3) Leave all `Consumed in Operation` field empty in BOM Components
2) Create Manufacturing Order and Confirm the MO
3) Click on Open Tablet view in MO Work Orders
4) Now you can see no component is available for consumption and that
component is show in last operation.
The issue is happen because `_create_checks` method try to add quality check in
workorder but it's not available in `move_finished_ids`.Now we add quality check
from `production.move_raw_ids`. Also added test case for the same.
Task - 2689994
PR - #28282
Forward-Port-Of: odoo/enterprise#29069
Forward-Port-Of: odoo/enterprise#28282Employees created through the salary configurator flow (/salary_package/simulation/contract/) always ended up with the default for resource_calendar_id which is self.env.company.resource_calendar_id. This flow usually occurs with the public user so this can be wrong when the company on the public user is not the company the employee will be working at. To solve this use the resource_calendar_id specified on the contract template (that's what it's there for anyway). This field is require
Original PR description
Employees created through the salary configurator flow (/salary_package/simulation/contract/) always ended up with the default for resource_calendar_id which is self.env.company.resource_calendar_id. This flow usually occurs with the public user so this can be wrong when the company on the public user is not the company the employee will be working at. To solve this use the resource_calendar_id specified on the contract template (that's what it's there for anyway). This field is required in the view so we can rely on it being set. opw-2896517 Forward-Port-Of: odoo/enterprise#29028 Forward-Port-Of: odoo/enterprise#28975
Impacted versions: - 14.0 Steps to reproduce: See ticket https://www.odoo.com/my/task/2780870 Current behavior: All char fields are used to compute the similarity. Expected behavior: Allow to overwrite this behaviour. Forward-Port-Of: odoo/enterprise#27762
Original PR description
Impacted versions: - 14.0 Steps to reproduce: See ticket https://www.odoo.com/my/task/2780870 Current behavior: All char fields are used to compute the similarity. Expected behavior: Allow to overwrite this behaviour. Forward-Port-Of: odoo/enterprise#27762
The aim of this commit is to fix the case of bill in foreign currency. Previous to this commit: The amount used for the computation was the amount_total which is potentially in foreign currency. After this commit: The amount used for computation is amount_total_signed which is always in company currency as required for the 281.50 reporting. (in €) task: 2820482 Enterprise-PR: Forward-Port-Of: odoo/enterprise#29049 Forward-Port-Of: odoo/enterprise#28349
Original PR description
The aim of this commit is to fix the case of bill in foreign currency. Previous to this commit: The amount used for the computation was the amount_total which is potentially in foreign currency. After this commit: The amount used for computation is amount_total_signed which is always in company currency as required for the 281.50 reporting. (in €) task: 2820482 Enterprise-PR: Forward-Port-Of: odoo/enterprise#29049 Forward-Port-Of: odoo/enterprise#28349
The default work address of an employee is computed by _compute_address_id on hr.employee.base and will use the address on the company. This can be wrong for companies who have >1 location. Instead use the address on the job if set. opw-2896517 Forward-Port-Of: odoo/enterprise#29008
Original PR description
The default work address of an employee is computed by _compute_address_id on hr.employee.base and will use the address on the company. This can be wrong for companies who have >1 location. Instead use the address on the job if set. opw-2896517 Forward-Port-Of: odoo/enterprise#29008
Continue with PR https://github.com/odoo/enterprise/pull/27972/ Description: We need to update the link to the AFIP tutorial on how to get a production certificate. Current Link: https://www.afip.gob.ar/ws/WSAA/wsaa_obtener_certificado_produccion.pdf New Link: https://www.afip.gob.ar/ws/WSAA/WSAA.ObtenerCertificado.pdf Forward-Port-Of: odoo/enterprise#28579
Original PR description
Continue with PR https://github.com/odoo/enterprise/pull/27972/ Description: We need to update the link to the AFIP tutorial on how to get a production certificate. Current Link: https://www.afip.gob.ar/ws/WSAA/wsaa_obtener_certificado_produccion.pdf New Link: https://www.afip.gob.ar/ws/WSAA/WSAA.ObtenerCertificado.pdf Forward-Port-Of: odoo/enterprise#28579