Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMP add an explicit notification message (printer name for example) #318

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

mourad-ehm
Copy link
Member

@mourad-ehm mourad-ehm commented Nov 5, 2024

@bealdav
display an explicit message to facilitate debugging

Copy link
Member

@hparfr hparfr left a comment

Choose a reason for hiding this comment

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

it helps the review when you tell us "why" you are introducing a change

proxy_action/models/helper.py Outdated Show resolved Hide resolved
@@ -4,7 +4,11 @@ import {registry} from "@web/core/registry";

async function executeProxyAction({env, action}) {
action.action_list.map(function (act) {
env.services.notification.add(env._t("Your action is being executed"), {
let msg = "Your action is being executed";
if (act.params.args && act.params.args[2] !== undefined) {
Copy link
Member

Choose a reason for hiding this comment

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

why not use kwargs ?

Copy link
Member Author

@mourad-ehm mourad-ehm Nov 14, 2024

Choose a reason for hiding this comment

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

There is any problem to use args ?

Copy link
Member

Choose a reason for hiding this comment

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

not really human readable / friendly

btw, why the !== check ? what values do you expect if act.params.args[2] is "" or false ?

proxy_action/static/src/js/proxy_view.esm.js Outdated Show resolved Hide resolved
@bealdav
Copy link
Member

bealdav commented Nov 6, 2024

Thanks for the review @hparfr .

@mourad-ehm could you fix it ? Thanks.

@bealdav bealdav requested a review from hparfr November 14, 2024 14:24
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