IRC logs of #tryton for Thursday, 2016-01-14

chat.freenode.net #tryton log beginning Thu Jan 14 00:00:01 CET 2016
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:32
-!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton01:53
-!- rmu(~robert@cpe90-146-69-94.liwest.at) has joined #tryton03:53
-!- udono(~udono@ip-37-201-247-16.hsi13.unitymediagroup.de) has joined #tryton03:53
-!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton03:53
-!- sisalp(~sisalpuse@boxoo.sisalp.net) has joined #tryton03:54
-!- rmu(~robert@cpe90-146-69-94.liwest.at) has joined #tryton04:14
-!- smarro(~sebastian@201.251.135.150) has joined #tryton04:56
-!- gyKa(~gytis@78.56.151.78) has joined #tryton05:19
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton05:22
-!- yangoon1(~mathiasb@p549F1C51.dip0.t-ipconnect.de) has joined #tryton06:01
-!- kstenger1(~karla@r179-24-185-217.dialup.adsl.anteldata.net.uy) has joined #tryton07:14
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton07:21
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton07:39
-!- frispete_(~frispete@p54A9068D.dip0.t-ipconnect.de) has joined #tryton07:40
-!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton08:20
-!- gyKa(~gytis@v100.nfq.lt) has joined #tryton08:23
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton08:32
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton08:34
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:46
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:55
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton09:02
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:19
-!- csotelo(~csotelo@201.240.152.28) has joined #tryton10:13
csotelohello dear coders, please a question about views. When I have a model on the way one2many, and a fueld on the view on the way: """<field name="related_model" colspan="4"/>""", It createds a grid on the view, with a button "create new", thius button open a for view. My question is: how to do for create a new line in the grid instead opning a form view? thanks10:24
pokolicsotelo: you have to use the editable attribute of tree view http://doc.tryton.org/3.8/trytond/doc/topics/views/index.html?highlight=editable10:38
csotelopokoli, Thanks a lot10:40
pokolicsotelo: you're welcome :)10:40
-!- leio(~leio@gentoo/developer/leio) has joined #tryton10:51
-!- nicoe(~nicoe@2a02:a03f:3079:3200:ee55:f9ff:fe7b:f7ac) has joined #tryton11:17
-!- meigallodixital(~meigallod@249.135.116.91.static.reverse-mundo-r.com) has joined #tryton11:24
-!- mariomop(~quassel@186.153.87.216) has joined #tryton12:06
-!- Omk(5b40d302@gateway/web/cgi-irc/kiwiirc.com/ip.91.64.211.2) has joined #tryton12:17
OmkHey guys, I have been tuning up the dunning letter, and I have one problem: when I process the dunnings, and get multiple pages of dunning letters, the page break does not come correctly.12:19
OmkWhich character I should have in the end of the dunning letter template, so that LibreOffice would split the pages in the right places? Now the page break comes in wrong place.12:20
OmkI think this is because of the combining of the header_A4.odt with the letter.odt,12:22
cedkOmk: ODT break page before a paragraph (not after)12:22
cedkOmk: so usually, you need to put the break on the first paragraph of the letter12:23
Omkif in Libre I go to Insert / Manual Break, I have only three options: "line break" "column break" and "page break". There is no paragraph break.12:26
OmkI think using regexp in text body will not work, so I can't use $ or ^p12:27
OmkPage break seems to be the same as you get with Ctrl+Enter12:27
Omkcedk: oh the above was for you, sorry forgot to add your nick12:28
cedkOmk: I mean page break is set on the paragraph as break before this paragraph12:28
OmkOk, thanks. Will try this :)12:28
Omkcedk: thanks, it works! Problem solved :)12:32
cedkOmk: also be careful, if you put such "break" on a relatorio statement, it will be removed12:33
Omkok12:34
csoteloDear coder, do you an url which explain the way on model validation? I have found http://doc.tryton.org/3.4/trytond/doc/ref/models/models.html#trytond.model.Model.pre_validate but, I ma looking for an example or something like that13:12
cedkcsotelo: http://doc.tryton.org/3.8/trytond/doc/ref/models/models.html?highlight=validate#trytond.model.ModelStorage.validate13:15
-!- smarro(~sebastian@190.14.157.18) has joined #tryton13:18
csotelocedk, I ahve read that, but I am looking an exmaple. What I am tryton to do is no integrity validation. What I am lokking for is a datetime interval. I mean, I just create a row between 09:00 and 12:00, then , I want to validate that I am in the right interval13:21
csotelothat is why I am looking for samples for understand the way onmake validations13:22
csoteloor something like "on_create"13:23
aroncerocsotelo: in party module13:23
csotelolet me see13:24
cedkcsotelo: don't understand what you want to validate13:24
aroncerocsotelo: validate call check_code (raise a exception if eu vat is wrong)13:25
aroncerocsotelo: it is a very simple example13:25
csoteloaroncero, sorry for makeing this kind of questions, I was doing the whole night grep -r pattern looking for samples on the code i am writing, I am sometjing lazy, and that is the reason on asking intead continue looking13:26
aroncerocsotelo: http://hg.tryton.org/modules/party/file/19c6d9984f44/party.py#l21013:27
csotelocedk, the reason is that I am creating something like a cash entry egress process, then for open cash process I have created shifts, For example a shift on friday from 07:00 to 14:00, then, before save the new entry egress process, I need to validate that I am on that shift, otherwise, none must be created13:28
csoteloand the same for close the process13:28
cedkcsotelo: it is not possible to help you without knowing your database schema13:29
csotelocedk, I understand that, I am something lazy :(13:30
csotelolet me do a paste for show my db schema13:30
cedkcsotelo: indeed you should try to avoid to use validate13:31
-!- nicoe(~nicoe@2001:6f8:3aa:2:ee55:f9ff:fe7b:f7ac) has joined #tryton13:31
cedkcsotelo: you should try to implement your constraint in the declarative pattern of Tryton (domain, states etc.)13:31
csotelogive 3 minutes for paste the db please13:33
-!- meigallodixital(~meigallod@249.135.116.91.static.reverse-mundo-r.com) has joined #tryton13:41
csotelocedk, this is my db schema http://pastebin.com/gMByE56C and these are my models13:44
csotelohttp://pastebin.com/pvZ1wZVu13:44
-!- leio(~leio@gentoo/developer/leio) has joined #tryton13:45
cedkcsotelo: but I still don't understand what you want to validate13:49
csoteloI gues "validate" is no the right word. I need to do a check. As you could see on my db schema, I have pos_journal and pos_shift, a shift is relate dto a s start time and end time, on a specific day13:51
csotelotoday is thursday, then I just could create a journal today if a shift exists13:51
csotelofor example13:52
cedkcsotelo: make pos_shift required13:53
csoteloI have a shift from 07:00 am to 14:00, I just start a journal if there is a shift for thursday that I could open ( here is 07:52am, the the shift must start before this time ), and I just could close the journal if there is it 15 minutes before 14:0013:54
csotelocedk, yes! but how to check if I am inside the hour_start and hour end13:55
-!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton13:55
csotelofor example, I must not create a journal for friday if today is no friday and there is not shift available13:55
cedkcsotelo: put a domain13:56
csotelothat is thye reason on the needing on make a way of vlidation or check data before create, and before update for marked as closed13:56
cedkbut I must say all this design seems very complicate13:57
csotelocedk, you are right! ( my brain is no thinking well )13:57
csotelolet me look how to do that13:57
csotelocedk, yes.. a litle complex, customer requirement, this is a implementation for my job13:58
csotelolike a pos, but no exactly a pos13:58
csotelois ahealth center13:58
csotelowhere they manage pos shift13:58
csoteloand the y need to now money entryes and egresses, also the could generate egress without a documents, and just register for the money sald calculation13:59
csoteloas I must do calculation for find the time interval, is possible to create a domain based on funcion?14:01
pokolicsotelo: it's possible to eval a function field in a domain14:02
csotelopokoli, thanks.. Ia m loioking for it :S14:03
csotelo:'(14:03
pokolicsotelo: it's a common pattern in tryton, to declare  function field with on_change_with (so it's updated when other fields change) and use them in a Eval of a domain or a states14:04
csotelopokoli, I konw, I guess my brain is slept and I am working, Ideas no come fast :)14:05
pokolicsotelo: on invoice model it's used for currency digits14:05
csotelothanks14:05
csotelopokoli, yes, I have see, but it is something lie fields.Function. what I looking for is something like Many2One with a function for domain14:07
pokolicsotelo: yes, on the domain you can put [('field', '=', Eval('your_functional_field_here'))]14:09
csotelosorry for continue asking with trying to find the solution on myself14:09
csotelothanks14:09
pokolicsotelo: or wathever domain you need14:09
csotelopokoli, thanks14:09
-!- Omk(5b40d302@gateway/web/cgi-irc/kiwiirc.com/ip.91.64.211.2) has joined #tryton14:35
Omk_Hi, I want to include invoice number in the dunning letter as a reference, but I'm not able to get it there.14:40
Omk_This is my first time I am altering the reports. I have read the docs http://doc.tryton.org/3.8/trytond/doc/topics/reports/index.html#topics-reports and also Administration / Models / Models, but I don't understand how can I include the related invoice number there.14:40
cedkOmk_: the easy way is to show the move origin15:01
Omk_cedk: you mean account.move.line? Will try that15:08
csotelodera coders, I am trying to do something like that http://pastebin.com/ZY3Y2iX5 but I couldnt get workling ( doamin with function )  any suggest please15:42
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton15:47
csotelodear coder, a have a stupid question. How to find a single row? I gues is domain.. but, I couldnt find the way based on a where clause. I hope any suggest16:35
pokolicsotelo: you can use a domain with the search method16:56
pokolicsotelo: and if you nou the row id you can instanciate a Class with its, row. f.e: inovice = Invoice(1)16:56
csotelothanks a lot!16:56
pokolicsotelo: a where clause = a domain16:56
csoteloI see, I understand16:57
Omk_can you guys guide me how to add fields to invoice letter / dunning letter etc. To the .odt file. I remain confused how to get the data there, for instance, the invoice number. Maybe I'm just dull.16:58
Omk_pokoli: you know about this?16:59
Nico7878greetings all. I have a question that I know is recurrent but I can't manage to solve it. I have a purchase order treated, waiting for delivery, but I need to cancel this purchase order. How should I proceed please?17:02
pokoliOmk_: have to go now, sorry :(17:05
Omk_pokoli: ok17:05
Omk_Nico7878: go to the purchase order. See under actions17:06
Omk_Nico7878: what is the status of the purchase order? Quotation? Confirmed?17:08
Nico7878under action I can just translate the view17:08
Nico7878it's at treatment step, already confirmed17:09
Omk_Nico7878:   never heard about such status as "treatment". Maybe it is your own term.17:09
Omk_Yes, you are right, there is no "cancel purchase" option under actions17:10
Nico7878it might, it's a french translation, I'll check us wording and I tell you17:10
Nico7878ok, it's processing17:11
Omk_in that case I think it has not affected the stock values or anything. So how about you just try deleting the record? You can first duplicate it, so you get the amounts in a new record, and then delete the old one, using the tools menu17:12
Nico7878I can't delete the record, it says I have to cancel the order first17:13
Nico7878but indeed I think no stock moves occured until now17:14
Omk_Which tryton version?17:15
Nico78783.817:16
Omk_Ok. Sorry, I cannot help. I have no idea. But as such, this purchase does not affect stock moves etc, but it is quite stunning there is no easy way to cancel it.17:18
Nico7878I agree, definitly )17:28
Omk_Pls write about it to the mailing list. Also others would benefit of the answer.17:30
cedkNico7878: you have to cancel all documents it could have generated stock move, invoices17:37
cedkNico7878: then you could manage the exception by ignoring the recreation17:37
cedkNico7878: and the purchase will be done17:37
Nico7878I think I've managed to cancel and not recreate, thanks the exception wizard, the stock moves, but not the invoice... I'll keep investigate. But it means the purchase order will appear as done? Later on, it should be error prone when analysing the historu of orders...17:39
cedkNico7878: yes as far as a purchase was confirmed it can only end as done (even if it does nothing)17:46
Nico7878ok, finally it's done but I would say it's a bit counter intuitive. Anyway, once again, many thanks Cedk!18:03
cedkNico7878: if you have ideas to improve it…18:06
Nico7878As far as no receiption has been done, couldn't we think about a big cancel button wich perform the same tasks automatically? Or do we have chance to compromise stock valuation or mean purchase price this way?18:09
cedkNico7878: it is a special case so it will still be confusing on why sometimes user can cancel and sometimes he can not18:15
-!- Filipe85(58015584@gateway/web/freenode/ip.88.1.85.132) has joined #tryton18:34
Filipe85hi18:34
Filipe85i need help installing tryton in a windos pc from comand line. After run "pip install tryton" i get this:  error: can't copy 'msvcr90.dll': doesn't exist or not a regular file18:34
cedkFilipe85: there is already an issue filled for that18:35
Filipe85ok, sorry, i am new with tryton is it this one?:http://www.py2exe.org/index.cgi/Tutorial#Step52118:37
cedkFilipe85: no18:38
Filipe85could you indicate where do i get the correct tutorial for fixing it please?18:39
cedkFilipe85: https://bugs.tryton.org/issue401418:39
cedkFilipe85: there is no fix18:39
Filipe85in the link you sent me is where i got the first link i sent you...18:41
Filipe85cdk: the way to go around is then getting source and installing manually?18:41
-!- smarro(~sebastian@190.14.157.18) has joined #tryton19:02
-!- kstenger(~karla@r186-50-56-130.dialup.adsl.anteldata.net.uy) has joined #tryton19:17
-!- kstenger(~karla@r186-54-31-88.dialup.adsl.anteldata.net.uy) has joined #tryton22:38
-!- kstenger(~karla@r186-50-59-111.dialup.adsl.anteldata.net.uy) has joined #tryton22:48
-!- smarro(~sebastian@host121.186-111-1.telecom.net.ar) has joined #tryton22:59
-!- fsanchez(~fsanchez@190.41.123.53) has joined #tryton23:15
-!- nando_(~fsanchez@190.41.123.53) has joined #tryton23:15
-!- niki(~niki@0x3e2c8632.mobile.telia.dk) has joined #tryton23:27

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!