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 #tryton01:03
-!- yangoon(~mathiasb@i59F4F1B1.versanet.de) has joined #tryton04:03
-!- JanGB(~jan@ip5f5ab06b.dynamic.kabel-deutschland.de) has joined #tryton06:03
-!- jcm(~jcm@78.194.214.115) has joined #tryton06:03
-!- thaneor1(~lenovo3@r179-25-188-190.dialup.adsl.anteldata.net.uy) has joined #tryton07:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton08:03
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:03
-!- gdrius(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton08:03
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton09:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:03
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton10:03
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton10:03
-!- kapil____(uid36151@gateway/web/irccloud.com/x-atmpruqumjbbpxmy) has joined #tryton11:03
-!- mariomop(~quassel@host131.201-253-198.telecom.net.ar) has joined #tryton12:03
-!- shard(~shard@223.74.176.4) has joined #tryton12:03
-!- shard(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton15:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton15:03
-!- andrespoliti(~andrespol@200.50.173.5) has joined #tryton15:03
andrespolitigood morning15:03
andrespolitii'm trying to output an xls file to the user with a binary field, using the xlwt library15:03
andrespolitithis is what i'm doing:15:03
andrespolitioutput = io.BytesIO()15:03
andrespolitiwb.save(output)  # wb is an xlwt.Workbook() instance15:03
andrespolitioutput = fields.Binary.cast(base64.decodestring(str(output)))15:03
andrespolitibut i get an incorrect padding error here:15:03
andrespoliti File "/base64.py", line 328, in decodestring15:03
andrespoliti    return binascii.a2b_base64(s)15:03
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î:ÕÇü15:03
cedkandrespoliti: why are you decoding in base64?15:03
andrespolitibecause output is a stream object?15:03
cedkandrespoliti: it does not explain why using base64?16:03
cedkI doubt xls are base64 encoded16:03
-!- Mejda(c51f756c@gateway/web/freenode/ip.197.31.117.108) has joined #tryton16:03
andrespolitiif i do output = fields.Binary.cast(output) i just get an empty file16:03
andrespolitiand if i do output = fields.Binary.cast(str(output)) i get the string representation of the object ("StringIO instance at 0x.....")16:03
andrespolitii did this and it worked: output = fields.Binary.cast(str(output.getvalue()))16:03
andrespolitioutput is a buffer, i had to either close it and use read() or use getvalue() to read it's contents before closing it16:03
-!- wifasoi(8c69cfe5@mittelab/sudo/wifasoi) has joined #tryton17:03
pokoliandrespoliti: probably the str() is not necesarry, as output.getvalue() should return a binary steam17:03
-!- nlopez73(05e100bb@gateway/web/cgi-irc/kiwiirc.com/ip.5.225.0.187) has joined #tryton17:03
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 t17:03
wifasoihe subscription (and have a subscription field in the module)?17:03
pokoliwifasoi: have you seen the sale_subscription module?17:03
wifasoiyes17:03
wifasoisubstitute the subscription with sale_subscription17:03
wifasoistill need a way to generate/associate a member with his membership17:03
wifasoi(or at-least this is my idea)17:03
pokoliwifasoi: a subscription line can be used to represent the membership of the associate17:03
wifasoimmm you have a point17:03
wifasoibut i need to have a workflow of accepted/pending/rejected, because each member needs to be approved by the board17:03
pokoliwifasoi: there is a workflow on subscriptions17:03
pokoliwifasoi: maybe the quotation state can be used to indicate that the board must aprove it17:03
wifasoiand have a way to print the books of members (all the members accepted and rejected with the date)17:03
pokoliwifasoi: you can create a report to print the start and end date of the lines, and the subscription to indicate the state17:03
wifasoiwell i can expand the subscription module with more state if i need :)17:03
wifasoiso I wold need to create a report wizard that give me the book of members, and filter it by subscription product?17:03
wifasoisorry: for creating the book of members, the wizard needs to filter by product17:03
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 think17:03
wifasoi*and using17:03
wifasoi* i could add the member ID as a party identifier17:03
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 solution18:03
wifasoi.. but it works for now)18:03
wifasoi*but i don't feel is a real solution.. it works... for now18:03
-!- gdrius_(~gdrius@m83-176-198-173.cust.tele2.lt) has joined #tryton18:03
wifasoineed to go, if someone want to respond, I'll read the logs later. Nice talking to you. later18:03
-!- thaneor(~lenovo3@179.26.83.12) has joined #tryton19:03
pokoliwifasoi: you can use the party code as party identifier20:03
-!- shard_(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton20:03
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:03
-!- shard_(~shard@2409:8a55:d234:5dc0:20a1:9629:ddce:71c7) has joined #tryton22:03
-!- shard_(~shard@223.74.176.42) has joined #tryton22:03
-!- gdrius(~gdrius@m90-140-148-2.cust.tele2.lt) has joined #tryton22:03

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