Thursday, January 9, 2025
7 changes · 17.0
Resolved issues and error corrections
This fixes a calendar issue that could prevent reminders or recurrence-related processing from working on databases upgraded from older versions. The update removes confusion in an internal database lookup so calendar events can be handled reliably.
Original PR description
__Current behavior before commit:__ In [`a27afdb`][1], the field `end_type` from the model `calendar.event` became computed and therefore not stored anymore. Databases that upgraded from an anterior version still have the column `end_type` in their table `calendar_event`. In [`f6df418`][2], a reference to `end_type` from the table `calendar_recurrence` has been added in the SQL query. If the field `end_type` is still in the table `calendar_event` it is ambiguous which one this query should use. Ultimately leading to this error: ``` psycopg2.errors.AmbiguousColumn: column reference "end_type" is ambiguous LINE 22: ... WHEN cal.recurrency AND end_type =... ``` __Description of the fix:__ Remove the ambiguity by explicitly specifying `rrule`, the alias of the `calendar_recurrence` table. opw-4406814 [1]: https://github.com/odoo/odoo/commit/a27afdb [2]: https://github.com/odoo/odoo/commit/f6df418
This fix prevents existing PDF form settings from being accidentally removed when filled forms are made read-only. It helps keep PDF behavior consistent while still protecting completed fields from changes.
Original PR description
Partly backporting 3731550474dc90819fa1667385f35f4a22ee4f11 Currently, to ensure the filled forms are set as readonly, we erase all the existing flags. Instead, we now only force the readonly flag.
Miscellaneous changes
Two lines that were missing from the "REAGYP - Agricultura" Fiscal Position Tax Mapping have been added. task-4342206 Forward-Port-Of: odoo/odoo#192359
Original PR description
Two lines that were missing from the "REAGYP - Agricultura" Fiscal Position Tax Mapping have been added. task-4342206 Forward-Port-Of: odoo/odoo#192359
Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio - Unset the color => fields[fieldMapping.color] is undefined Cause of the issue ================== We have a field that has the color attribute with a value of color. ```xml <field name="worksheet_template_id" attrs="{'invisible': [('worksheet_template_id', '=', False)]}" filters="1" color="color"/> ``` `shouldFetchColor` checks if th
Original PR description
Steps to reproduce
==================
- Install industry_fsm,web_studio
- Go to Field Service
- Switch to the calendar view
- Open studio
- Unset the color
=> fields[fieldMapping.color] is undefined
Cause of the issue
==================
We have a field that has the color attribute with a value of color.
```xml
<field name="worksheet_template_id" attrs="{'invisible': [('worksheet_template_id', '=', False)]}" filters="1" color="color"/>
```
`shouldFetchColor` checks if the filter color is the same one as the calendar record color.
Solution
========
Since it's possible to have a color filter without a record color, we should fetch the filter colors in that case.
opw-4443497
Forward-Port-Of: odoo/odoo#192334…on sell/dispose Steps to reproduce: - Create an asset with an acquisition date on the 1st of January, 2 years ago. - Set the depreciation method to "Declining" with a duration of 2 years. - Confirm it. - Click on "Modify depreciation". - Dispose it on the 1st of January of this year (i.e. after the asset's total duration). Observed behavior: You'll be met with a division by zero error. Solution: Prevent any unnecessary computations as well as unwanted division by zero errors by
Original PR description
…on sell/dispose Steps to reproduce: - Create an asset with an acquisition date on the 1st of January, 2 years ago. - Set the depreciation method to "Declining" with a duration of 2 years. - Confirm it. - Click on "Modify depreciation". - Dispose it on the 1st of January of this year (i.e. after the asset's total duration). Observed behavior: You'll be met with a division by zero error. Solution: Prevent any unnecessary computations as well as unwanted division by zero errors by simply returning early when the asset's residual amount is zero. A test is also added to cover this use case. opw-4411877 Forward-Port-Of: odoo/enterprise#76555
…endar editor Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio => The color value is empty, it should be "Color" Cause of the issue ================== We only keep many2one and selection fields, but in this case, it's an integer field. Solution ======== Here's a few example where integer field are used: [planning_view_calendar] and [project_task_view_calendar_fsm_worksheet]. => Kee
Original PR description
…endar editor Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio => The color value is empty, it should be "Color" Cause of the issue ================== We only keep many2one and selection fields, but in this case, it's an integer field. Solution ======== Here's a few example where integer field are used: [planning_view_calendar] and [project_task_view_calendar_fsm_worksheet]. => Keep integer fields --- [planning_view_calendar]: https://github.com/odoo/enterprise/blob/c37ed1a684fd9b91e394b7b14f282b9ebabcb751/planning/views/planning_views.xml#L332 [project_task_view_calendar_fsm_worksheet]: https://github.com/odoo/enterprise/blob/3205a82c4616b969b87aa2f6d05a2da636688037/industry_fsm_report/views/project_views.xml#L29 opw-4443497 Forward-Port-Of: odoo/enterprise#76454
Versions: ------------- 16.0 Steps to Reproduce: ---------------------------- 1. Open the Sign app. 2. Switch to the kanban view of sign templates. 3. Upload a document without adding any sign items. 4. Switch to the list view and open the template. 5. In the form view, go to the "Fields" notebook tab. 6. Add 2-3 sign items, then go back to the kanban view. 7. Reopen the template. Issue: --------- An error occurs when trying to sign the template. Cause: ---------- When a
Original PR description
Versions: ------------- 16.0 Steps to Reproduce: ---------------------------- 1. Open the Sign app. 2. Switch to the kanban view of sign templates. 3. Upload a document without adding any sign items. 4. Switch to the list view and open the template. 5. In the form view, go to the "Fields" notebook tab. 6. Add 2-3 sign items, then go back to the kanban view. 7. Reopen the template. Issue: --------- An error occurs when trying to sign the template. Cause: ---------- When adding sign items in the form view, other required fields are left empty. These missing values are needed to properly render the items in the PDF iframe. Solution: ------------ Make the sign items in the "Fields" notebook read-only. task-4212762 Forward-Port-Of: odoo/enterprise#71017