IRC logs of #tryton for Thursday, 2017-07-20 #tryton log beginning Thu Jul 20 00:00:01 CEST 2017
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:38
-!- kstenger1( has joined #tryton01:46
-!- notizblock( has joined #tryton03:46
-!- thaneor( has joined #tryton07:28
-!- Timitos( has joined #tryton07:37
-!- rpit( has joined #tryton07:53
-!- thaneor(~ldlc6@ has joined #tryton08:07
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:47
-!- csotelo(~csotelo@2001:1388:49c7:c2bb:dbf:dc5c:b51a:b8d7) has joined #tryton10:31
-!- nicoe( has joined #tryton10:44
csotelogood morning dear coders12:08
csoteloI have an issue relateed to an invoice method rewritten. I have rewritten on It works well when i create an invoie, however, when an invoice is created from other module like http://hg.savannah.gnu.org12:11
csotelo/hgweb/health/file/c1c0a7204143/tryton/health_services/wizard/, my rewritten method is no called. Any suggest??12:11
cedkcsotelo: always call super()12:12
csotelocedk, I do
csoteloI have try to run the wizard from health, but the originl on_change_party is called instead my custom on_change_party12:15
csotelothat is my question, how to make my custom method been called instead the origin method12:16
pokolicsotelo: does the origin on_change_party call super?12:17
csotelowizrad calling on_change_party is
csotelopokoli, yes []12:18
pokolicsotelo: i mean the gnuhealth module12:18
csotelopokoli, when I create an invoice from the invoice form, then this method is called12:19
pokolicsotelo: on_change methods are not called on server side code, unless explicity written12:19
pokolicsotelo: an I do not see any on_change_party on the gnuhealth code12:19
cedkcsotelo: not in the first link you gave, on_change_type does not call super12:19
csotelopokoli, on no place on wizard is called, it is just activated  on the invoice create12:20
pokoliACTION does not understand12:20
csotelocedk, I will take off that method12:22
csoteloI just copy it from other incvoice localization, however on_change_type doesnt affect, I guess12:22
csotelosince I dont have document_type any more12:23
csoteloOh I noticed.. srry I was wrong. I was completely wrong12:23
csotelocedk, you are right, but it is on sequences12:24
csotelowhen the invoice have been created12:24
csoteloI am on on_change_party12:24
csotelopokoli, sorry, on is the gnu health wizard used to create invoices from health services12:25
csotelothis wizard writes invoices on
csoteloand onchange_party is called, but the original no my custom12:26
csoteloany suggest?12:32
cedkcsotelo: I do not see any on_change call in this wizard12:34
cedkcsotelo: indeed if you need to customize this method, I must say that it is not properly written to ease the task12:35
cedkcsotelo: it should be split, with a method to get the main Invoice instance, a method to fill the lines and a final method to store it12:35
cedkcsotelo: FYI: trytond never calls any on_change method magically, it must always be explicit12:36
csotelocedk, after talking here, I just noticed that you say about magically calls, since I have noticed that the on_change_party behavior habe been executed on lines, then I was really guessing that on_change_party have been called12:37
csotelothen my question now, is could I call a method when I write data on this way:
csotelosomething like Invoice.create(invoices).on_change_party() or something like that???12:39
cedkcsotelo: as I said this method is not using the best Tryton practice12:39
cedkcsotelo: to be able to call on_change method you need the instances12:40
cedkbut this wizard use a dictionary of values12:40
csoteloI understand12:40
csoteloand I agree12:40
cedkcsotelo: I guess the best is to propose a rewrite of it to GNUHealth12:41
cedkit should be a very common need to customize the invoice creation12:41
csoteloyes, and as you wrote, using instances in stead of dictionary could be great in order on make it easier to customize12:42
csotelocedk, just for asking about the bests practices... could be the wrizard on health written using dictiaries instead of instances for a perfonce criteria???13:01
cedkcsotelo: no, I guess it is for historical reason13:04
cedkcsotelo: ActiveRecord exists since 2.6 (5 years ago)13:05
csotelocedk, nice to know, I will propose it on health13:06
csotelothanks a lot13:07
-!- mariomop(~quassel@ has joined #tryton13:14
-!- smarro(~sebastian@ has joined #tryton13:34
-!- kobain(~kobain@ has joined #tryton14:34
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton14:34
-!- kstenger( has joined #tryton15:03
-!- csotelo_at_work(~csotelo@ has joined #tryton15:17
-!- JosDzG(~Thunderbi@ has joined #tryton16:54
-!- Telesight( has joined #tryton17:13
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton17:23
-!- andrespoliti( has joined #tryton17:41
andrespolitihi! I have a wizard that is called from an action of a model. Is there a way of obtaining the selected records from inside the wizard17:42
-!- JosDzG(~Thunderbi@ has joined #tryton17:45
-!- smarro( has joined #tryton18:27
-!- smarro(~sebastian@ has joined #tryton20:10
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- JosDzG(~Thunderbi@ has joined #tryton22:11
-!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton22:28
-!- Telesight( has joined #tryton23:07
-!- JosDzG(~Thunderbi@ has joined #tryton23:33
-!- kstenger( has joined #tryton23:38
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton23:48

Generated by 2.11.0 by Marius Gedminas - find it at!