Monday, August 1, 2022
6 changes · master
Resolved issues and error corrections
Fixes a crash that occurred when users tried to reschedule a meeting activity after opening the calendar from a contact. This keeps the contact activity workflow smooth and avoids interruptions when updating meeting schedules.
Original PR description
In a contact form view, schedule an activity (from the chatter), select type Meeting, and click on the "Open Calendar" button. In the calendar view, create a new event. Then, go back to the contact form view. The activity should be there, and it should display a "Reschedule" button. Before this commit, it crashed when we clicked on that button. The reason is that the click handler calls a python method that returns an action description (action from xmlid, with modified context). However, this action was sent back to the client without being "cleaned", which is what the client expects. In particular, the 'tree' view type is unknown client side, it must be renamed into 'list'. This commit fixes the issue by cleaning the action before sending it back. 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
List views now handle buttons that are hidden for certain users or conditions without triggering an error. This improves reliability for users working with views that include permission-based or conditional actions.
Original PR description
Before this commit, an error was raised when an invisible button was found on a list view (for example, if it has a group). Now, the invisible buttons are correctly managed.
Creating a new record from a list now correctly applies the page context, including preset default values. This prevents avoidable server errors when required fields are supplied through that context but not shown on the list screen.
Original PR description
Before this commit, in a ListView, the view context was not used when creating the record. This caused some problems: - the record does not use "default_" to initialise its data - server-side required fields that are not present in the arch and have a value given in the context return server errors 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
This fixes a web data loading issue so the requested fields are now properly used when retrieving records. It helps ensure users and integrations receive the expected information instead of unnecessary or incorrect data.
Original PR description
Description of the issue/feature this PR addresses: Load the correct fields in then /web/dataset/load. Current behavior before PR: The argument fields is not used. Desired behavior after PR is merged: The argument fields is used. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Checkboxes and on/off toggles have been adjusted to display correctly after the Bootstrap 5 migration. This improves visual consistency, spacing, print behavior, and list column sizing accuracy across the web interface.
Original PR description
In the BS5 migration, the legacy `checkbox` and `boolean_toggle` widget
were adapted but not the OWL Component.
Also, we have tweaked the old widget and the component to have better
positioning and margins.
Note:
the CSS for the print is already done in BS5
```css
https://github.com/media print {
.form-check-input {
color-adjust: exact;
}
}
```
Also we change `offsetWidth` by `getBoundingClientRect().width` in
`list_renderer` to avoid inaccurate rounding in columns width's
calculation.
Lastly a `.o-checkbox` class is added to the Checkbox component for a
more universal and context independent targetting.Odoo now avoids creating cost of goods sold entries when delivered products are owned by an external partner. This prevents incorrect accounting costs from being recorded for goods the company does not own.
Original PR description
When a delivered product was owned by an external partner, we should not generate any COGS line OPW-2884211