Skip to content

[IMP] project_ux: improve project creation and keep task name on quick create#143

Open
les-adhoc wants to merge 2 commits into
ingadhoc:19.0from
adhoc-dev:19.0-t-69540-les
Open

[IMP] project_ux: improve project creation and keep task name on quick create#143
les-adhoc wants to merge 2 commits into
ingadhoc:19.0from
adhoc-dev:19.0-t-69540-les

Conversation

@les-adhoc

Copy link
Copy Markdown
Contributor

Dos mejoras de UX en project_ux (v19.0). Task: https://www.adhoc.inc/odoo/action-/69540

1. [FIX] No borrar el título de la tarea al seleccionar proyecto

En el quick-create (My Tasks, kanban del proyecto) el campo "Task Title" está bindeado a display_name, que solo se vuelca a name al guardar. Como este módulo hace que display_name dependa de project_id.show_task_id (para mostrar el (#id)), al seleccionar/cambiar el proyecto se recomputa display_name desde un name todavía vacío y se borra el título tipeado.

Se restaura el valor tipeado en el resultado del onchange para que sobreviva al cambio de proyecto, en todos los flujos de creación.

Se evaluó el fix alternativo a nivel de dependencia del compute (@api.depends), pero rompe el refresco del (#id) al togglear show_task_id o reintroduce el wipe; el override de onchange es la opción más limpia dado el modelo de invalidación de Odoo.

2. [IMP] Redirigir al form del proyecto tras crearlo

Crear un proyecto desde Project > New redirigía al pipeline de tareas (config de etapas Kanban "No stages yet...") antes de poder configurar el proyecto. Se apunta el botón "Create project" del modal al método estándar get_formview_action, que abre el form propio del proyecto. Acotado a ese modal: el action_view_tasks compartido (tarjetas del kanban) queda intacto. Las etapas siguen configurables desde la pestaña "Tasks Stages".

Test plan

  • project_ux: 12 tests, todos en verde (incluye 3 nuevos: título preservado en quick-create con y sin show_task_id; botón del modal apunta a get_formview_action; la acción aterriza en el form del proyecto).
  • Manual: crear tarea escribiendo título y luego eligiendo proyecto → el título se conserva. Crear proyecto desde New → se abre el form del proyecto.

@roboadhoc

Copy link
Copy Markdown

Pull request status dashboard

@les-adhoc les-adhoc changed the title [IMP] project_ux: UX en creación de tareas y proyectos [IMP] project_ux: improve project creation and keep task name on quick create Jun 18, 2026
…ck-create

The quick-create form (My Tasks, project kanban) binds the "Task Title" input
to display_name, which is only inversed into `name` on save. Because this
module makes display_name depend on project_id.show_task_id (to append the
task id), selecting/changing the project invalidates and recomputes
display_name from the still-empty `name`, wiping the title the user just typed.

Restore the typed value in the onchange result so it survives the project
change, across all creation flows (quick-create and normal form).

Task: 69540
Creating a project from Project > New redirected to the task pipeline (the
"No stages yet..." Kanban stages config) before the project was set up.
Point the "Create project" button of the New modal to the standard
get_formview_action so it lands on the project's own form, where the user can
finish configuring it (manager, customer, dates, settings). Stages remain
configurable from the "Tasks Stages" tab. Scoped to that modal only, so the
shared action_view_tasks (used by the kanban cards) is untouched.

Task: 69540
@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ bump

@roboadhoc

Copy link
Copy Markdown

@les-adhoc @mav-adhoc because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc rebase-ff

@roboadhoc

Copy link
Copy Markdown

Merge method set to rebase and fast-forward.

roboadhoc pushed a commit that referenced this pull request Jun 19, 2026
…ck-create

The quick-create form (My Tasks, project kanban) binds the "Task Title" input
to display_name, which is only inversed into `name` on save. Because this
module makes display_name depend on project_id.show_task_id (to append the
task id), selecting/changing the project invalidates and recomputes
display_name from the still-empty `name`, wiping the title the user just typed.

Restore the typed value in the onchange result so it survives the project
change, across all creation flows (quick-create and normal form).

Task: 69540
Part-of: #143
Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
roboadhoc pushed a commit that referenced this pull request Jun 19, 2026
Creating a project from Project > New redirected to the task pipeline (the
"No stages yet..." Kanban stages config) before the project was set up.
Point the "Create project" button of the New modal to the standard
get_formview_action so it lands on the project's own form, where the user can
finish configuring it (manager, customer, dates, settings). Stages remain
configurable from the "Tasks Stages" tab. Scoped to that modal only, so the
shared action_view_tasks (used by the kanban cards) is untouched.

closes #143

Task: 69540
Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants