chat.freenode.net #tryton log beginning Mon Mar 25 00:00:01 CET 2019 | ||
-!- Buglouse(~Buglouse@68.183.162.157) has joined #tryton | 00:29 | |
-!- yangoon(~mathiasb@i59F4F1B1.versanet.de) has joined #tryton | 03:59 | |
-!- JanGB(~jan@ip5f5ab06b.dynamic.kabel-deutschland.de) has joined #tryton | 05:13 | |
-!- jcm(~jcm@78.194.214.115) has joined #tryton | 05:35 | |
-!- thaneor1(~lenovo3@r179-25-188-190.dialup.adsl.anteldata.net.uy) has joined #tryton | 06:51 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 07:13 | |
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | 07:17 | |
-!- gdrius(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton | 07:42 | |
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton | 08:10 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:23 | |
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton | 09:05 | |
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton | 09:27 | |
-!- kapil____(uid36151@gateway/web/irccloud.com/x-atmpruqumjbbpxmy) has joined #tryton | 10:08 | |
-!- mariomop(~quassel@host131.201-253-198.telecom.net.ar) has joined #tryton | 11:12 | |
-!- shard(~shard@223.74.176.4) has joined #tryton | 11:18 | |
-!- shard(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton | 14:00 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 14:05 | |
-!- andrespoliti(~andrespol@200.50.173.5) has joined #tryton | 14:32 | |
andrespoliti | good morning | 14:32 |
---|---|---|
andrespoliti | i'm trying to output an xls file to the user with a binary field, using the xlwt library | 14:32 |
andrespoliti | this is what i'm doing: | 14:33 |
andrespoliti | output = io.BytesIO() | 14:33 |
andrespoliti | wb.save(output) # wb is an xlwt.Workbook() instance | 14:33 |
andrespoliti | output = fields.Binary.cast(base64.decodestring(str(output))) | 14:34 |
andrespoliti | but i get an incorrect padding error here: | 14:34 |
andrespoliti | File "/base64.py", line 328, in decodestring | 14:34 |
andrespoliti | return binascii.a2b_base64(s) | 14:34 |
andrespoliti | and if instead i use output = StringIO.StringIO() i get a file but it's just one cell with weird characters: JÚâJÚâ{-jwjÝ1íÿumî:ÕÇü | 14:40 |
cedk | andrespoliti: why are you decoding in base64? | 14:44 |
andrespoliti | because output is a stream object? | 14:47 |
cedk | andrespoliti: it does not explain why using base64? | 15:03 |
cedk | I doubt xls are base64 encoded | 15:04 |
-!- Mejda(c51f756c@gateway/web/freenode/ip.197.31.117.108) has joined #tryton | 15:08 | |
andrespoliti | if i do output = fields.Binary.cast(output) i just get an empty file | 15:17 |
andrespoliti | and if i do output = fields.Binary.cast(str(output)) i get the string representation of the object ("StringIO instance at 0x.....") | 15:17 |
andrespoliti | i did this and it worked: output = fields.Binary.cast(str(output.getvalue())) | 15:32 |
andrespoliti | output is a buffer, i had to either close it and use read() or use getvalue() to read it's contents before closing it | 15:33 |
-!- wifasoi(8c69cfe5@mittelab/sudo/wifasoi) has joined #tryton | 16:04 | |
pokoli | andrespoliti: probably the str() is not necesarry, as output.getvalue() should return a binary steam | 16:15 |
-!- nlopez73(05e100bb@gateway/web/cgi-irc/kiwiirc.com/ip.5.225.0.187) has joined #tryton | 16:22 | |
wifasoi | Hi, I'm drafting a membership module (for associations). The keeping track of join date/leave date is done (is similar to the employee module), now I need to generate a subscription on join date. My question is: have a list of subscription template, and a cron_job/wizard to generate the necessary subscription (and end it), or make the user create t | 16:32 |
wifasoi | he subscription (and have a subscription field in the module)? | 16:32 |
pokoli | wifasoi: have you seen the sale_subscription module? | 16:33 |
wifasoi | yes | 16:33 |
wifasoi | substitute the subscription with sale_subscription | 16:34 |
wifasoi | still need a way to generate/associate a member with his membership | 16:34 |
wifasoi | (or at-least this is my idea) | 16:34 |
pokoli | wifasoi: a subscription line can be used to represent the membership of the associate | 16:38 |
wifasoi | mmm you have a point | 16:39 |
wifasoi | but i need to have a workflow of accepted/pending/rejected, because each member needs to be approved by the board | 16:40 |
pokoli | wifasoi: there is a workflow on subscriptions | 16:42 |
pokoli | wifasoi: maybe the quotation state can be used to indicate that the board must aprove it | 16:42 |
wifasoi | and have a way to print the books of members (all the members accepted and rejected with the date) | 16:42 |
pokoli | wifasoi: you can create a report to print the start and end date of the lines, and the subscription to indicate the state | 16:43 |
wifasoi | well i can expand the subscription module with more state if i need :) | 16:44 |
wifasoi | so I wold need to create a report wizard that give me the book of members, and filter it by subscription product? | 16:46 |
wifasoi | sorry: for creating the book of members, the wizard needs to filter by product | 16:48 |
wifasoi | The only problem is (i think): I need a member ID (by law need to be a sequential number), I could add a party identifier, but i don't think is meant for that. And suing the subscription ID i think is a bit limiting. What do you think | 16:56 |
wifasoi | *and using | 16:57 |
wifasoi | * i could add the member ID as a party identifier | 16:58 |
wifasoi | and, last time i checked, the subscription module will not generate the first invoice if i want membership fee billed at the start of the solar year (rrule -> 1° of the year, Yearly) (but for that i created a module that add a checkbox if you want to generate the first consuption/invoice with the start date, but i feel don't feel is a real solution | 17:14 |
wifasoi | .. but it works for now) | 17:14 |
wifasoi | *but i don't feel is a real solution.. it works... for now | 17:16 |
-!- gdrius_(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton | 17:45 | |
wifasoi | need to go, if someone want to respond, I'll read the logs later. Nice talking to you. later | 17:51 |
-!- thaneor(~lenovo3@179.26.83.12) has joined #tryton | 18:54 | |
pokoli | wifasoi: you can use the party code as party identifier | 19:08 |
-!- shard_(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton | 19:43 | |
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton | 21:00 | |
-!- shard_(~shard@2409:8a55:d234:5dc0:20a1:9629:ddce:71c7) has joined #tryton | 21:10 | |
-!- shard_(~shard@223.74.176.42) has joined #tryton | 21:20 | |
-!- gdrius(~gdrius@m90-140-148-2.cust.tele2.lt) has joined #tryton | 21:42 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!