IRC logs of #tryton for Monday, 2019-03-25 #tryton log beginning Mon Mar 25 00:00:01 CET 2019
-!- Buglouse(~Buglouse@ has joined #tryton01:03
-!- yangoon( has joined #tryton04:03
-!- JanGB( has joined #tryton06:03
-!- jcm(~jcm@ has joined #tryton06:03
-!- thaneor1( has joined #tryton07:03
-!- springwurm(~Springwur@ has joined #tryton08:03
-!- Timitos( has joined #tryton08:03
-!- gdrius( has joined #tryton08:03
-!- mrichez( has joined #tryton09:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:03
-!- udono( has joined #tryton10:03
-!- nicoe( has joined #tryton10:03
-!- kapil____(uid36151@gateway/web/ has joined #tryton11:03
-!- mariomop( has joined #tryton12:03
-!- shard(~shard@ has joined #tryton12:03
-!- shard(~shard@2409:8a55:d232:790:4baf:75e7:2d11:893) has joined #tryton15:03
-!- springwurm(~Springwur@ has joined #tryton15:03
-!- andrespoliti(~andrespol@ 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  # 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 "/", 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. 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/ 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
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_( 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@ 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@ has joined #tryton22:03
-!- gdrius( has joined #tryton22:03

Generated by 2.16.0 by Marius Gedminas - find it at!