IRC logs of #tryton for Tuesday, 2021-10-19 #tryton log beginning Tue Oct 19 12:00:01 AM CEST 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:36
-!- ChanServ changed mode/#tryton -> +o cedk 23:36
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:48
-!- ChanServ changed mode/#tryton -> +o cedk 23:48
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton05:01
-!- timitos( has joined #tryton05:45
-!- mrichez( has joined #tryton06:27
-!- timitos(~kpreisler@ has joined #tryton06:46
-!- rpit( has joined #tryton07:05
-!- acaubet(~Thunderbi@ has joined #tryton07:07
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:26
-!- ChanServ changed mode/#tryton -> +o cedk 07:26
mrichezhi, to print a report should i always have a model linked to the report ? in a wizard i'm using a StateAction on a report and returning a dictionnary with data's, got this error when executing report:   File "/trytond/report/", line 194, in execute11:11
mrichez    groups[0], headers[0], data, action_report)11:11
mrichezIndexError: list index out of range11:11
mrichezFault: list index out of range11:11
cedkmrichez: I think it was fixed in last versions11:18
pokolimrichez: on model there is a model field which indicates to which model the report is linked. If you set that to an empty value the report won't be linked to any model11:21
pokolimrichez: and this is the related issue of your traceback:
pokolithe fix is already available on last bug fix release of trytond, probably you are missing some bug fix upgrade11:24
mrichezthanks, i'll apply patch :-)11:39
mrichezok, no more error with latest version of tryton :-) Next problem, my data doesn't display in my template12:05
pokolimrichez: how do you access the data? 12:52
mrichezi define a new report to send data through an xml file(jinja template)  to my printer :
mrichezmy report is working with another model12:54
-!- sharkcz( has joined #tryton13:47
mrichezpokoli: i found my problem, i need to name my variables "data.variable_name" in my template :-)13:57
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton14:05
-!- ChanServ changed mode/#tryton -> +o cedk 14:05
mrichezpokoli: now i get this error after executing my report :   File "/home/mrichez/Workspace/tryton/tryton6/tryton/tryton/common/", line 1138, in process14:14
mrichez    self.callback(return_)14:14
mrichez  File "/home/mrichez/Workspace/tryton/tryton6/tryton/tryton/action/", line 31, in callback14:14
mrichez    type, data, print_p, name = result14:14
mrichezTypeError: cannot unpack non-iterable NoneType object14:14
pokolimrichez: what does your report return? 14:16
pokoliit seems that the action is not returning the valid values14:17
mrichezpokoli: return None14:17
mrichezpokoli: i was doing this _, content, _, _ = super().execute(ids, data)   so i'm suppose i've to get all the values to return them14:20
mrichezpokoli: see line 62 in my previous pastebin14:21
mrichezpokoli: it's working when returning variables after execute14:32
pokolimrichez: ohh, i had been working on zebra reports last week14:32
mrichezsorry for the noise14:33
pokolimrichez: if you want to direct print the reports on the printer, you do not need to return a StateAction but just finish the wizard14:33
pokolimrichez: the wizard should execute the report, get the contents and send it to the printer 14:33
pokolimrichez: but the user does not need to get the report printed in their screen14:34
mrichezpokoli: indeed14:34
mrichezit's working if i select "direct_print"14:34
mrichezpokoli: how should i execute the report in the wizard without StateAction ?14:35
pokolimrichez: ohh yes, you can use direct print to send reports directly14:40
pokolimrichez: on a LAN the server can print directly to the printer using CUPS 14:41
pokolithen you do not need the report to be send to the client14:41
mrichezpokoli: in our case, we design templates that are stored on zebra printer, we just send an xml template with variables that are applied on the template then printed directly14:42
pokolimrichez: ohh, did not know that was possible. I just was desingin the zebra template directly from tryton 14:43
pokoliThere is a library on Pypi which helps on that14:43
mrichezpokoli: we use Zebra Designer for Developer :  (it create a ZPL file on the printer) then you just need to send your variables through an xml file14:44
pokolimrichez: only available on windows? 14:49
mrichezpokoli: unfortunately yes14:50
mrichezpokoli: but it helps a lot to design labels14:50
mrichezpokoli: i've to go. Don't hesitate to contact me for more details :-)14:52
pokolimrichez: thanks, you already helped by discovering such software14:52
-!- rpit( has joined #tryton16:46
-!- rpit( has joined #tryton16:55
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton18:05
-!- udono( has joined #tryton18:38

Generated by 2.17.3 by Marius Gedminas - find it at!