IRC logs of #tryton for Monday, 2023-06-26

irc.libera.chat #tryton log beginning Mon Jun 26 12:10:01 AM CEST 2023
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:15
-!- ChanServ changed mode/#tryton -> +o cedk 22:15
-!- springwurm(~springwur@2a01:76c0:100:f500:9a04:af34:c2db:b2ed) has joined #tryton05:40
-!- tbruyere(~Thunderbi@mail.saluc.com) has joined #tryton05:54
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:09
-!- ChanServ changed mode/#tryton -> +o cedk 06:09
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton06:25
-!- pokoli(~pokoli@user/pokoli) has joined #tryton06:58
-!- ChanServ changed mode/#tryton -> +v pokoli 06:58
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton07:13
-!- rpit(~rpit@p200300c88f3f5b00202e27664fee210b.dip0.t-ipconnect.de) has joined #tryton07:29
mrichezHi, to prevent a user to log on tryton, i just set him as inactive. When i try to test to log with this user, i get an error message with a traceback: Fault: UserError. 2 Questions: is it the correct way to block access to a user? if yes, could it be another message than an error message to warn user doesn't exist or is disabled ?08:06
cedkyes08:07
mrichezcedk: yes for both questions ? i create an issue to display another message instead of user error ?08:30
cedkyes08:40
mrichezok08:49
mrichezwhen a user print a report on gtk windows, a window open asking "Save to..." and printing is ok. Any idea how to remove this window ?09:39
cedkmrichez: probably because Windows does not know how to print it09:43
cedkmrichez: check file_open in common.py09:43
mrichezcedk: it's direct printing of an xml file to a zebra printer09:45
-!- springwurm(~springwur@2a01:76c0:100:f500:c2c0:751:a818:994) has joined #tryton12:05
mrichezback with my printing problem, here's the code i'm using (https://github.com/mrichez-saluc/trytond_zebra_print/blob/main/zebra.py) following this discuss : https://discuss.tryton.org/t/product-label-sticker/5768/3?u=maxx12:27
mrichezIt seems now, after sending my xml file to the printer (this is working) tryton try to print my xml file. How to prevent printing ?12:28
mrichezexecute method should return a result otherwise an error is raised12:29
pokolimrichez: AFAIK there is no option to return and empty report12:41
pokoliyou should probably use a wizrd to send the report to the printer 12:42
mrichezpokoli: strange because it was working before... 12:50
pokolimrichez: before what?12:50
mrichezpokoli: we just migrate from 5.6 to 6.6... so i'm checking the log about the changes12:52
pokolimrichez: on 6.0 direct print was enabled on linux12:52
mrichezpokoli: hum, it could be that, but our clients are using gtk on windows12:55
pokolimrichez: I will start looking by the directly printing changeset as it may change windows behaviour also12:55
pokoliAFAIK direct print is not supported on windows, so it makes sense to always open the report 12:56
mrichezpokoli: so printing was just templating an xml file with jinja and sending by socket to printer... and nothing was done in the client (no opening report  or trying to print the data), so for me the behavior has changed12:57
pokolimrichez: yes, the behaviour changed due to implementing direct printing12:57
mrichezpokoli: i'll check the changes... it would be nice to tell there's nothing to print :-)12:58
pokolimrichez: but in your case you do not want any message to the user. Just to print it on zebra13:01
mrichezpokoli: that's what i do :-) To print on zebra,i'm directly sending an xml file to the zebra printer... but after that it seems that tryton try to print my xml file on the default printer (this behavior was different before (5.6), tryton does nothing)13:04
cedkmrichez: it is strange what you describe, if you launch a report, the client should always display or print it13:28
cedkby the way I think it is always better to print on printer from client instead of server13:29
cedkand by the way on windows we always supported direct print by starting the file for printing13:30
cedkmrichez: now if you still want to do that on server side, you should use a wizard and use print keyword13:31
mrichezcedk: ok.... i'll do this way then ... don't know why before (5.6) i could use the print report button to send my xml file and the client did nothing after the execute13:34
mrichezthanks pokoli and cedk13:34
cedkmrichez: have you register a specific program on windows to open/print such XML files?13:42
cedkmaybe you have oe that just do nothing13:43
mrichezprobably notepad13:43
mrichezcedk: will try, thanks for the tip13:43
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:39
-!- ChanServ changed mode/#tryton -> +o cedk 20:39
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton21:44
-!- ChanServ changed mode/#tryton -> +o cedk 21:44

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!