IRC logs of #tryton for Thursday, 2017-10-05

chat.freenode.net #tryton log beginning Thu Oct 5 00:00:01 CEST 2017
-!- csotelo(~csotelo@2001:1388:49c7:d29b:367b:6d22:a62e:d2d4) has joined #tryton00:36
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton00:39
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton01:02
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton01:04
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton01:31
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton01:34
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:57
-!- cdchapman(~perturbed@73.98.169.231) has joined #tryton02:08
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton02:21
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton02:46
-!- csotelo(~csotelo@201.240.59.90) has joined #tryton03:12
-!- smarro(~sebastian@168.90.86.167) has joined #tryton03:24
-!- cdchapman(~perturbed@73.98.169.240) has joined #tryton03:38
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton04:56
-!- cdchapman(~perturbed@73.98.169.174) has joined #tryton05:02
-!- JanGB(~jan@dslb-088-073-251-218.088.073.pools.vodafone-ip.de) has joined #tryton06:18
-!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton06:37
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:33
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton07:39
-!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton08:13
-!- cdchapman(~perturbed@73.98.169.241) has joined #tryton08:32
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:01
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton09:12
-!- thaneor1(~ldlc6@r186-48-40-92.dialup.adsl.anteldata.net.uy) has joined #tryton09:56
-!- rpit(~rpit@2a02:908:e671:9f80:56ee:75ff:fe0d:d3c7) has joined #tryton09:59
-!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton10:04
-!- csotelo(~csotelo@2001:1388:49c7:d29b:367b:6d22:a62e:d2d4) has joined #tryton11:04
-!- Timitos(~kpreisler@tmo-081-173.customers.d1-online.com) has joined #tryton11:13
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton12:05
-!- smarro(~sebastian@168.90.86.167) has joined #tryton12:32
-!- mariomop(~quassel@181.110.57.249) has joined #tryton12:38
csotelohello dear coders, is there a way to restore / reset a user password from command line?12:56
pokolicsotelo: you can resotre admin user password with trytond-admin12:57
pokolicsotelo: once you have the admin password, you can change all other user passwords with the user interface12:57
csotelopokoli, thanks12:58
csotelopokoli, it also work on tryton 3.8?12:58
pokolicsotelo: it was introduced on 4.213:04
csoteloI understan why I could find it13:04
csoteloI just planning migration frmo 3.8 on this weekend13:05
csoteloany suggest on 3.8?13:05
pokolicsotelo: if you have the hash of a known password, you can directly update the value on the database13:07
csotelogood point.... :)13:08
-!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton13:40
pokoliis there any reason why account_dunning_letter report does not define a keyword for the report?13:51
pokolisolved, the letter is printed when processing the dunning level :)13:57
-!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton14:23
andrespolitihello! i have a model that only has function fields, just to display information calculated on the fly. How can i prevent the confirm save dialog?14:24
pokoliandrespoliti: which is the usage. It's a modelsingleton?14:27
andrespolitino, it's (ModelSQL, ModeView)14:27
pokoliandrespoliti: and do you have only one reoocord?14:27
andrespolitino, many14:27
andrespolitiit has a tablequery14:28
pokoliandrespoliti: can I see the code?14:29
andrespolitiyes, i'll paste it in pastebin14:30
pokoliandrespoliti: the save dialog may be due to a field that return an invalid value14:30
andrespolitihttps://pastebin.com/W76uwQHv14:30
-!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton14:40
pokoliandrespoliti: you should probably make the table query return the  allocation joined with the secretary14:53
pokoliandrespoliti: and use this as One2Many from secreaary or budget product14:54
pokoliandrespoliti: also if you want to have the sql table of a tryton module you can use the __table__() method14:54
andrespolitiwhat's the difference between __table__() and table_query() ?14:55
pokoliandrespoliti: __table__() returns the sql table of a tryton model, to be used in a sql query14:55
pokoliandrespoliti: table_query is the tryton equivalent of an sql view14:56
pokoliandrespoliti: see http://doc.tryton.org/4.4/trytond/doc/ref/models/models.html?highlight=table_query#trytond.model.ModelSQL.table_query14:56
andrespolitiooh, you mean as opposed to hardcoding 'product_category' in the table_query?14:56
pokoliandrespoliti: exactle14:57
andrespolitiokey14:57
pokoliandrespoliti: you can do: Pool().get('product.category').__table__()14:57
andrespolitiawesome14:57
andrespolitiand about the save comfirmation? how can i disable it?14:58
pokoliandrespoliti: You can disable write, delete and create access for the model if it's only used as a resume14:59
andrespolitii disabled write, delete and create with a "ir.model.access" entry15:03
andrespolitibut the confirm save still pops up15:03
andrespolitiit's trytond 4.0.515:04
andrespolitiit only pops up when i view a record that actually has data in the one2many field15:04
andrespolitithe ones without any element in amounts don't trigger it15:05
pokoliandrespoliti: mmmm. have you tried using None as relation field on One2Many15:05
andrespolitiyes, still pops up15:07
cedkandrespoliti: it is because you use a list of dict as value for One2Many, this tells the client to create them15:07
-!- cdchapman(~perturbed@73.98.169.123) has joined #tryton15:08
cedkandrespoliti: I think your 'budget.amount_secretary' should a real Model where you put the computation15:08
andrespolitiit is a real model15:08
cedkandrespoliti: then return ids instead of list of dict in get_amounts15:09
andrespolitibut nothing gets persisted15:10
andrespolitiit's a model but it never has data stored, i just use it to define the fields15:10
andrespolitihttps://pastebin.com/iAfLee9R15:11
cedkandrespoliti: use a tabe_query to have data15:11
andrespolitidoes it mean i have to use sql insted of python code to calculate the amounts?15:13
cedkandrespoliti: you can use Function field and do it in python but odds that it will be slower15:13
andrespolitii'm using function now. It's not too slow for the amount of records it has: https://pastebin.com/W76uwQHv15:15
-!- akoka(~Adium@ABayonne-157-1-5-111.w90-11.abo.wanadoo.fr) has joined #tryton15:19
-!- akoka(~Adium@ABayonne-157-1-5-111.w90-11.abo.wanadoo.fr) has left #tryton15:19
pokoliandrespoliti: is the budget amount persisted on database?15:24
pokoliandrespoliti: if you it's a mather of joinin tables15:24
andrespolitino, budget.amount_secretary is not persisted15:24
pokoliandrespoliti: I mean product.amount15:25
pokoliandrespoliti: basically you python code is doing a sum, group_by on the database15:25
pokoliandrespoliti: so it will be faster to make the database perform the query15:25
andrespolitiokey, i will try to do it with the table_query15:33
andrespolitithanks!!!15:33
-!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton15:51
-!- cdchapman(~perturbed@73.98.169.192) has joined #tryton16:33
pokolicedk: thanks http://hg.tryton.org/tryton-tips/rev/e83bcaef7429 :)16:46
pokolii'm waiting to retwt it :)16:46
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton19:09
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton19:26
-!- smarro(~sebastian@181.47.250.88) has joined #tryton19:30
-!- smarro(~sebastian@host226.181-9-122.telecom.net.ar) has joined #tryton19:38
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:54
-!- mariomop(~quassel@181.110.57.249) has joined #tryton21:03
-!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton21:29
-!- thaneor(~ldlc6@r186-48-22-36.dialup.adsl.anteldata.net.uy) has joined #tryton21:59
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- smarro(~sebastian@168.90.86.167) has joined #tryton22:58

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