IRC logs of #tryton for Monday, 2019-03-25

chat.freenode.net #tryton log beginning Mon Mar 25 00:00:01 CET 2019
-!- Buglouse(~Buglouse@68.183.162.157) has joined #tryton00:29
-!- yangoon(~mathiasb@i59F4F1B1.versanet.de) has joined #tryton03:59
-!- JanGB(~jan@ip5f5ab06b.dynamic.kabel-deutschland.de) has joined #tryton05:13
-!- jcm(~jcm@78.194.214.115) has joined #tryton05:35
-!- thaneor1(~lenovo3@r179-25-188-190.dialup.adsl.anteldata.net.uy) has joined #tryton06:51
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton07:13
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:17
-!- gdrius(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton07:42
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:10
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:23
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton09:05
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton09:27
-!- kapil____(uid36151@gateway/web/irccloud.com/x-atmpruqumjbbpxmy) has joined #tryton10:08
-!- mariomop(~quassel@host131.201-253-198.telecom.net.ar) has joined #tryton11:12
-!- shard(~shard@223.74.176.4) has joined #tryton11:18
-!- shard(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton14:00
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton14:05
-!- andrespoliti(~andrespol@200.50.173.5) has joined #tryton14:32
andrespolitigood morning14:32
andrespolitii'm trying to output an xls file to the user with a binary field, using the xlwt library14:32
andrespolitithis is what i'm doing:14:33
andrespolitioutput = io.BytesIO()14:33
andrespolitiwb.save(output)  # wb is an xlwt.Workbook() instance14:33
andrespolitioutput = fields.Binary.cast(base64.decodestring(str(output)))14:34
andrespolitibut i get an incorrect padding error here:14:34
andrespoliti File "/base64.py", line 328, in decodestring14:34
andrespoliti    return binascii.a2b_base64(s)14:34
andrespolitiand 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
cedkandrespoliti: why are you decoding in base64?14:44
andrespolitibecause output is a stream object?14:47
cedkandrespoliti: it does not explain why using base64?15:03
cedkI doubt xls are base64 encoded15:04
-!- Mejda(c51f756c@gateway/web/freenode/ip.197.31.117.108) has joined #tryton15:08
andrespolitiif i do output = fields.Binary.cast(output) i just get an empty file15:17
andrespolitiand if i do output = fields.Binary.cast(str(output)) i get the string representation of the object ("StringIO instance at 0x.....")15:17
andrespolitii did this and it worked: output = fields.Binary.cast(str(output.getvalue()))15:32
andrespolitioutput is a buffer, i had to either close it and use read() or use getvalue() to read it's contents before closing it15:33
-!- wifasoi(8c69cfe5@mittelab/sudo/wifasoi) has joined #tryton16:04
pokoliandrespoliti: probably the str() is not necesarry, as output.getvalue() should return a binary steam16:15
-!- nlopez73(05e100bb@gateway/web/cgi-irc/kiwiirc.com/ip.5.225.0.187) has joined #tryton16:22
wifasoiHi, 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 t16:32
wifasoihe subscription (and have a subscription field in the module)?16:32
pokoliwifasoi: have you seen the sale_subscription module?16:33
wifasoiyes16:33
wifasoisubstitute the subscription with sale_subscription16:34
wifasoistill need a way to generate/associate a member with his membership16:34
wifasoi(or at-least this is my idea)16:34
pokoliwifasoi: a subscription line can be used to represent the membership of the associate16:38
wifasoimmm you have a point16:39
wifasoibut i need to have a workflow of accepted/pending/rejected, because each member needs to be approved by the board16:40
pokoliwifasoi: there is a workflow on subscriptions16:42
pokoliwifasoi: maybe the quotation state can be used to indicate that the board must aprove it16:42
wifasoiand have a way to print the books of members (all the members accepted and rejected with the date)16:42
pokoliwifasoi: you can create a report to print the start and end date of the lines, and the subscription to indicate the state16:43
wifasoiwell i can expand the subscription module with more state if i need :)16:44
wifasoiso I wold need to create a report wizard that give me the book of members, and filter it by subscription product?16:46
wifasoisorry: for creating the book of members, the wizard needs to filter by product16:48
wifasoiThe 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 think16:56
wifasoi*and using16:57
wifasoi* i could add the member ID as a party identifier16:58
wifasoiand, 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 solution17:14
wifasoi.. but it works for now)17:14
wifasoi*but i don't feel is a real solution.. it works... for now17:16
-!- gdrius_(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton17:45
wifasoineed to go, if someone want to respond, I'll read the logs later. Nice talking to you. later17:51
-!- thaneor(~lenovo3@179.26.83.12) has joined #tryton18:54
pokoliwifasoi: you can use the party code as party identifier19:08
-!- shard_(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton19:43
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton21:00
-!- shard_(~shard@2409:8a55:d234:5dc0:20a1:9629:ddce:71c7) has joined #tryton21:10
-!- shard_(~shard@223.74.176.42) has joined #tryton21:20
-!- gdrius(~gdrius@m90-140-148-2.cust.tele2.lt) has joined #tryton21:42

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