Skip to content

[16.0][ADD] web_quick_start_screen: New module#2920

Merged
OCA-git-bot merged 1 commit intoOCA:16.0from
Tecnativa:16.0-add-web_quick_start_screen
Apr 10, 2025
Merged

[16.0][ADD] web_quick_start_screen: New module#2920
OCA-git-bot merged 1 commit intoOCA:16.0from
Tecnativa:16.0-add-web_quick_start_screen

Conversation

@chienandalu
Copy link
Copy Markdown
Member

This module adds a configurable start screen so users can go right into
their more common tasks.

image

cc @Tecnativa TT50477

please check @pedrobaeza @CarlosRoca13

f"fa {action.icon_name or 'fa-flash'} "
f"o_start_icon_color_{action.color}"
),
"action_name": action.action_ref_id.id,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning the field is non mandatory and will break with the following stacktrace

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1649, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1676, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1880, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 732, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/mnt/data/odoo-addons-dir/web_quick_start_screen/controllers/quick_start_screen.py", line 17, in quick_start_screen
    ]._get_start_screen_actions()
  File "/mnt/data/odoo-addons-dir/web_quick_start_screen/wizards/quick_start_screen.py", line 25, in _get_start_screen_actions
    "action_name": action.action_ref_id.id,
AttributeError: 'NoneType' object has no attribute 'id'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an evalued expression?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning the field is non mandatory

Sure it should be. Thanks :)

Shouldn't this be an evalued expression?

Not really, but the key name is a bit missleading, changing it

Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but we talked about some evalued thing (¿the context or the domain?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was thinking that being able to just run a custom server action there's no need to add such logic as server actions already provide a full fledged code evaluator. There's a simple optianal context, that can be used for manual actions thou.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, please indicate these hints in the README for others to be able to discover that usefulness.

@pedrobaeza pedrobaeza added this to the 16.0 milestone Aug 20, 2024
Comment thread web_quick_start_screen/README.rst
Comment thread web_quick_start_screen/README.rst Outdated
Usage
=====

Once you login, you'll go to the quick actions screen. Just click in and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be something out of the box for all the users. I think this module should provide an action that can be put as initial action in the users configuration to go to the screen. Other options:

  • A security group to include users in.
  • A check in the user.

Comment thread web_quick_start_screen/models/quick_start_screen_action.py
f"fa {action.icon_name or 'fa-flash'} "
f"o_start_icon_color_{action.color}"
),
"action_name": action.action_ref_id.id,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an evalued expression?

@chienandalu chienandalu force-pushed the 16.0-add-web_quick_start_screen branch from 3b1c95a to c7f6eca Compare August 21, 2024 06:59
@pedrobaeza
Copy link
Copy Markdown
Member

I'm also thinking about having a parent model for quick start templates, to have several of them, so they can be assigned for different users in the initial action/user preference. What do you think?

@chienandalu
Copy link
Copy Markdown
Member Author

I'm also thinking about having a parent model for quick start templates, to have several of them, so they can be assigned for different users in the initial action/user preference. What do you think?

I was thinking in that too, but simpler just making the model regular instead of transient. And then the actions be linked in many2many relation

@chienandalu chienandalu force-pushed the 16.0-add-web_quick_start_screen branch from c7f6eca to 3a71416 Compare August 21, 2024 13:52
@chienandalu
Copy link
Copy Markdown
Member Author

Refactor done so we can have multiple start screens. I found some limitations with the banner controller, but maybe they aren't important right now

@chienandalu chienandalu force-pushed the 16.0-add-web_quick_start_screen branch 15 times, most recently from 10c8902 to ec35de0 Compare August 23, 2024 12:24
@chienandalu chienandalu force-pushed the 16.0-add-web_quick_start_screen branch 2 times, most recently from c8c8929 to 6300132 Compare September 12, 2024 08:46
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2920-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 00057d5 into OCA:16.0 Apr 10, 2025
0 of 2 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 6b17638. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-add-web_quick_start_screen branch April 10, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants