Thursday, April 23, 2020
30 changes · master
Enhancements to existing features
CRM users now see cleaner forms when converting leads and reviewing lead reveal details. Unneeded or duplicated fields are hidden or corrected, reducing confusion and making key status information display properly.
Original PR description
Purpose ======= Improve the "mass lead to opportunity" view. The field `deduplicate` is used only when the name is "convert", so we can hide it to clarify the view. Improve the CRM reveal form view. The field `state` is defined 2 times in the same view with different widget. This is impossible and only the last field (no-widget) information will be kept (so the widget `statusbar` is never used). Task-2228921
Contacts linked to user accounts can no longer have their contact type changed. This prevents account/contact mismatches that could block users from accessing their own user record.
Original PR description
When a user is linked to a contact, the type should not be modified. Otherwise, the res.partner type may become incompatible with the res.user record (e.g. is set as a private address and a user no longer has access to its own user) Fixes odoo/odoo#48177
Employees can now open their current company car directly from their profile, even without broader Fleet access. Fleet vehicle forms now better limit sensitive fields to fleet administrators, while car history records keep the correct driver or purchaser from the time they were created.
Original PR description
[IMP] (hr_)fleet : modify car info accessibility ----------------------------------------------------------- - The stat button "Car" (now "Current car") from "My Profile" now opens the current car…
[IMP] (hr_)fleet : modify car info accessibility
-----------------------------------------------------------
- The stat button "Car" (now "Current car") from "My Profile" now opens the current car instead of the whole history. This stat button is available even for people who usually do not have any access to Fleet.
- Several modifications in the fleet_vehicle form view. Accessibility to particular fields has been refined. Now some fields are only available to the fleet administrator ("fleet_group_manager").
- Remove duplicate in demo data ("Summer tires").
- On fleet.vehicle.odometer and fleet.vehicle.log.services, respectively 'driver_id' and 'purchaser_id' are no longer related. Now, they keep the correct person that was the driver of the corresponding car at the record creation.
- FIX: cost_id was still used in security rules whereas this field apparently no longer exists.
- Some python linting.
[IMP] hr_maintenance : modify equipment_count string
-------------------------------------------------------------------------
Modify displayed string for equipment_count for res_users in hr_maintenance.
TASK#2032894
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prAccess to specific fleet vehicle fields has been tightened so only fleet administrators can view or manage them. This helps protect sensitive fleet-related information and ensures only authorized staff can make changes.
Original PR description
[IMP] fleet_vehicle : refine accessibility to fields ---------------------------------------------------------------- Fleet_vehicle accessibility to particular fields has been refined and is now restricted to fleet administrator only (fleet_group_manager) TASK#2032894
This update improves how materials are ordered and managed from field service sales workflows. It helps field teams handle product quantities and related stock items more clearly, reducing confusion during service delivery.
Resolved issues and error corrections
This fixes an issue in the website calendar flow that affected visitors who were not signed in. Public users can now access the relevant calendar controller behavior more reliably, reducing friction for bookings or event scheduling.
Original PR description
TaskID: 2241501 Closes #49750 closes odoo/enterprise#10050 X-original-commit: 85b3f059fb23c2fb0e4c1459f454b64092496cb2 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Features or functions removed from Odoo
This change removes an outdated internal cleanup function from the Mail module because newer cache behavior already handles the same work. It reduces maintenance overhead without changing what users see or how mail features behave.
Original PR description
As the behavior of the cache was improved by the following commit: 9920f20e4c7753bc17bea71dea3a90f7de687196 the function _invalidate_documents can be removed safely.
Miscellaneous changes
Introduced by: https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49876
Original PR description
Introduced by: https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49876
Some efff Invoices encode the line amounts under the tag 'cbc:LineExtensionAmount' instead of the 'cbc:PriceAmount' we currently parse. Backporting the fix from https://github.com/odoo/odoo/pull/49011 opw-2240256 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49879
Original PR description
Some efff Invoices encode the line amounts under the tag 'cbc:LineExtensionAmount' instead of the 'cbc:PriceAmount' we currently parse. Backporting the fix from https://github.com/odoo/odoo/pull/49011 opw-2240256 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49879
Steps to reproduce the bug: - Let's consider a company C in € - Let's consider two selectable pricelists P1 in € and P2 in $ - The € rate is 1.0 and the $ rate is 0.5 - Configure a shipping method SM with a fixed price of 100€ and free if the price is above 1000€. - Configure a free delivery product P with sales price = 100€ - Go to the shop with P2 as pricelist and add in the cart any product which price is less than 1000€ (in this case 500$) - Process your order until the check out
Original PR description
Steps to reproduce the bug: - Let's consider a company C in € - Let's consider two selectable pricelists P1 in € and P2 in $ - The € rate is 1.0 and the $ rate is 0.5 - Configure a shipping method SM with a fixed price of 100€ and free if the price is above 1000€. - Configure a free delivery product P with sales price = 100€ - Go to the shop with P2 as pricelist and add in the cart any product which price is less than 1000€ (in this case 500$) - Process your order until the check out Bug: The price of SM was 25$ instead of 50$ because the function rate_shipment already computed the price in the right currency opw:2239117 Forward-Port-Of: odoo/odoo#49924
Import an italian E-invoice of type TD04 (Nota di Credito). The invoice type is marked as 'in_refund', but the bank information will still be parsed from the contact info instead of taking the current company info. This will fail the check 'validate_partner_bank_id' and the user will see the error 'The account selected for payment does not belong to the same company as this invoice.' Updating the bank using company info as done in _get_default_bank_id opw-2239652 -- I confirm I
Original PR description
Import an italian E-invoice of type TD04 (Nota di Credito). The invoice type is marked as 'in_refund', but the bank information will still be parsed from the contact info instead of taking the current company info. This will fail the check 'validate_partner_bank_id' and the user will see the error 'The account selected for payment does not belong to the same company as this invoice.' Updating the bank using company info as done in _get_default_bank_id opw-2239652 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49853 Forward-Port-Of: odoo/odoo#49825
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#49923
Original PR description
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#49923
Forward-Port-Of: odoo/odoo#49866
Original PR description
Forward-Port-Of: odoo/odoo#49866
### Issue - Have 2 company - Install Timesheet, Accounting, Project - Enable analytic accounting - Accounting > Settings > Analytic accounts - Remove the company_id of one of them which is linked to a project - Timesheet > add a line for this project Error ### Cause Timesheets lines are linked to a company and a project Removing the company_id of the project's analytic account creates an inconsistency ### Solution Prevent changing the company_id of an anal
Original PR description
### Issue - Have 2 company - Install Timesheet, Accounting, Project - Enable analytic accounting - Accounting > Settings > Analytic accounts - Remove the company_id of one of them which is linked to a project - Timesheet > add a line for this project Error ### Cause Timesheets lines are linked to a company and a project Removing the company_id of the project's analytic account creates an inconsistency ### Solution Prevent changing the company_id of an analytic account which is linked to a project. **OPW-2233266** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49911
Do not set a default `account_id` for section and not lines. Indeed, when set the constraint `check_non_accountable_fields_null` will raise. opw-2241575 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#49998
Original PR description
Do not set a default `account_id` for section and not lines. Indeed, when set the constraint `check_non_accountable_fields_null` will raise. opw-2241575 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#49998
task-2187712 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#48671
Original PR description
task-2187712 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#48671
Restore the position of the icons in the top options so that they are aligned horizontally and no longer vertically. task-2162952 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#49722
Original PR description
Restore the position of the icons in the top options so that they are aligned horizontally and no longer vertically. task-2162952 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#49722
Forward-Port-Of: odoo/odoo#50011 Forward-Port-Of: odoo/odoo#49993
Original PR description
Forward-Port-Of: odoo/odoo#50011 Forward-Port-Of: odoo/odoo#49993
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#50034
Original PR description
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#50034
Steps to reproduce: - install website, crm - go to crm > settings > activate leads - add a contact form to your website and submit - go to the created lead Previous behavior: state_id is shown as false when geoip data is empty Current behavior: state_id is not shwon if geoip is empty opw-2218498 Forward-Port-Of: odoo/odoo#49379
Original PR description
Steps to reproduce: - install website, crm - go to crm > settings > activate leads - add a contact form to your website and submit - go to the created lead Previous behavior: state_id is shown as false when geoip data is empty Current behavior: state_id is not shwon if geoip is empty opw-2218498 Forward-Port-Of: odoo/odoo#49379
Before this commit, some elements in the control panel were not properly encapsulated in layout-related parent elements and this caused some inconsistencies if some of the control panel components were not displayed. For example: if the breadrumbs were missing, the search bar went to the left side instead of the right. Now, all components are in a grid-like structure (in desktop mode) and should not overstep their given boundaries. The layout in mobile remains unchanged since the top par
Original PR description
Before this commit, some elements in the control panel were not properly encapsulated in layout-related parent elements and this caused some inconsistencies if some of the control panel components were not displayed. For example: if the breadrumbs were missing, the search bar went to the left side instead of the right. Now, all components are in a grid-like structure (in desktop mode) and should not overstep their given boundaries. The layout in mobile remains unchanged since the top part behaves quite differently. Enterprise PR: https://github.com/odoo/enterprise/pull/10143 Forward-Port-Of: odoo/odoo#50037
Previously, if you opened the cropper on an already cropped image, it would load the crop data for that image. If you then changed the image and cropped that new image, it would keep most of the metadata of the previous image when saving, causing any subsequent crop to show the previous original image instead of the current one. This commit fixes that by removing all crop-related jQuery data from the image, so it's considered a fresh crop and a new attachment is created. Forward-Port-Of
Original PR description
Previously, if you opened the cropper on an already cropped image, it would load the crop data for that image. If you then changed the image and cropped that new image, it would keep most of the metadata of the previous image when saving, causing any subsequent crop to show the previous original image instead of the current one. This commit fixes that by removing all crop-related jQuery data from the image, so it's considered a fresh crop and a new attachment is created. Forward-Port-Of: odoo/odoo#50007 Forward-Port-Of: odoo/odoo#49375
On an instance with 4 million messages, opening Settings > Technical > Messages could increase residual memory usage in a given situation usage by: - 1.5 GB for odoo - 3 GB for postgresql (a part might just be cache depending on config) With this change breaking the request in several ones, increase is: - 0.5 GB for odoo (for the millions of ids in dictionaries and list) - 0.1 GB for postgresql opw-2232065 Forward-Port-Of: odoo/odoo#50060 Forward-Port-Of: odoo/odoo#49689
Original PR description
On an instance with 4 million messages, opening Settings > Technical > Messages could increase residual memory usage in a given situation usage by: - 1.5 GB for odoo - 3 GB for postgresql (a part might just be cache depending on config) With this change breaking the request in several ones, increase is: - 0.5 GB for odoo (for the millions of ids in dictionaries and list) - 0.1 GB for postgresql opw-2232065 Forward-Port-Of: odoo/odoo#50060 Forward-Port-Of: odoo/odoo#49689
When the newsletter popup was introduced, the modal was for some reason marked with the o_editable class, which is normally used to let the editor know which elements in the page can be edited and saved in the database. Because of this, upon saving with the modal in the page (ie, if the modal is open when saving) it would try to destroy the editor associated with the modal, which doesn't exist, resulting in a traceback. This commit fixes that by removing the o_editable class from the mo
Original PR description
When the newsletter popup was introduced, the modal was for some reason marked with the o_editable class, which is normally used to let the editor know which elements in the page can be edited and saved in the database. Because of this, upon saving with the modal in the page (ie, if the modal is open when saving) it would try to destroy the editor associated with the modal, which doesn't exist, resulting in a traceback. This commit fixes that by removing the o_editable class from the modal, this doesn't actually prevent edition, because the modal is already inside of an editable segment of the page. task-2092593 originally adressed by odoo/odoo#49036 Forward-Port-Of: odoo/odoo#49124
The buttons created in the reconciliation widget by the reconciliation models did not apply the percentage of their lines correctly. Example of the behavior before the fix : 1) Create a 'writeoff_button' reconcile model, with two lines of 50% on distinct accounts 2) Create a statement line of 100€ 3) Open the reconciliation widget and apply the model created in 1) to the line made in 2) => Two lines are created, 50€ and 25€. They should both be 50€. Forward-Port-Of: odoo/odoo#49942
Original PR description
The buttons created in the reconciliation widget by the reconciliation models did not apply the percentage of their lines correctly. Example of the behavior before the fix : 1) Create a 'writeoff_button' reconcile model, with two lines of 50% on distinct accounts 2) Create a statement line of 100€ 3) Open the reconciliation widget and apply the model created in 1) to the line made in 2) => Two lines are created, 50€ and 25€. They should both be 50€. Forward-Port-Of: odoo/odoo#49942
- Set the 'Settings' rights to the Demo user but no access to Documents Signature - As Demo, open Studio and add a field in the Partner form view An error arises since `{'invisible': [('signature_count', '=', 0)]}` cannot be evaluated. This happens because there is a group set on `signature_count`. The group was added to avoid access rights issue. However, since the data retrieved is not sensitive, we can retrieve it as superuser. opw-2232786 Forward-Port-Of: odoo/enterprise#999
Original PR description
- Set the 'Settings' rights to the Demo user but no access to Documents
Signature
- As Demo, open Studio and add a field in the Partner form view
An error arises since `{'invisible': [('signature_count', '=', 0)]}`
cannot be evaluated.
This happens because there is a group set on `signature_count`. The
group was added to avoid access rights issue. However, since the data
retrieved is not sensitive, we can retrieve it as superuser.
opw-2232786
Forward-Port-Of: odoo/enterprise#9990Before this commit, the referrer's commission plan was used when the subscription's commission plan was fixed to a Falsy value. This commit fixes this issue and also checks that a referrer should be set on the invoice. Otherwise the commission rules should not even be checked. Forward-Port-Of: odoo/enterprise#10095 Forward-Port-Of: odoo/enterprise#9997
Original PR description
Before this commit, the referrer's commission plan was used when the subscription's commission plan was fixed to a Falsy value. This commit fixes this issue and also checks that a referrer should be set on the invoice. Otherwise the commission rules should not even be checked. Forward-Port-Of: odoo/enterprise#10095 Forward-Port-Of: odoo/enterprise#9997
Before this commit, some elements in the control panel were not properly encapsulated in layout-related parent elements and this caused some inconsistencies if some of the control panel components were not displayed. For example: if the breadrumbs were missing, the search bar went to the left side instead of the right. Now, all components are in a grid-like structure (in desktop mode) and should not overstep their given boundaries. The layout in mobile remains unchanged since the top par
Original PR description
Before this commit, some elements in the control panel were not properly encapsulated in layout-related parent elements and this caused some inconsistencies if some of the control panel components were not displayed. For example: if the breadrumbs were missing, the search bar went to the left side instead of the right. Now, all components are in a grid-like structure (in desktop mode) and should not overstep their given boundaries. The layout in mobile remains unchanged since the top part behaves quite differently. Community PR: https://github.com/odoo/odoo/pull/50037 Forward-Port-Of: odoo/enterprise#10143
with odoo/odoo#49866 Forward-Port-Of: odoo/enterprise#10089
Original PR description
with odoo/odoo#49866 Forward-Port-Of: odoo/enterprise#10089
Follow-up of 3dcc6d8329fc7a5867993ff77c487e46b0d20fe8 It seems still possible to have no partner name, raising an error. As a last fallback, we add the partner id in order to be able to troubleshoot. opw-2224949 Forward-Port-Of: odoo/enterprise#10102
Original PR description
Follow-up of 3dcc6d8329fc7a5867993ff77c487e46b0d20fe8 It seems still possible to have no partner name, raising an error. As a last fallback, we add the partner id in order to be able to troubleshoot. opw-2224949 Forward-Port-Of: odoo/enterprise#10102