Tuesday, July 20, 2021
6 changes · master
Enhancements to existing features
This update replaces older raw HTML handling with a safer, clearer way to show trusted formatted content. It reduces the risk of incorrect display or unsafe rendering while keeping rich text, notifications, dialogs, kanban cards, and formatted values working as intended.
Original PR description
non-owl JS-side of #68072: * deprecates `t-raw` * adds a `t-out` which `t-esc` aliases and which "does the right thing" * introduces a `Markup` function / object which is considered markup-safe by…
non-owl JS-side of #68072: * deprecates `t-raw` * adds a `t-out` which `t-esc` aliases and which "does the right thing" * introduces a `Markup` function / object which is considered markup-safe by t-out (thus left unescaped) - unlike the python version, most of the override hooks (e.g. concatenation, formatting, ...) are not available in JS, we might eventually want to override some of the action methods (e.g. replace) but so far the needs seemed pretty limited - and javascript pretty strongly differentiates between a string (primitive) and a String (object), the latter being what Markup gets - so various constructs which can return a Markup in Python can't really afford to in JS: I tried with QWeb and e.g. jquery *really* does not deal well with non-primitive strings, as a result `_.escape` is shimmed to understand `Markup` objects but will not return markup objects when escaping strings - `sprintf` (the one from web.utils) was updated for Markup-awareness for convenience though - and `Markup` can be used as a template tag, in which case it will automatically escape the substitutions - removed `messageIsHtml` from the non-owl notifications, replaced by the message being a markup object - updated Dialog to work the same way (it did not even have a flag), removed explicit escaping from most of the callsites (only found one where we actually leveraged dialog titles being markup) - modified the kanban view so HTML non-raw values automatically get wrapped in Markup Also moved some formatting from the server to the client, either removing the need to inject markup entirely or making the use of `Markup` much cleaner than just "mark whatever the server returned as safe". There are a few things I'm not entirely sure about e.g. whether even using markup is necessary for `formatMonetary`, doesn't the "unicode" NBSP work fine in HTML? Though we may need to keep `forceString` to ensure something like ascii-compatibility.
Stock operations now generate move lines more efficiently for products tracked by serial number. This reduces repeated processing during large purchase confirmations, improving performance for high-volume inventory workflows.
Original PR description
No need to make the same query 10 k times during line generation STEPS: * create a PO for product tracked by serial, set qty=10000 * confirm the PO --- task-2575448
Field Service administrators can now manage task stages from the Configuration menu, using a list view similar to the Project app. Newly created stages are automatically linked to the Field Service project, making setup and workflow management easier.
Original PR description
Purpose In Configuration menu of Field Service module, add menu "stages" to manage stages in list view like it exists in Project module. SPECIFICATION - Adding the "stages" menu below "project" menu item. - The menu is accessible for Admin user as exists in project module. - All created stage will be automatically added to the "Field service" project. Task-2455754
The planning experience has been refined across calendar, list, kanban, and forecasting views to make schedules easier to read and manage. Users can better understand allocated hours, publish schedules more clearly, and create related tasks with fewer steps.
Original PR description
_*= project_forecast, project_timesheet_forecast The purpose of the commit is to improve the usability and onboarding of the planning app. So in this commit, done the below changes: 1) Calendar view:…
_*= project_forecast, project_timesheet_forecast
The purpose of the commit is to improve the usability and onboarding
of the planning app.
So in this commit, done the below changes:
1) Calendar view:
- the number of hours indicated in the popover should correspond to the number of allocated
hours set on the shift
- indicate the % of the allocated time in brackets next to the number of allocated hours
- use the avatar widget for the employee
- move the note field below the task_id one
- shift without any nameget should have the same height as the other ones
- year mode:
- indicate the start hour of the shift (if it lasts less than 24h)
- crop the nameget if it becomes too long to display on one line
- the color of the role should not overflow
- display non-working days according to the calendar of the current company and global
time off in grey
- the nameget should be "Employee - Project - Task - Role"
2) List view
- reorder the fields.
- when creating a task on the fly, set the project_id set on the shift by default
- the task field should not be clickable
- it should be possible to create a task on the fly (without needing to edit it) if the project_id is set
- add the following actions:
- 'publish & send'
- 'publish'
- use the current 'Planning: new schedule (multiple shifts)' mail template for the
'publish & send' action
- if there is at least 1 shift to publish, display a green toast notification that states
"The shifts have successfully been published (and sent)."
- else, display a red toast notification that states: "There are no shifts to publish (and send)."
3) Kanban view
- move the date above the project_id field
- indicate the number of allocated hours and allocated time % (if =/= 100%) in brackets underneath
the date
- display the color of the role on the left of the card
- burger menu: rename 'edit slot' into 'edit'
4) Gantt view
- Gantt view popover
- the format of the 'effective hours' field should be 00:00
- indicate the allocated time % in brackets next to the number of allocated hours
- display the 'copy previous week' button in primary
TaskID:2502245This update replaces older ways of inserting formatted content with a safer, more consistent approach across accounting, documents, helpdesk, planning, field service, rentals, subscriptions, and related apps. Users should see the same content and guided tour behavior, while the platform becomes easier to maintain and less prone to display issues.
Timesheet reviewers can now create new entries directly from validation grid views, improving day-to-day workflow flexibility. A new option also allows eligible timesheet entries to be marked as invalid again, while protecting entries already tied to posted invoices.
Original PR description
Allow creation on the grid view on the 'to validate' views. Remove the readonly attribute from timesheet grid views to allow for timesheet creation when all timesheet within grid cell have been validated. Add a new action to timesheet entries to invalidate them. This action is not applicable to timesheet entries linked to posted invoices. Task ID: 2577965
Original PR description
See odoo/odoo#70004.