Merge PR #3137 into 18.0

Signed-off-by pedrobaeza
pull/3059/merge
OCA-git-bot 2025-04-10 14:38:33 +00:00
commit 749600102d
30 changed files with 1747 additions and 0 deletions

View File

@ -0,0 +1,137 @@
==================
Quick Start Screen
==================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f9c2d78e553eef639adf52a6811c9a92a1b131a13c2882469d1e47f4fe271679
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/18.0/web_quick_start_screen
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_quick_start_screen
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module adds a configurable start screen so users can go right into
their more common tasks.
It can be configured at the user level or just be used as common
screens.
**Table of contents**
.. contents::
:local:
Use Cases / Context
===================
Some users use repeatedly the same actions on and on and sometimes those
actions are so many clicks away which tends to be frustrating.
Configuration
=============
To create quick actions:
- Go to *Settings > Technical > User Interface > Screen actions* and
create o modify an existing one.
- Choose the desired action, a name, a description and an icon.
- You can add an optional context so you can reuse existing actions.
You can use ``ref(<xml_id>)`` to get an id that you can use in your
context. You can also use ``datetime`` and ``context_today`` in that
same way you can do in ``ir.filters``.
To create quick start screens:
- Go to *Settings > Technical > User Interface > Quick start screens*
and create or modify an existing one.
- Choose a descriptive name and link some quick screen actions.
To assign a quick start screen to a user:
- Go to *Settings > Users and groups > Users* and select one.
- In the *Preferences* tab, *Menus customization* section, you can
choose which *Quick start screen* will that user use.
- If you want to make the user start always in his start screen, in the
same section select the action *Quick Start Screen*.
To activate the quick start screen menu for a user:
- Go to *Settings > Users and groups > Users* (with debug mode on)
- In *Technical* groups, set *Quick Start Screen* on.
Usage
=====
When you have the proper config, once you login, you'll go to the quick
actions screen. Just click in and start working.
Known issues / Roadmap
======================
- Right now there's no much permissions handling, but it could be made
similarly to how menus deal with them.
- Also we could add the possibility of quick actions for users the same
way that favorite filters work.
- A tour helper that clicked in every defined action would be helpfull
to detect possible issues.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_quick_start_screen%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
-------
* Tecnativa
Contributors
------------
- `Tecnativa <https://tecnativa.com>`__
- Pedro M. Baeza
- David Vidal
Maintainers
-----------
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_quick_start_screen>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -0,0 +1 @@
from . import models

View File

@ -0,0 +1,28 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Quick Start Screen",
"summary": "Configurable start screen for quick actions",
"version": "18.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"category": "web",
"depends": ["web"],
"data": [
"security/ir.model.access.csv",
"security/security.xml",
"views/quick_screen_action_view.xml",
"views/quick_start_screen_views.xml",
"views/res_users_views.xml",
],
"demo": [
"demo/quick_screen_action_demo_data.xml",
],
"assets": {
"web.assets_backend": [
"web_quick_start_screen/static/src/scss/quick_start_screen.scss",
"web_quick_start_screen/static/src/js/**/*",
],
},
}

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="0">
<record id="quick_start_screen_action_contacts" model="quick.start.screen.action">
<field name="name">Contacts</field>
<field
name="description"
><![CDATA[ <span>Browse <b>contacts</b></span>]]></field>
<field name="action_ref_id" ref="base.action_partner_form" />
<field name="icon_name">fa-users</field>
<field name="color">7</field>
</record>
<record
id="quick_start_screen_action_access_rights"
model="quick.start.screen.action"
>
<field name="name">Access rights</field>
<field
name="description"
><![CDATA[ <span>Explore <b>access rights</b></span>]]></field>
<field name="action_ref_id" ref="base.ir_access_act" />
<field name="icon_name">fa-eye</field>
<field name="color">4</field>
</record>
<record
id="quick_start_screen_action_config_actions"
model="quick.start.screen.action"
>
<field name="name">Configure screen actions</field>
<field
name="description"
><![CDATA[ <span>Configure this <b>screen actions</b></span>]]></field>
<field
name="action_ref_id"
ref="web_quick_start_screen.quick_start_screen_action_action"
/>
<field
name="image"
type="base64"
file="web_quick_start_screen/static/description/icon.png"
/>
</record>
<record id="quick_start_screen_demo" model="quick.start.screen">
<field name="name">Demo start screen</field>
<field
name="action_ids"
eval="[Command.link(ref('web_quick_start_screen.quick_start_screen_action_contacts')), Command.link(ref('web_quick_start_screen.quick_start_screen_action_config_actions'))]"
/>
</record>
<record id="base.user_demo" model="res.users">
<field
name="groups_id"
eval="[Command.link(ref('web_quick_start_screen.group_quick_start_screen'))]"
/>
<field name="quick_start_screen_id" ref="quick_start_screen_demo" />
<field name="action_id" ref="web_quick_start_screen.start_screen_action" />
</record>
</odoo>

View File

@ -0,0 +1,257 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_quick_start_screen
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-23 12:21+0000\n"
"PO-Revision-Date: 2024-08-23 14:23+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.4\n"
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_contacts
msgid "<span>Browse <b>contacts</b></span>"
msgstr "<span>Explorar <b>contactos</b></span>"
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_config_actions
msgid "<span>Configure this <b>screen actions</b></span>"
msgstr "<span>Configurar <b>acciones de pantalla</b></span>"
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_access_rights
msgid "<span>Explore <b>access rights</b></span>"
msgstr "<span>Ver <b>derechos de acceso</b></span>"
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_access_rights
msgid "Access rights"
msgstr "Derechos de acceso"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__action_ids
msgid "Action"
msgstr "Acción"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__action_ref_id
msgid "Action Ref"
msgstr "Referencia de acción"
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_quick_start_screen_action
msgid "Actions to be launched from a quick start screen"
msgstr "Acciones que serán lanzadas desde la pantalla de inicio"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__active
msgid "Active"
msgstr "Activo"
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__context
msgid ""
"Add extra context if needed. You can use `ref('<xml_id>')` and it will "
"beevaluated. You can also use `datetime` and `context_today` in the same "
"way`ir.filters` do."
msgstr ""
"Añadir contexto adicional si se necesita. Puede utilizar `ref('<xml_id>')` "
"y será evaluado. También puede utilizar `datetime` y `context_today` del "
"mismo modo que se hace en `ir.filters`."
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__domain
msgid ""
"Add extra domain if needed. You can use `ref('<xml_id>')` and it will "
"beevaluated. You can also use `datetime` and `context_today` in the same "
"way`ir.filters` do."
msgstr ""
"Añadir un dominio adicional si se necesita. Puede utilizar "
"`ref('<xml_id>')` y será evaluado. También puede utilizar `datetime` y "
"`context_today` del mismo modo que se hace en `ir.filters`."
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__color
msgid "Choose the icon color"
msgstr "Escoja el color del icono"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__color
msgid "Color"
msgstr "Color"
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_config_actions
msgid "Configure screen actions"
msgstr "Configurar acciones de pantalla"
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_contacts
msgid "Contacts"
msgstr "Contactos"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__context
msgid "Context"
msgstr "Contexto"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__create_uid
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__create_date
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__create_date
msgid "Created on"
msgstr "Creado el"
#. module: web_quick_start_screen
#: model:quick.start.screen,name:web_quick_start_screen.quick_start_screen_demo
msgid "Demo start screen"
msgstr "Pantalla de inicio demo"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__description
msgid "Description"
msgstr "Descripción"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__display_name
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__display_name
msgid "Display Name"
msgstr "Nombre mostrado"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__domain
msgid "Domain"
msgstr "Dominio"
#. module: web_quick_start_screen
#: model_terms:ir.ui.view,arch_db:web_quick_start_screen.quick_start_screen_tree_view
msgid "Go to the start screen"
msgstr "Ir a la pantalla de inicio"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__id
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__id
msgid "ID"
msgstr "ID (identificación)"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__icon_name
msgid "Icon Name"
msgstr "Nombre del icono"
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__icon_name
msgid "Just set the Font Awesome icon name. e.g.: fa-truck"
msgstr ""
"Tan solo establezca el nombre de icono de Font Awesome: p.e..: fa-truck"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen____last_update
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action____last_update
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__write_uid
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__write_uid
msgid "Last Updated by"
msgstr "Última actualización de"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__write_date
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__write_date
msgid "Last Updated on"
msgstr "Última actualización en"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__name
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__name
msgid "Name"
msgstr "Nombre"
#. module: web_quick_start_screen
#: model:ir.actions.server,name:web_quick_start_screen.start_screen_action
#: model:ir.model.fields,field_description:web_quick_start_screen.field_res_users__quick_start_screen_id
#: model:res.groups,name:web_quick_start_screen.group_quick_start_screen
msgid "Quick Start Screen"
msgstr "Pantalla de inicio rápido"
#. module: web_quick_start_screen
#: model:ir.actions.act_window,name:web_quick_start_screen.quick_start_screen_action_action
#: model:ir.ui.menu,name:web_quick_start_screen.menu_quick_start_screen_action
msgid "Quick Start Screen Actions"
msgstr "Acciones de pantalla de inicio rápido"
#. module: web_quick_start_screen
#: model:ir.actions.act_window,name:web_quick_start_screen.start_screen_action_config
#: model:ir.ui.menu,name:web_quick_start_screen.menu_quick_start_screen_action_config
msgid "Quick Start Screens"
msgstr "Pantallas de inicio rápido"
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_quick_start_screen
msgid "Quick action selection screen"
msgstr "Pantalla de selección rápida de acciones"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__sequence
msgid "Sequence"
msgstr "Secuencia"
#. module: web_quick_start_screen
#. odoo-python
#: code:addons/web_quick_start_screen/models/quick_start_screen.py:0
#: model:ir.ui.menu,name:web_quick_start_screen.menu_start
#: model:ir.ui.menu,name:web_quick_start_screen.menu_start_screen
#, python-format
msgid "Start"
msgstr "Inicio"
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__image
msgid "Start screen icon"
msgstr "Icono de pantalla de inicio"
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_res_users
msgid "User"
msgstr "Usuario"
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_act_url
msgid "ir.actions.act_url"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_act_window
msgid "ir.actions.act_window"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_client
msgid "ir.actions.client"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_report
msgid "ir.actions.report"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_server
msgid "ir.actions.server"
msgstr ""

View File

@ -0,0 +1,249 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_quick_start_screen
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-23 12:20+0000\n"
"PO-Revision-Date: 2024-08-23 12:20+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_contacts
msgid "<span>Browse <b>contacts</b></span>"
msgstr ""
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_config_actions
msgid "<span>Configure this <b>screen actions</b></span>"
msgstr ""
#. module: web_quick_start_screen
#: model_terms:quick.start.screen.action,description:web_quick_start_screen.quick_start_screen_action_access_rights
msgid "<span>Explore <b>access rights</b></span>"
msgstr ""
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_access_rights
msgid "Access rights"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__action_ids
msgid "Action"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__action_ref_id
msgid "Action Ref"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_quick_start_screen_action
msgid "Actions to be launched from a quick start screen"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__active
msgid "Active"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__context
msgid ""
"Add extra context if needed. You can use `ref('<xml_id>')` and it will "
"beevaluated. You can also use `datetime` and `context_today` in the same "
"way`ir.filters` do."
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__domain
msgid ""
"Add extra domain if needed. You can use `ref('<xml_id>')` and it will "
"beevaluated. You can also use `datetime` and `context_today` in the same "
"way`ir.filters` do."
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__color
msgid "Choose the icon color"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__color
msgid "Color"
msgstr ""
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_config_actions
msgid "Configure screen actions"
msgstr ""
#. module: web_quick_start_screen
#: model:quick.start.screen.action,name:web_quick_start_screen.quick_start_screen_action_contacts
msgid "Contacts"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__context
msgid "Context"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__create_uid
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__create_uid
msgid "Created by"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__create_date
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__create_date
msgid "Created on"
msgstr ""
#. module: web_quick_start_screen
#: model:quick.start.screen,name:web_quick_start_screen.quick_start_screen_demo
msgid "Demo start screen"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__description
msgid "Description"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__display_name
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__display_name
msgid "Display Name"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__domain
msgid "Domain"
msgstr ""
#. module: web_quick_start_screen
#: model_terms:ir.ui.view,arch_db:web_quick_start_screen.quick_start_screen_tree_view
msgid "Go to the start screen"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__id
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__id
msgid "ID"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__icon_name
msgid "Icon Name"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,help:web_quick_start_screen.field_quick_start_screen_action__icon_name
msgid "Just set the Font Awesome icon name. e.g.: fa-truck"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen____last_update
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action____last_update
msgid "Last Modified on"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__write_uid
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__write_uid
msgid "Last Updated by"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__write_date
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__write_date
msgid "Last Updated on"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen__name
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__name
msgid "Name"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.actions.server,name:web_quick_start_screen.start_screen_action
#: model:ir.model.fields,field_description:web_quick_start_screen.field_res_users__quick_start_screen_id
#: model:res.groups,name:web_quick_start_screen.group_quick_start_screen
msgid "Quick Start Screen"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.actions.act_window,name:web_quick_start_screen.quick_start_screen_action_action
#: model:ir.ui.menu,name:web_quick_start_screen.menu_quick_start_screen_action
msgid "Quick Start Screen Actions"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.actions.act_window,name:web_quick_start_screen.start_screen_action_config
#: model:ir.ui.menu,name:web_quick_start_screen.menu_quick_start_screen_action_config
msgid "Quick Start Screens"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_quick_start_screen
msgid "Quick action selection screen"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__sequence
msgid "Sequence"
msgstr ""
#. module: web_quick_start_screen
#. odoo-python
#: code:addons/web_quick_start_screen/models/quick_start_screen.py:0
#: code:addons/web_quick_start_screen/models/quick_start_screen.py:0
#: model:ir.ui.menu,name:web_quick_start_screen.menu_start
#: model:ir.ui.menu,name:web_quick_start_screen.menu_start_screen
#, python-format
msgid "Start"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields,field_description:web_quick_start_screen.field_quick_start_screen_action__image
msgid "Start screen icon"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model,name:web_quick_start_screen.model_res_users
msgid "User"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_act_url
msgid "ir.actions.act_url"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_act_window
msgid "ir.actions.act_window"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_client
msgid "ir.actions.client"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_report
msgid "ir.actions.report"
msgstr ""
#. module: web_quick_start_screen
#: model:ir.model.fields.selection,name:web_quick_start_screen.selection__quick_start_screen_action__action_ref_id__ir_actions_server
msgid "ir.actions.server"
msgstr ""

View File

@ -0,0 +1,3 @@
from . import quick_start_screen
from . import quick_start_screen_action
from . import res_users

View File

@ -0,0 +1,68 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from collections import defaultdict
from odoo import api, fields, models, tools
class QuicktStartScreen(models.Model):
_name = "quick.start.screen"
_description = "Quick action selection screen"
name = fields.Char(translate=True)
action_ids = fields.Many2many(comodel_name="quick.start.screen.action")
@api.model
@tools.ormcache("frozenset(self.env.user.groups_id.ids)")
def _visible_action_ids(self):
"""Inspired on how menus visibility work in core"""
screen_actions = self.action_ids.search([]).sudo()
visible = self.action_ids.browse()
access = self.env["ir.model.access"]
MODEL_BY_TYPE = {
"ir.actions.act_window": "res_model",
"ir.actions.report": "model",
"ir.actions.server": "model_name",
}
# performance trick: determine the ids to prefetch by type
prefetch_ids = defaultdict(list)
for action in screen_actions.mapped("action_ref_id"):
prefetch_ids[action._name].append(action.id)
for screen_action in screen_actions:
action = screen_action.action_ref_id
action = action.with_prefetch(prefetch_ids[action._name])
model_name = (
action._name in MODEL_BY_TYPE and action[MODEL_BY_TYPE[action._name]]
)
if not model_name or access.check(model_name, "read", False):
visible += screen_action
return set(visible.ids)
def _prepare_screen_action(self):
return {
"display_name": self.name or self.env._("Start"),
"name": self.name or self.env._("Start"),
"res_model": "quick.start.screen.action",
"target": "current",
"type": "ir.actions.act_window",
"view_mode": "kanban",
"views": [
[
self.env.ref(
"web_quick_start_screen.quick_start_screen_action_kanban"
).id,
"kanban",
]
],
}
def action_screen_actions(self):
"""Normally called from a server action"""
if not self:
self = self.env.user.quick_start_screen_id
if not self:
self = self.browse(self.env.context.get("default_quick_start_screen_id"))
action = self._prepare_screen_action()
visible_actions = set(self.action_ids.ids) & self._visible_action_ids()
action["domain"] = [("id", "in", list(visible_actions))]
return action

View File

@ -0,0 +1,69 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo.tools.safe_eval import datetime, safe_eval
class DecontracStartScreenAction(models.Model):
_name = "quick.start.screen.action"
_description = "Actions to be launched from a quick start screen"
_order = "sequence, id"
active = fields.Boolean(default=True)
sequence = fields.Integer()
name = fields.Char(required=True, translate=True)
image = fields.Image("Start screen icon", max_width=128, max_height=128, store=True)
icon_name = fields.Char(help="Just set the Font Awesome icon name. e.g.: fa-truck")
color = fields.Integer(help="Choose the icon color")
description = fields.Html(translate=True)
action_ref_id = fields.Reference(
selection=[
("ir.actions.report", "ir.actions.report"),
("ir.actions.act_window", "ir.actions.act_window"),
("ir.actions.act_url", "ir.actions.act_url"),
("ir.actions.server", "ir.actions.server"),
("ir.actions.client", "ir.actions.client"),
],
required=True,
)
domain = fields.Char(
help="Add extra domain if needed. You can use `ref('<xml_id>')` and it will be"
"evaluated. You can also use `datetime` and `context_today` in the same way"
"`ir.filters` do."
)
context = fields.Char(
help="Add extra context if needed. You can use `ref('<xml_id>')` and it will be"
"evaluated. You can also use `datetime` and `context_today` in the same way"
"`ir.filters` do."
)
def _safe_eval(self, expresion):
return safe_eval(
expresion,
{
"ref": lambda r: self.env.ref(r).id,
"datetime": datetime,
"context_today": datetime.datetime.now,
},
)
def _get_extra_context(self):
self.ensure_one()
return self._safe_eval(self.context or "{}")
def run_action(self):
"""Execute the action. We can override the action context if needed"""
self.ensure_one()
action = self.action_ref_id._get_action_dict()
if self.context:
extra_context = self._get_extra_context()
# We need to deal with the active_id and overwrite it if needed
# MIG TODO: Check if this is affected
active_id = extra_context.get("active_id", 0)
action["context"] = dict(
safe_eval(action.get("context", "{}"), {"active_id": active_id}),
**extra_context,
)
if self.domain:
action["domain"] = self._safe_eval(self.domain)
return action

View File

@ -0,0 +1,9 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
quick_start_screen_id = fields.Many2one(comodel_name="quick.start.screen")

View File

@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@ -0,0 +1,27 @@
To create quick actions:
- Go to *Settings > Technical > User Interface > Screen actions* and create o modify an
existing one.
- Choose the desired action, a name, a description and an icon.
- You can add an optional context so you can reuse existing actions. You can use
`ref(<xml_id>)` to get an id that you can use in your context. You can also use
`datetime` and `context_today` in that same way you can do in `ir.filters`.
To create quick start screens:
- Go to *Settings > Technical > User Interface > Quick start screens* and create or
modify an existing one.
- Choose a descriptive name and link some quick screen actions.
To assign a quick start screen to a user:
- Go to *Settings > Users and groups > Users* and select one.
- In the *Preferences* tab, *Menus customization* section, you can choose which
*Quick start screen* will that user use.
- If you want to make the user start always in his start screen, in the same section
select the action *Quick Start Screen*.
To activate the quick start screen menu for a user:
- Go to *Settings > Users and groups > Users* (with debug mode on)
- In *Technical* groups, set *Quick Start Screen* on.

View File

@ -0,0 +1,2 @@
Some users use repeatedly the same actions on and on and sometimes those actions are
so many clicks away which tends to be frustrating.

View File

@ -0,0 +1,3 @@
- [Tecnativa](https://tecnativa.com)
- Pedro M. Baeza
- David Vidal

View File

@ -0,0 +1,4 @@
This module adds a configurable start screen so users can go right into their more
common tasks.
It can be configured at the user level or just be used as common screens.

View File

@ -0,0 +1,6 @@
- Right now there's no much permissions handling, but it could be made similarly to how
menus deal with them.
- Also we could add the possibility of quick actions for users the same way that
favorite filters work.
- A tour helper that clicked in every defined action would be helpfull to detect
possible issues.

View File

@ -0,0 +1,2 @@
When you have the proper config, once you login, you'll go to the quick actions
screen. Just click in and start working.

View File

@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
web_quick_start_screen.access_start_screen,access_quick_start_screen,web_quick_start_screen.model_quick_start_screen,base.group_user,1,1,0,0
web_quick_start_screen.access_quick_start_screen_action,access_quick_start_screen_action,web_quick_start_screen.model_quick_start_screen_action,base.group_user,1,1,0,0
web_quick_start_screen.access_start_screen_admin,access_quick_start_screen_admin,web_quick_start_screen.model_quick_start_screen,base.group_system,1,1,1,1
web_quick_start_screen.access_quick_start_screen_action_admin,access_quick_start_screen_action_admin,web_quick_start_screen.model_quick_start_screen_action,base.group_system,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 web_quick_start_screen.access_start_screen access_quick_start_screen web_quick_start_screen.model_quick_start_screen base.group_user 1 1 0 0
3 web_quick_start_screen.access_quick_start_screen_action access_quick_start_screen_action web_quick_start_screen.model_quick_start_screen_action base.group_user 1 1 0 0
4 web_quick_start_screen.access_start_screen_admin access_quick_start_screen_admin web_quick_start_screen.model_quick_start_screen base.group_system 1 1 1 1
5 web_quick_start_screen.access_quick_start_screen_action_admin access_quick_start_screen_action_admin web_quick_start_screen.model_quick_start_screen_action base.group_system 1 1 1 1

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="group_quick_start_screen" model="res.groups">
<field name="name">Quick Start Screen</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="70"
height="70"
viewBox="0,0,70,70"
odoo-icon:version="1.0"
odoo-icon:size="70"
odoo-icon:icon-size="0.65"
odoo-icon:icon-color="#FFFFFF"
odoo-icon:icon-flat-shadow-angle="135"
odoo-icon:background-color="#3949ab"
odoo-icon:background-gradient="0.2"
odoo-icon:box-radius="3.5"
odoo-icon:odoo-version="16.0"
id="svg2"
sodipodi:docname="icon (4).svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:odoo-icon="https://ivantodorovich.github.io/odoo-icon">
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="11.614286"
inkscape:cx="35"
inkscape:cy="35"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs2">
<linearGradient
x1="70"
y1="0"
x2="0"
y2="70"
gradientUnits="userSpaceOnUse"
id="color-1">
<stop
offset="0"
stop-color="#6c7cde"
id="stop1" />
<stop
offset="1"
stop-color="#3949ab"
id="stop2" />
</linearGradient>
</defs>
<g
fill="none"
fill-rule="nonzero"
stroke="none"
stroke-width="1"
stroke-linecap="butt"
stroke-linejoin="miter"
stroke-miterlimit="10"
stroke-dasharray=""
stroke-dashoffset="0"
font-family="none"
font-weight="none"
font-size="none"
text-anchor="none"
style="mix-blend-mode: normal"
id="g2">
<path
d="M3.5,70c-1.933,0 -3.5,-1.567 -3.5,-3.5v-63c0,-1.933 1.567,-3.5 3.5,-3.5h63c1.933,0 3.5,1.567 3.5,3.5v63c0,1.933 -1.567,3.5 -3.5,3.5z"
id="box"
fill="url(#color-1)" />
<path
d="M65,1h-61c-1.95033,0 -3.2667,0.63396 -3.9491,1.90189c0.28378,-1.64806 1.72001,-2.90189 3.4491,-2.90189h63c1.72965,0 3.16627,1.25466 3.44938,2.90352c-0.69803,-1.26902 -2.34782,-1.90352 -4.94938,-1.90352z"
id="topBoxShadow"
fill="#ffffff"
opacity="0.383" />
<path
d="M4,69h61c2.66667,0 4.33333,-1 5,-3v0.5c0,1.933 -1.567,3.5 -3.5,3.5h-63c-1.933,0 -3.5,-1.567 -3.5,-3.5c0,-0.1611 0,-0.32777 0,-0.5c0.66667,2 2,3 4,3z"
id="bottomBoxShadow"
fill="#000000"
opacity="0.383" />
<path
d="M53.57254,28.5734h-12.19353l10.96477,-13.8536c0.22671,-0.29359 0.0221,-0.7198 -0.34856,-0.7198h-21.22617c-0.15473,0 -0.30436,0.08275 -0.382,0.22161l-14.34102,24.76849c-0.17173,0.29359 0.03854,0.66426 0.382,0.66426h9.65269l-4.94792,19.7928c-0.10542,0.43188 0.41488,0.73624 0.73624,0.42621l32.00843,-30.54163c0.28792,-0.27148 0.09408,-0.75834 -0.30436,-0.75834z"
id="shadow"
fill="#000000"
opacity="0.3" />
<path
d="M30.45729,12.12884c0.08213,-0.08213 0.1955,-0.12884 0.31176,-0.12884h21.22617c0.37067,0 0.57527,0.42621 0.34856,0.7198l-10.96477,13.8536l12.19409,0c0.3937,0 0.58764,0.47535 0.31442,0.74857l-42.67803,42.67803h-7.7095c-1.933,0 -3.5,-1.567 -3.5,-3.5l0,-23.91387z"
id="flatShadow"
fill="#000000"
opacity="0.324" />
<path
d="M53.57254,26.5734h-12.19353l10.96477,-13.8536c0.22671,-0.29359 0.0221,-0.7198 -0.34856,-0.7198h-21.22617c-0.15473,0 -0.30436,0.08275 -0.382,0.22161l-14.34102,24.76849c-0.17173,0.29359 0.03854,0.66426 0.382,0.66426h9.65269l-4.94792,19.7928c-0.10542,0.43188 0.41488,0.73624 0.73624,0.42621l32.00843,-30.54163c0.28792,-0.27148 0.09408,-0.75834 -0.30436,-0.75834z"
id="icon"
fill="#ffffff"
style="fill:#fdd835;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,487 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Quick Start Screen</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="quick-start-screen">
<h1 class="title">Quick Start Screen</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f9c2d78e553eef639adf52a6811c9a92a1b131a13c2882469d1e47f4fe271679
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_quick_start_screen"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_quick_start_screen"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a configurable start screen so users can go right into
their more common tasks.</p>
<p>It can be configured at the user level or just be used as common
screens.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="use-cases-context">
<h1><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h1>
<p>Some users use repeatedly the same actions on and on and sometimes those
actions are so many clicks away which tends to be frustrating.</p>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<p>To create quick actions:</p>
<ul class="simple">
<li>Go to <em>Settings &gt; Technical &gt; User Interface &gt; Screen actions</em> and
create o modify an existing one.</li>
<li>Choose the desired action, a name, a description and an icon.</li>
<li>You can add an optional context so you can reuse existing actions.
You can use <tt class="docutils literal"><span class="pre">ref(&lt;xml_id&gt;)</span></tt> to get an id that you can use in your
context. You can also use <tt class="docutils literal">datetime</tt> and <tt class="docutils literal">context_today</tt> in that
same way you can do in <tt class="docutils literal">ir.filters</tt>.</li>
</ul>
<p>To create quick start screens:</p>
<ul class="simple">
<li>Go to <em>Settings &gt; Technical &gt; User Interface &gt; Quick start screens</em>
and create or modify an existing one.</li>
<li>Choose a descriptive name and link some quick screen actions.</li>
</ul>
<p>To assign a quick start screen to a user:</p>
<ul class="simple">
<li>Go to <em>Settings &gt; Users and groups &gt; Users</em> and select one.</li>
<li>In the <em>Preferences</em> tab, <em>Menus customization</em> section, you can
choose which <em>Quick start screen</em> will that user use.</li>
<li>If you want to make the user start always in his start screen, in the
same section select the action <em>Quick Start Screen</em>.</li>
</ul>
<p>To activate the quick start screen menu for a user:</p>
<ul class="simple">
<li>Go to <em>Settings &gt; Users and groups &gt; Users</em> (with debug mode on)</li>
<li>In <em>Technical</em> groups, set <em>Quick Start Screen</em> on.</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<p>When you have the proper config, once you login, youll go to the quick
actions screen. Just click in and start working.</p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Right now theres no much permissions handling, but it could be made
similarly to how menus deal with them.</li>
<li>Also we could add the possibility of quick actions for users the same
way that favorite filters work.</li>
<li>A tour helper that clicked in every defined action would be helpfull
to detect possible issues.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_quick_start_screen%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-6">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-7">Authors</a></h2>
<ul class="simple">
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://tecnativa.com">Tecnativa</a><ul>
<li>Pedro M. Baeza</li>
<li>David Vidal</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/18.0/web_quick_start_screen">OCA/web</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,15 @@
/* Copyright 2024 Tecnativa - David Vidal
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
import {ControlPanel} from "@web/search/control_panel/control_panel";
import {kanbanView} from "@web/views/kanban/kanban_view";
import {registry} from "@web/core/registry";
export class QuickStartScreenControlPanel extends ControlPanel {
static template = "start_screen.ControlPanel";
}
export const quickStartScreenView = {
...kanbanView,
ControlPanel: QuickStartScreenControlPanel,
};
registry.category("views").add("quick_start_screen", quickStartScreenView);

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t
t-name="start_screen.ControlPanel"
t-inherit="web.ControlPanel"
t-inherit-mode="primary"
>
<xpath expr="//div[hasclass('o_control_panel')]" position="attributes">
<attribute name="class" add="d-none" separator=" " />
</xpath>
</t>
</templates>

View File

@ -0,0 +1,6 @@
// Set all the colors but the "no-color" one
@for $size from 2 through length($o-colors) {
.o_start_icon_color_#{$size - 1} {
color: nth($o-colors, $size);
}
}

View File

@ -0,0 +1,2 @@
from . import test_web_quick_start_screen
from .test_web_quick_start_screen import TestQuickStartActionsCommon

View File

@ -0,0 +1,26 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import TransactionCase
class TestQuickStartActionsCommon(TransactionCase):
def _test_screen_action(self, screen_action):
"""Basic test helper. For a more complete one we'd need a tour"""
action = screen_action.run_action()
if action["type"] == "ir.actions.server":
action = (
self.env.ref(action["xml_id"])
.with_context(**screen_action._get_extra_context())
.run()
)
return action
class TestQuickStartActions(TestQuickStartActionsCommon):
def test_demo_screen_actions(self):
"""Let's test every action screen in our demo data"""
demo_start_screen = self.env.ref(
"web_quick_start_screen.quick_start_screen_demo"
)
for action in demo_start_screen.action_ids:
self._test_screen_action(action)

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="quick_start_screen_action_list" model="ir.ui.view">
<field name="model">quick.start.screen.action</field>
<field name="arch" type="xml">
<list>
<field name="sequence" widget="handle" />
<field name="name" />
<field name="description" />
<field name="action_ref_id" groups="base.group_system" />
</list>
</field>
</record>
<record id="quick_start_screen_action_kanban" model="ir.ui.view">
<field name="model">quick.start.screen.action</field>
<field name="arch" type="xml">
<kanban create="0" edit="0" delete="0" js_class="quick_start_screen">
<field name="id" />
<field name="name" />
<field name="description" />
<field name="image" />
<field name="icon_name" />
<field name="color" />
<field name="context" />
<templates>
<t t-name="card" class="flex-row">
<aside class="d-flex align-items-center me-2">
<field
t-if="record.image.raw_value"
name="image"
widget="image"
options="{'img_class': 'object-fit-contain'}"
/>
<i
t-else=""
t-attf-class="fa #{record.icon_name.raw_value or 'fa-flash'} fa-3x o_start_icon_color_#{record.color.raw_value}"
t-att-title="record.name.raw_value"
/>
</aside>
<main>
<h3 class="card-title" t-out="record.name.raw_value" />
<a
type="object"
data-reload-on-close="true"
name="run_action"
role="button"
href="#"
class="btn-lnk stretched-link"
t-att-string="record.name.raw_value"
>
<span t-out="record.description.raw_value" />
</a>
</main>
</t>
</templates>
</kanban>
</field>
</record>
<record id="quick_start_screen_action_form" model="ir.ui.view">
<field name="model">quick.start.screen.action</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name" />
<field name="action_ref_id" groups="base.group_system" />
<field name="description" widget="html" />
<field name="icon_name" invisible="image" />
<field name="color" widget="color_picker" invisible="image" />
<field name="domain" groups="base.group_system" />
<field name="context" groups="base.group_system" />
<field name="image" widget="image" />
</group>
</sheet>
</form>
</field>
</record>
<record id="quick_start_screen_action_action" model="ir.actions.act_window">
<field name="name">Quick Start Screen Actions</field>
<field name="res_model">quick.start.screen.action</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_quick_start_screen_action"
name="Quick Start Screen Actions"
parent="base.next_id_2"
action="web_quick_start_screen.quick_start_screen_action_action"
/>
</odoo>

View File

@ -0,0 +1,54 @@
<odoo>
<record id="quick_start_screen_list_view" model="ir.ui.view">
<field name="model">quick.start.screen</field>
<field name="arch" type="xml">
<list editable="top">
<field name="name" />
<field
name="action_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
/>
<button
type="object"
name="action_screen_actions"
class="btn btn-primary"
title="Go to the start screen"
icon="fa-flash"
/>
</list>
</field>
</record>
<record id="start_screen_action_config" model="ir.actions.act_window">
<field name="res_model">quick.start.screen</field>
<field name="name">Quick Start Screens</field>
<field name="view_mode">list</field>
</record>
<record id="start_screen_action" model="ir.actions.server">
<field name="name">Quick Start Screen</field>
<field name="model_id" ref="web_quick_start_screen.model_quick_start_screen" />
<field name="state">code</field>
<field name="code">
action = (records or model).action_screen_actions()
</field>
</record>
<menuitem
id="menu_quick_start_screen_action_config"
name="Quick Start Screens"
parent="base.next_id_2"
action="web_quick_start_screen.start_screen_action_config"
/>
<menuitem
id="menu_start"
name="Start"
web_icon="web_quick_start_screen,static/description/icon.png"
sequence="6"
groups="web_quick_start_screen.group_quick_start_screen"
/>
<menuitem
id="menu_start_screen"
name="Start"
parent="menu_start"
action="web_quick_start_screen.start_screen_action"
/>
</odoo>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_users_form" model="ir.ui.view">
<field name="inherit_id" ref="base.view_users_form" />
<field name="model">res.users</field>
<field name="arch" type="xml">
<field name="action_id" position="before">
<field name="quick_start_screen_id" />
</field>
</field>
</record>
</odoo>