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

chat.freenode.net #tryton log beginning Thu Oct 5 00:00:01 CEST 2017
2017-10-05 00:36 -!- csotelo(~csotelo@2001:1388:49c7:d29b:367b:6d22:a62e:d2d4) has joined #tryton
2017-10-05 00:39 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 01:02 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 01:04 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 01:31 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 01:34 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 01:57 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-10-05 02:08 -!- cdchapman(~perturbed@73.98.169.231) has joined #tryton
2017-10-05 02:21 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 02:46 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 03:12 -!- csotelo(~csotelo@201.240.59.90) has joined #tryton
2017-10-05 03:24 -!- smarro(~sebastian@168.90.86.167) has joined #tryton
2017-10-05 03:38 -!- cdchapman(~perturbed@73.98.169.240) has joined #tryton
2017-10-05 04:56 -!- semarie(~semarie@unaffiliated/semarie) has joined #tryton
2017-10-05 05:02 -!- cdchapman(~perturbed@73.98.169.174) has joined #tryton
2017-10-05 06:18 -!- JanGB(~jan@dslb-088-073-251-218.088.073.pools.vodafone-ip.de) has joined #tryton
2017-10-05 06:37 -!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton
2017-10-05 07:33 -!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton
2017-10-05 07:39 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-10-05 08:13 -!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton
2017-10-05 08:32 -!- cdchapman(~perturbed@73.98.169.241) has joined #tryton
2017-10-05 09:01 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-10-05 09:12 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2017-10-05 09:56 -!- thaneor1(~ldlc6@r186-48-40-92.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-10-05 09:59 -!- rpit(~rpit@2a02:908:e671:9f80:56ee:75ff:fe0d:d3c7) has joined #tryton
2017-10-05 10:04 -!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton
2017-10-05 11:04 -!- csotelo(~csotelo@2001:1388:49c7:d29b:367b:6d22:a62e:d2d4) has joined #tryton
2017-10-05 11:13 -!- Timitos(~kpreisler@tmo-081-173.customers.d1-online.com) has joined #tryton
2017-10-05 12:05 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2017-10-05 12:32 -!- smarro(~sebastian@168.90.86.167) has joined #tryton
2017-10-05 12:38 -!- mariomop(~quassel@181.110.57.249) has joined #tryton
2017-10-05 12:56 <csotelo> hello dear coders, is there a way to restore / reset a user password from command line?
2017-10-05 12:57 <pokoli> csotelo: you can resotre admin user password with trytond-admin
2017-10-05 12:57 <pokoli> csotelo: once you have the admin password, you can change all other user passwords with the user interface
2017-10-05 12:58 <csotelo> pokoli, thanks
2017-10-05 12:58 <csotelo> pokoli, it also work on tryton 3.8?
2017-10-05 13:04 <pokoli> csotelo: it was introduced on 4.2
2017-10-05 13:04 <csotelo> I understan why I could find it
2017-10-05 13:05 <csotelo> I just planning migration frmo 3.8 on this weekend
2017-10-05 13:05 <csotelo> any suggest on 3.8?
2017-10-05 13:07 <pokoli> csotelo: if you have the hash of a known password, you can directly update the value on the database
2017-10-05 13:08 <csotelo> good point.... :)
2017-10-05 13:40 -!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton
2017-10-05 13:51 <pokoli> is there any reason why account_dunning_letter report does not define a keyword for the report?
2017-10-05 13:57 <pokoli> solved, the letter is printed when processing the dunning level :)
2017-10-05 14:23 -!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton
2017-10-05 14:24 <andrespoliti> hello! 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?
2017-10-05 14:27 <pokoli> andrespoliti: which is the usage. It's a modelsingleton?
2017-10-05 14:27 <andrespoliti> no, it's (ModelSQL, ModeView)
2017-10-05 14:27 <pokoli> andrespoliti: and do you have only one reoocord?
2017-10-05 14:27 <andrespoliti> no, many
2017-10-05 14:28 <andrespoliti> it has a tablequery
2017-10-05 14:29 <pokoli> andrespoliti: can I see the code?
2017-10-05 14:30 <andrespoliti> yes, i'll paste it in pastebin
2017-10-05 14:30 <pokoli> andrespoliti: the save dialog may be due to a field that return an invalid value
2017-10-05 14:30 <andrespoliti> https://pastebin.com/W76uwQHv
2017-10-05 14:40 -!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton
2017-10-05 14:53 <pokoli> andrespoliti: you should probably make the table query return the allocation joined with the secretary
2017-10-05 14:54 <pokoli> andrespoliti: and use this as One2Many from secreaary or budget product
2017-10-05 14:54 <pokoli> andrespoliti: also if you want to have the sql table of a tryton module you can use the __table__() method
2017-10-05 14:55 <andrespoliti> what's the difference between __table__() and table_query() ?
2017-10-05 14:55 <pokoli> andrespoliti: __table__() returns the sql table of a tryton model, to be used in a sql query
2017-10-05 14:56 <pokoli> andrespoliti: table_query is the tryton equivalent of an sql view
2017-10-05 14:56 <pokoli> andrespoliti: see http://doc.tryton.org/4.4/trytond/doc/ref/models/models.html?highlight=table_query#trytond.model.ModelSQL.table_query
2017-10-05 14:56 <andrespoliti> ooh, you mean as opposed to hardcoding 'product_category' in the table_query?
2017-10-05 14:57 <pokoli> andrespoliti: exactle
2017-10-05 14:57 <andrespoliti> okey
2017-10-05 14:57 <pokoli> andrespoliti: you can do: Pool().get('product.category').__table__()
2017-10-05 14:57 <andrespoliti> awesome
2017-10-05 14:58 <andrespoliti> and about the save comfirmation? how can i disable it?
2017-10-05 14:59 <pokoli> andrespoliti: You can disable write, delete and create access for the model if it's only used as a resume
2017-10-05 15:03 <andrespoliti> i disabled write, delete and create with a "ir.model.access" entry
2017-10-05 15:03 <andrespoliti> but the confirm save still pops up
2017-10-05 15:04 <andrespoliti> it's trytond 4.0.5
2017-10-05 15:04 <andrespoliti> it only pops up when i view a record that actually has data in the one2many field
2017-10-05 15:05 <andrespoliti> the ones without any element in amounts don't trigger it
2017-10-05 15:05 <pokoli> andrespoliti: mmmm. have you tried using None as relation field on One2Many
2017-10-05 15:07 <andrespoliti> yes, still pops up
2017-10-05 15:07 <cedk> andrespoliti: it is because you use a list of dict as value for One2Many, this tells the client to create them
2017-10-05 15:08 -!- cdchapman(~perturbed@73.98.169.123) has joined #tryton
2017-10-05 15:08 <cedk> andrespoliti: I think your 'budget.amount_secretary' should a real Model where you put the computation
2017-10-05 15:08 <andrespoliti> it is a real model
2017-10-05 15:09 <cedk> andrespoliti: then return ids instead of list of dict in get_amounts
2017-10-05 15:10 <andrespoliti> but nothing gets persisted
2017-10-05 15:10 <andrespoliti> it's a model but it never has data stored, i just use it to define the fields
2017-10-05 15:11 <andrespoliti> https://pastebin.com/iAfLee9R
2017-10-05 15:11 <cedk> andrespoliti: use a tabe_query to have data
2017-10-05 15:13 <andrespoliti> does it mean i have to use sql insted of python code to calculate the amounts?
2017-10-05 15:13 <cedk> andrespoliti: you can use Function field and do it in python but odds that it will be slower
2017-10-05 15:15 <andrespoliti> i'm using function now. It's not too slow for the amount of records it has: https://pastebin.com/W76uwQHv
2017-10-05 15:19 -!- akoka(~Adium@ABayonne-157-1-5-111.w90-11.abo.wanadoo.fr) has joined #tryton
2017-10-05 15:19 -!- akoka(~Adium@ABayonne-157-1-5-111.w90-11.abo.wanadoo.fr) has left #tryton
2017-10-05 15:24 <pokoli> andrespoliti: is the budget amount persisted on database?
2017-10-05 15:24 <pokoli> andrespoliti: if you it's a mather of joinin tables
2017-10-05 15:24 <andrespoliti> no, budget.amount_secretary is not persisted
2017-10-05 15:25 <pokoli> andrespoliti: I mean product.amount
2017-10-05 15:25 <pokoli> andrespoliti: basically you python code is doing a sum, group_by on the database
2017-10-05 15:25 <pokoli> andrespoliti: so it will be faster to make the database perform the query
2017-10-05 15:33 <andrespoliti> okey, i will try to do it with the table_query
2017-10-05 15:33 <andrespoliti> thanks!!!
2017-10-05 15:51 -!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton
2017-10-05 16:33 -!- cdchapman(~perturbed@73.98.169.192) has joined #tryton
2017-10-05 16:46 <pokoli> cedk: thanks http://hg.tryton.org/tryton-tips/rev/e83bcaef7429 :)
2017-10-05 16:46 <pokoli> i'm waiting to retwt it :)
2017-10-05 19:09 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 19:26 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-10-05 19:30 -!- smarro(~sebastian@181.47.250.88) has joined #tryton
2017-10-05 19:38 -!- smarro(~sebastian@host226.181-9-122.telecom.net.ar) has joined #tryton
2017-10-05 20:54 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-10-05 21:03 -!- mariomop(~quassel@181.110.57.249) has joined #tryton
2017-10-05 21:29 -!- JosDzG(~Thunderbi@189.250.142.119) has joined #tryton
2017-10-05 21:59 -!- thaneor(~ldlc6@r186-48-22-36.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-10-05 22:01 -!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton
2017-10-05 22:58 -!- smarro(~sebastian@168.90.86.167) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!