irc.libera.chat #tryton log beginning Tue Oct 19 12:00:01 AM CEST 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:36 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 23:36 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:48 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 23:48 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 05:01 | |
-!- timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | 05:45 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 06:27 | |
-!- timitos(~kpreisler@134.3.92.37) has joined #tryton | 06:46 | |
-!- rpit(~rpit@p200300c88f168d000ae81a7497341a2e.dip0.t-ipconnect.de) has joined #tryton | 07:05 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 07:07 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 07:26 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 07:26 | |
mrichez | hi, 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/report.py", line 194, in execute | 11:11 |
---|---|---|
mrichez | groups[0], headers[0], data, action_report) | 11:11 |
mrichez | IndexError: list index out of range | 11:11 |
mrichez | Fault: list index out of range | 11:11 |
cedk | mrichez: I think it was fixed in last versions | 11:18 |
pokoli | mrichez: on ir.action.report 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 model | 11:21 |
pokoli | mrichez: and this is the related issue of your traceback: https://bugs.tryton.org/issue10409 | 11:23 |
pokoli | the fix is already available on last bug fix release of trytond, probably you are missing some bug fix upgrade | 11:24 |
mrichez | thanks, i'll apply patch :-) | 11:39 |
mrichez | ok, no more error with latest version of tryton :-) Next problem, my data doesn't display in my template | 12:05 |
pokoli | mrichez: how do you access the data? | 12:52 |
mrichez | i define a new report to send data through an xml file(jinja template) to my printer : https://pastebin.com/dyaN4Wj3 | 12:54 |
mrichez | my report is working with another model | 12:54 |
-!- sharkcz(~sharkcz@19.161.broadband4.iol.cz) has joined #tryton | 13:47 | |
mrichez | pokoli: 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 #tryton | 14:05 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 14:05 | |
mrichez | pokoli: now i get this error after executing my report : File "/home/mrichez/Workspace/tryton/tryton6/tryton/tryton/common/common.py", line 1138, in process | 14:14 |
mrichez | self.callback(return_) | 14:14 |
mrichez | File "/home/mrichez/Workspace/tryton/tryton6/tryton/tryton/action/main.py", line 31, in callback | 14:14 |
mrichez | type, data, print_p, name = result | 14:14 |
mrichez | TypeError: cannot unpack non-iterable NoneType object | 14:14 |
pokoli | mrichez: what does your report return? | 14:16 |
pokoli | it seems that the action is not returning the valid values | 14:17 |
mrichez | pokoli: return None | 14:17 |
mrichez | pokoli: i was doing this _, content, _, _ = super().execute(ids, data) so i'm suppose i've to get all the values to return them | 14:20 |
mrichez | pokoli: see line 62 in my previous pastebin | 14:21 |
mrichez | pokoli: it's working when returning variables after execute | 14:32 |
pokoli | mrichez: ohh, i had been working on zebra reports last week | 14:32 |
mrichez | sorry for the noise | 14:33 |
pokoli | mrichez: if you want to direct print the reports on the printer, you do not need to return a StateAction but just finish the wizard | 14:33 |
pokoli | mrichez: the wizard should execute the report, get the contents and send it to the printer | 14:33 |
pokoli | mrichez: but the user does not need to get the report printed in their screen | 14:34 |
mrichez | pokoli: indeed | 14:34 |
mrichez | it's working if i select "direct_print" | 14:34 |
mrichez | pokoli: how should i execute the report in the wizard without StateAction ? | 14:35 |
pokoli | mrichez: ohh yes, you can use direct print to send reports directly | 14:40 |
pokoli | mrichez: on a LAN the server can print directly to the printer using CUPS | 14:41 |
pokoli | then you do not need the report to be send to the client | 14:41 |
mrichez | pokoli: 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 directly | 14:42 |
pokoli | mrichez: ohh, did not know that was possible. I just was desingin the zebra template directly from tryton | 14:43 |
pokoli | There is a library on Pypi which helps on that | 14:43 |
mrichez | pokoli: we use Zebra Designer for Developer : https://www.zebra.com/zdxml (it create a ZPL file on the printer) then you just need to send your variables through an xml file | 14:44 |
pokoli | mrichez: only available on windows? | 14:49 |
mrichez | pokoli: unfortunately yes | 14:50 |
mrichez | pokoli: but it helps a lot to design labels | 14:50 |
mrichez | pokoli: i've to go. Don't hesitate to contact me for more details :-) | 14:52 |
pokoli | mrichez: thanks, you already helped by discovering such software | 14:52 |
-!- rpit(~rpit@p200300c88f168d000ae81a7497341a2e.dip0.t-ipconnect.de) has joined #tryton | 16:46 | |
-!- rpit(~rpit@p200300c88f168d000ae81a7497341a2e.dip0.t-ipconnect.de) has joined #tryton | 16:55 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 18:05 | |
-!- udono(~udono@tmo-108-17.customers.d1-online.com) has joined #tryton | 18:38 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!