IRC logs of #tryton for Wednesday, 2016-05-04 #tryton log beginning Wed May 4 00:00:02 CEST 2016
-!- perilla( has left #tryton00:07
-!- smarro_( has joined #tryton00:19
kstengerwhy could it ever happen that Transaction().context.get('sale_date', doesn't return today's date when sale_date is None ?01:30
-!- smarro_( has joined #tryton03:19
-!- smarro_( has joined #tryton03:48
-!- kstenger1( has joined #tryton04:13
-!- smarro_( has joined #tryton04:15
-!- smarro_(~sebastian@ has joined #tryton04:36
-!- frispete_( has joined #tryton07:40
-!- ccaz( has joined #tryton07:41
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton08:35
-!- dj_xatra(~dj_xatra@ has joined #tryton08:36
-!- mrichez( has joined #tryton08:40
dj_xatrafyi, the 4.0 release announcement doesn't show up in the RSS feed.08:40
-!- Timitos( has joined #tryton08:47
-!- aneolf(~chatzilla@ has joined #tryton08:58
cedkdj_xatra: it is
cedkdj_xatra: it shows also on planet python09:10
dj_xatracedk: RSS reader fail. So that's why my feeds were so quiet lately. :)  Sorry for the noise.09:33
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton10:25
-!- jvblasco( has joined #tryton10:55
-!- nicoe( has joined #tryton10:55
silwol1fyi: I submitted a short article about tryton 4.0 to pro-linux, one of the most-read german linux news sites, and it got published:
cedksilwol1: Great! We need such initiative, thanks11:12
silwol1cedk: yw11:12
-!- meigallodixital( has joined #tryton12:43
-!- mariomop(~quassel@ has joined #tryton13:07
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:11
-!- shrox(~shrox@ has joined #tryton13:15
-!- jvblasco( has joined #tryton13:35
-!- carbas( has joined #tryton14:02
-!- nicoe( has joined #tryton14:31
-!- kstenger( has joined #tryton14:40
-!- shrox(~shrox@ has joined #tryton14:54
-!- smarro_(~sebastian@ has joined #tryton15:09
-!- bvillasanti(~bvillasan@ has joined #tryton15:25
-!- bvillasanti(~bvillasan@ has joined #tryton15:36
udonosilwol1: cool! Thanks!15:36
-!- carbas( has joined #tryton15:37
-!- carbas( has joined #tryton16:01
-!- kstenger( has left #tryton16:10
-!- kstenger( has joined #tryton16:19
-!- csotelo_at_work(~csotelo@ has joined #tryton16:44
csotelo_at_workhello coder16:45
csotelo_at_workjust a dummy question. Is possible to use tryton as simple invoicing and inventory without accounting?16:45
-!- jvblasco( has joined #tryton17:05
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton17:05
-!- andrespoliti( has joined #tryton17:15
andrespolitiWhen creating a new Tryton 4.0 database, the following error occurs: 'TableHandler' object has no attribute 'cursor'. Do you know what is the problem?17:17
cedkandrespoliti: are you using a module that is not ready for 4.0?17:18
andrespolitii will check that17:21
cedkandrespoliti: cursor was removed from TableHandler so I guess you have old module17:22
csotelo_at_workjust a dummy question. Is possible to use tryton as simple invoicing and inventory without accounting?17:27
-!- Telesight( has joined #tryton17:28
pokolicsotelo_at_work: account_invoice depends on accounting, so No.18:02
pokolicsotelo_at_work: but you should install the account module and don't look at it :)18:02
-!- nicoe(~nicoe@2a02:a03f:3005:6c00:ee55:f9ff:fe7b:f7ac) has joined #tryton18:04
csotelo_at_workpokoli, and probably use a minimal chart accounting in order not do much config, right?18:05
csotelo_at_workI ask it, cause today morning a friend ask me about a invoincg and inventory with no accountg behavior18:07
csotelo_at_workthen I wasthinking how it will be18:07
csotelo_at_workbefore suggest hime the url18:07
-!- smarro_(~sebastian@ has joined #tryton18:10
csotelo_at_workdear coder.. I have a question about instance vars. I have something like self.other_field = None def on_change_with_some_field(self, name=None):....... self.other _field = 'hello folks', however when I get into spomething like def on_change_with_mmmm ( self, name = None)... print self.other_field, it is None, any suggest?19:00
cedkcsotelo_at_work: copy/paste are not readable in most irc client, use a pastebin19:01
csotelo_at_workI guess is something sonfusing, I will paste my code on a paste bin19:01
csotelo_at_workcedk, yes, I will do19:02
csotelo_at_workI just notice that19:02
csotelo_at_workdear coder19:05
csotelo_at_workthis is my code
csotelo_at_workat the botton of my paste is my question, why is None that variable19:06
csotelo_at_workI also use @fields.depends('product', 'party_coverage', 'invoicing_price')19:06
csotelo_at_workand continue printing None19:07
andrespoliticedk: i'm only using calendar_scheduling and webdav modules. Everything is v4.019:07
andrespolitibut the error still occurs19:07
cedkcsotelo_at_work: if it is not in the depends, it is not set at all19:07
cedkandrespoliti: please provide the full traceback19:08
cedkcsotelo_at_work: also party_coverage is not a fields19:08
csotelo_at_workcedk, yes, Is just a class attribute19:09
csotelo_at_workthat I am using for passing values between two eventos on_change19:10
csotelo_at_workMust I declare as field?19:10
cedkcsotelo_at_work: it can not work19:11
csotelo_at_workor, what will the right way on pass variables content between two events? I was thinking it is as a python class19:11
cedkcsotelo_at_work: You can not change classes19:11
csotelo_at_workcedk, Oh, I see19:11
csotelo_at_workI just understand19:11
cedkcsotelo_at_work: Tryton is based on threads and transactions19:11
cedkcsotelo_at_work: if you want to store something, it is in the database19:11
csotelo_at_workI was thinking as a simple class attribute19:12
andrespoliticedk: there is no traceback in the server. It's a popup window that appears while creating the database from the client19:13
csotelo_at_worka way to set the value from the python code? for exmaple on my code, I have unit_price, coudl I set from an event? something like self.unit_price = some_value?19:14
csotelo_at_workon line 53, is possible on do that19:15
csotelo_at_workbefore "return"19:15
cedkandrespoliti: run the server in verbose mode so19:16
cedkcsotelo_at_work: setting fields value in on_change method will result that such value will be sent to the client19:16
cedkcsotelo_at_work: nothing is ever stored in the database for on_change because they are readonly transaction19:17
csotelo_at_workI have tried without succes, let me try again19:17
cedkandrespoliti: or you can create the database from the server side like explained in the documentation19:19
-!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton19:20
csotelo_at_workcedk, Ihave done this ( line 50 ) with no sucess19:22
cedkcsotelo_at_work: you can not assign value in on_change_with because it is supposed to only compute the value of the field19:23
csotelo_at_workyes.... that is clear for me, then how could I set more than one fields? is tere a way? from a computed value function or something like that?19:24
cedkcsotelo_at_work: use on_change19:25
csotelo_at_worklet em try please19:26
cedkACTION bbl19:27
csotelo_at_workcedk, thanks a lot20:14
csotelo_at_workI have used it on before but forget it20:15
csotelo_at_workthanks a lot20:15
pokolicsotelo_at_work, yes, minimal account chart is enough if you don't want to use accounting20:51
pokolicsotelo_at_work, but i will recommend using a chart of accounts and accounting :)20:51
csotelo_at_worksure, I am sure of that, just was a question related a friend question about a os software for invoicing20:52
-!- JosDzG(~Thunderbi@ has joined #tryton20:52
-!- smarro_(~sebastian@ has joined #tryton20:56
andrespoliticedk: creating the database from the server gave us more info. It was a module of ours. Thanks!21:08
-!- andrespoliti( has joined #tryton21:17
andrespoliticedk: we are modifying the method add_fk so a model can use a foreign table as table_query21:19
-!- jvblasco(~seba@ has joined #tryton21:28
csotelo_at_workdear coders, cedk this is new coder, I have gotten to set my values on my model ( appear as it on the form ), however when I try to save it, an alert doesnt permit me to save, saying me that "calculated_price" couldnt be null ( the same with all required fields filled from code ), any suggest?21:30
csotelo_at_workany suggest?21:41
kstengercsotelo_at_work: are you creating a new record or modifying an old one ?21:42
csotelo_at_workthis is my code
csotelo_at_workwhen I create a new one, an alter about required files appear, however these fields have been filled21:43
csotelo_at_workon lines from 57 to 6221:44
kstengercsotelo_at_work: have you ensured the required values are not None when assigning them?21:46
csotelo_at_workkstenger, I dont understand what you mean. Let me explain what I am doing. Ia m trying to create a new service line ( working on gnuhealth ) when I choose the product, I fill more than one fields on a on_change mothod21:49
csotelo_at_workas you write, is that possible only on existing values?21:49
csotelo_at_worksince I am doing it on a row where fields are initially NOne21:50
kstengercsotelo_at_work: if you assing in an on change a value of None, it will act as if the value was empty21:50
kstengersince it is required, it must be different than None21:50
kstengercsotelo_at_work: so check (for example using a printblock) that those values are not None when this piece of code runs21:51
csotelo_at_workprobably set with a default could be ok? or what will be the right way on this?21:51
kstengercsotelo_at_work: you may be missing some default, but it may not be all, you have a lot of if statements in your code, if one fails all the values will be empty at the end of the function call21:52
csotelo_at_workkstenger, no at all, since I am using some variables that are initialized on before21:54
csotelo_at_workon lines 35  to 3921:54
kstengercsotelo_at_work: I mean line 2421:55
kstengercsotelo_at_work: since I don't know the data you work with I cannot help more than insist in your checking the values are not None when you exit the on_change21:56
csotelo_at_workI understand you21:56
csotelo_at_workalso what you mean21:56
kstengercsotelo_at_work: hope it helps :)21:57
csotelo_at_workyes... until now.. however there is something weird, I have add a default value, I have notice that, when I have created my line, product choosen, fields where filled ( after using a default value )21:59
csotelo_at_workhowever, when I save it, all values have gotten back to the default instead the values filled after choosen my product21:59
csotelo_at_workkstenger, here is before been saved22:04
csotelo_at_workhere after been saved22:04
kstengercsotelo_at_work: I think you may be missing to add the modified fields in the depends of the on_change22:04
csotelo_at_worklet me try22:05
csotelo_at_workkstenger, I have add the modified fields to the depends with out success :(22:13
kstengercsotelo_at_work: I will undo my last sentence, apparently you don't need to add those fields to the depends. But I think your signature is not right for an on_change. You are using the same as for an on_change_with22:23
kstengercsotelo_at_work: I just noticed something else, you have defined 2 on_change functions, and they may be compitting  to fill out the values of 'calculated_price' and complement_price'22:26
csotelo_at_workyes.. I am comenting it, what I dont understand what you say about signature22:28
kstengercsotelo_at_work: (unless this has changed with versions, and I'm not aware of this) usually the signature for an on_change is: on_change_xxx(self), for an on change_with: on_change_with_xxx(self, name=None)22:30
csotelo_at_workoh.. yes, I have fixed22:30
-!- JosDzG(~Thunderbi@ has joined #tryton22:31
csotelo_at_workI have noticed that, on base Model ( I am extending a model ) there is the same on_change22:38
kstengercsotelo_at_work: I thought your model was new because you define it's inheritance. of course if you are extending, you have to call the super methods22:40
csotelo_at_workprobably that is making the worng behavior22:41
kstengercsotelo_at_work: likely22:41
csotelo_at_worksuper(MyClass, self).on_change....?22:43
csotelo_at_workI start to getting confused22:44
kstengercsotelo_at_work: yes22:44
csotelo_at_workkstenger, the isue was other22:58
csotelo_at_workI have setting the fields as readonly22:58
csotelo_at_workI was *22:58
csotelo_at_workat the moment I have taken off the readonly=True, then it works22:59
kstengercsotelo_at_work: ah, I oversaw it... sure22:59
kstengerand I already realized why I thought it would work ... I may remember next time23:00
csotelo_at_workthanks a lot for your time23:01
-!- jvblasco(~seba@ has joined #tryton23:02

Generated by 2.11.0 by Marius Gedminas - find it at!