Action / command codes

I propose having the functionality of executing actions / commands from
its code, through an input area in the Tryton client.

Action codes are extremely useful in large systems. Just typing it it
will execute such command / action. No need to navigate.

For those who have worked in systems such SAP, it would remind you of
the “transaction code”

At the GTK client, we will have an input box, which would allow us to enter the command code. Upon entering the code, it will execute the command or associated action.

The codes will have specifc nomenclature that we can agree on, but that will make them easier to remember. Some examples from the GNU Health world could be

PART -> Parties
HPAT -> action to list all patients
HPATEV -> action to evaluations
HLAB -> Lab tests
HDU -> action to Domiciliary Units
HRDEM -> Demographics report (Health Reporting DEMographics)
FINV -> Invoices

We can have more features, depending on the suffix, such as executing the task in a new tab, or spawning a new window. For instance

+HPATEV -> execute the patient evaluation action in a new tab
*HPATEV -> spawn a new window with the action
&DBBACK -> execute a local backup of the server in background

The action names won’t be translatable, and we can agree to a maximum size ( no more than 10 chars)

We should have the input box field on the top segment of the , and always visible.

Hope you like it and that we can implement it.

Are you thinking in predefined commands in xml ?

<command name="LSP" id="command_party_list"
            action="act_party_tree"/>

or

configurable actions commands from tryton client? where you can define the command and the associate ir.action

Administration->Commands
New
command: HPAT action view_party_tree

But we already have that with the “Global Search” available via the default CTRL-K short-cut.
I don’t see the point to request the users to remember arbitrary codes which will even not be learnable via the usage of the interface and very hard to guess.
Side note: I just get feedback from my brother who is learning SAP for his new job and the “transaction code” is the most annoying and astonishing thing for him.

We can have both. When creating a new module, we can create the command code along with the action in the xml file.
But we should also have the possibility of creating them from the current database using the client.

Those created at xml should be read-only.

And also the “Favorites” for very frequent entries.

I agree with @ced that we already have the global search. I personally don’t see what commands would add to current possibilities.

If it’s a matter of having shorter codes, it is trivial to have those “short names” by simply adding a field to menu entries, for example. And of course making search_rec_name search on that field to.

2 Likes

I know SAP (BC) well. My proposal comes from years of experience and from seeing everyone using and taking advantage of the tx code.
BTW, it has little to do with navigating or searching menu entries. In fact command codes not necessarily need to have a corresponding menu entry.

I believe command codes will be a great feature for Tryton, that’s why I wanted to share here.

I suspect it is because they don’t have the choice or because after many years they finally remember them by mistake. Such code is so 80s when storing character was so expensive.

I don’t see how you can say it is better to have magical commands for actions than having those commands available in the menu.

Tryton is equivalently usable with mouse and with keyboard. We must keep this equivalence because mouse ease the learning curve for new comers without preventing them to learn all the features and keyboard boost the productivity of experimented users.

I already stated proposal and arguments. No further comments on my side.

1 Like

This will make the learning of the command even more complicated because I guess code will come from English abbreviation which will be for many cases non-logical for non-English users.
For example, in French “Parties” is translated into “Tiers” so a command code “PART” has nothing in common.
On this other side, the “Global Search” which is based on menu entries is using the translated names.

After 20+ years experience with SAP, I share Louis’ view on short codes: The more experiences you get, the more you use short codes (OK-code in SAP world).
Tree views, personalized views and Favorites are nice, but OK codes are unmatched to quickly navigate around.
–> those of you using VI/VIM probably know what I mean.

1 Like

I don’t see your point. What such “OK code” provides that “Global Search” don’t?

No, I don’t. I can navigate with the keyboard in Tryton just like I do in vi (but with GTK bindings).

Dear Cedric

The more you talk about this, the more you sink in your own mud. Please open your mind listen.

You do not translate commands or codes. That is an aberration. Would you translate “chmod” or “ls” ? The wonder of codes is that they provide universality. “ls” is the same in Spain, France and Kenya.

I also explained that there is not a 1 to 1 relationship between command codes and menu entries.

Command codes exist in many systems, and IMHO, they are wonderful. I used the example of SAP to put in the ERP context. Let’s take the example of the powerful editor “vi” commands[1] Do you use the mouse ? Do you translate the translation codes ? Argentina coders would invoke vi “:shell” as “:concha” .

You want to discuss about command codes ? Let’s do it, but with solid arguments, and most importantly, in a positive, respectful and friendly manner. The argument “I called my brother who is learning SAP for his new job and transaction code is the most annoying and astonishing thing for him” is not serious, and borderline with lack of respect.

Let me conclude with the most important part of this post, which is key for sustainability on a Free Software project : The message was a proposal. It might result in a feature, or it might not. We (the community members) will agree on some ideas and we disagree on other aspects, but we will all learn from a respectful, constructive, friendly discussion. That by itself makes the community stronger and more active.

Reading non-constructive messages (and having to respond to them) is a waste of time and an energy-draining process, that I am not willing to be part. Something tells me that I’m not the only one who feels this way.

PS: One aspect that makes me particularly proud of the GNU Health project is the friendliness and respectful environment, and I will make sure it remains that way.

As for this discussion, at least on my side, /NEX or :q! (whichever you like most :wink: )

Have a wonderful weekend !

1.- https://www.fprintf.net/vimCheatSheet.html

Not very kind for someone who asks respectful discussion.

Why not? Some others have done it for programming language: https://en.wikipedia.org/wiki/Non-English-based_programming_languages
If it is something that must be teach to end users (sellers, accountants etc.), I will be more comfortable with translation if it must be shown in the client.

I have seen any explanation. I re-read the all thread and I can only find authoritative arguments (like from my X years of experience) but please give us links to those explanation.
For me, there is a clear 1 to 1 relationship because menu entries are the actions user can perform and “command code”, as they are described, are just actions. Of course, you could create more of one kind to proof it is not a 1 to 1 relation but there is no reason to prevent graphical users to not have access to all actions.

I don’t see where I lack of respect with this sentence. I’m just reporting a recent experience from a new user which is facing this precise command code interface.
(By the way, if you want to quote me, please use the quote feature to get link otherwise you will wrongly rewrite the original as it is now)

The power of vi is not in the actions that are codified but in the possibilities to combine them. Just like the power of UNIX is not in chmod or ls (Windows had those commands since long time) but in the possibility pipe them (that Windows only recently partially acquired).
Until now, I have seen only a proposal for short-cuts to menu entries which is already implemented via the “Global Search” and the “Favourites”. And for me, they are way much better because they allow the newcomers to discover them on the while, in contrary command codes are arbitrary and must be learn from somewhere outside the program.
But if you want to have the power of tools like vi or UNIX, what you are looking for is a CLI. For me, we already have one with the combination of proteus and ipython. Of course, it is not perfect and proteus could probably be improved but the recent scenario tests show that it is quite concise thanks to recent improvements like the .click, dualmethod, the Report and the support of StateAction in wizards.
I can imagine someone would like to implement a more restricted CLI using tools like cmd but I think it will not be for general purpose.

I don’t think it’s not serious, it’s an example just like you and @coogor give with your 20-year experience in SAP. Cédric is here giving the experience of newbie user to SAP, and in this case the “action code” looks strange …

Indeed, according to me this solution fulfills the feature request.

You could create an additional model that would be linked to an action (but not displayed in the menu) and activate the global search on it. You have the code, the action but not the menu entry.

It will not work because “Global Search” trigger the tree_open action only for records of the same Model as the menu Model. But indeed you could create a menu entry that is not displayed in the menu tree but appear in the “Global Search” (even if I don’t see the pertinence of such set-up).

IMHO there is an important use case: support. I mean support for end-users that even won’t find an option in a deep leveled menu tree, nor will write the name of the option correct (telephone support, language). In this case support will say: “Please type F6 and then 204”. Yes, it should be a numeric “quick dial code”. End users will love it !

1 Like

For this use case, the global search on the menus will work as well.

“Please hit Ctrl+K, then type ‘General Ledger’ and hit Enter”

This can be done on global search. Add the code on the menu (fill all the codes) and update the Menu global Search to search also for the “quick dial code”.