Daily updates from Odoo
Thursday, June 20, 2019
4 changes · master
Enhancements to existing features
Odoo now prepares JSON data in a way that is safe to place inside browser scripts, reducing the chance of pages breaking when data contains special characters. This also standardizes how templates pass data to the browser, making point of sale and web client pages more reliable.
Original PR description
Make JSON serialisation workable for script contexts.
* provide a pseudo-module whose `dumps` function is script-safe (using raw html injection)
* make it the default `json.dumps` in qweb templates
* update callsites to properly dump json:
- dump in template, not in the python code
- dump the entire structure at once, not bits and bobs inside a JSON
literal
Task 1999158
- [x] pseudo-module should be called script-safe not html-safe.Payroll work entries are now generated more automatically for current and past periods, including when new contracts are added mid-month. The flow also improves conflict detection around manual edits, missing entry types, contracts, and employee leaves, so payroll teams can resolve issues before generating payslips with fewer clicks.
Original PR description
Purpose ======= Ease the payroll flow. Avoid as many clicks as possible. Specification ============= Generation / Conflicts ---------------------- - Work entries are automatically generated for past…
Purpose
=======
Ease the payroll flow. Avoid as many clicks as possible.
Specification
=============
Generation / Conflicts
----------------------
- Work entries are automatically generated for past and current months.
- Work entries are also generated for new contracts. e.g. work entries have already
been generated but a new contract is open in the middle of the month => generate new work entries for this contract.
- If a work entry is manually created, conflicts should automatically be checked
- If a work entry is manually edited (date start and date stop), conflicts should automatically be checked
- A work entry without a work entry type is marked as conflicting.
Adding a type should remove the conflict, removing a type should make the conflict.
- If a work entry of type leave is completly outside the contract's calendar,
it is suspicious and it should be marked as conflicting.
Leaves
------
- If there is a non approved leave at the same time as some work entries, the work entries
are in conflict.
- If the leave is approved:
- A work entry corresponding to the leave is created.
- Existing work entries completety included in the leave are deleted
- Existing work entries that are not completely included are marked as conflicting.
- If the leave is refused, existing work entries are kept and marked as not conflicting.
- Conflicting work entries can be manually validated without approving/refusing the leave.
- If a leave is refused although it was previously validated (=> a corresponding work entry
was created), the corresponding work entry should disappear and "attendance" work entries
should be re-created instead.
Display
-------
In gantt and calendar views:
- Display only one button: "Generate Payslips"
- The button is disabled while there are conflicts. If there are no conflicts, payslips can
be directly generated.
- If there are conflicts, display a warning: "We found some conflicts, click here to revise them" which
leads to only conflicting work entries.
Note:
Conflict conditions are more and more complex/refined but the reason
is not necesarily precisly reported to end users.
The way errors are managed and later how the warning is displayed
should probably be improved.
Task 1935596When a helpdesk team's message subtypes are changed, the same settings are now applied to its related tickets. This keeps ticket communication behavior aligned with the team configuration and reduces manual follow-up for support teams.
Original PR description
…icket before this commit: while changing the subtypes on the helpdesk team, it does not affect on related tickets for subtypes which don't have parent_id. after this commit: when a user changes any subtypes on the helpdesk team then same will be applied on ticket also for subtypes with parent_id, internal or default. task-1974055 Task: https://www.odoo.com/web#id=1974055&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.0178a74905bafcc0f74a81894e0059a9
Resolved issues and error corrections
This update adjusts how several Odoo Enterprise pages prepare data for browser scripts, helping avoid display or loading issues when special characters are present. It improves reliability for Documents, Timesheets synchronization, and Enterprise web pages without changing user workflows.
Original PR description
Cf odoo/odoo#33682