IRC logs of #tryton for Thursday, 2018-01-18

chat.freenode.net #tryton log beginning Thu Jan 18 00:00:01 CET 2018
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton00:36
-!- thaneor(~ldlc6@179.26.117.83) has joined #tryton04:11
-!- zodman(~zodman@178.62.7.89) has joined #tryton04:30
csotelohi04:58
csoteloI ma trying to set payment_terms bu default however it doesnt work, my models are https://pastebin.com/exLw9LVH, any sugges?04:59
-!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton06:40
-!- _2cadz(~2cadz@82.64.14.213) has joined #tryton07:02
-!- JanGB(~jan@ipservice-092-216-127-053.092.216.pools.vodafone-ip.de) has joined #tryton07:21
-!- zmijunkie(~Adium@200116b80af5a1009cdae495517edbc2.dip.versatel-1u1.de) has joined #tryton07:40
-!- JanGB(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton07:57
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:02
-!- csotelo(~csotelo@190.232.106.37) has joined #tryton08:29
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:54
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton08:58
-!- rpit(~rpit@dslb-084-061-017-201.084.061.pools.vodafone-ip.de) has joined #tryton09:14
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:29
-!- rpit(~rpit@ip-109-40-1-123.web.vodafone.de) has joined #tryton09:52
-!- afibanez(uid207678@gateway/web/irccloud.com/x-lvdyqdostrvlifth) has joined #tryton10:09
afibanezGood morning! From trytond 3.8 to trytond 4.0 ir.trigger condition was changed from Python to PYSON. It's not explained in the migrations at discuss. There is some migration script or something?10:47
-!- VlijmenFileer(~VlijmenFi@139.193.196.139) has joined #tryton10:47
pokoliafibanez: conditions should be re-written10:49
pokoliafibanez: indeed if you created triggers by xml you only have to update the condition and use the pyson="1" attribute10:50
afibanezpokoli: ok, thank you! Shourd we create a migration entry in discuss from 3.8 to 4.0 explaining this point?10:58
cedkafibanez: it could be an information, yes10:59
csoteloI ma trying to set payment_terms bu default however it doesnt work, my models are https://pastebin.com/exLw9LVH, any sugges11:01
csoteloI mean, I am tryton to set a efault payment term for customers and suppliers, then I have created a module to do this job, however it is no working as expected11:06
csotelocause the default value is not been charged11:07
csoteloany suggest please11:07
pokolicsotelo: which tryton version?11:11
csotelohi  pokoli, it is 4.2 version11:11
csotelorunning on python 311:11
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton11:14
pokolicsotelo: this fields are Property fields, so you should define a default value for the property11:15
csotelosorry for the question, it is coding or configuration?11:18
pokolicsotelo: configuration11:21
pokolicsotelo: you should create a record on ir.property table for this field not linked to any record11:21
pokolicsotelo: iirc correctly there is a menu option for this on the admin section11:21
pokolicsotelo: btw properties have been removed on version 4.4. See https://bugs.tryton.org/issue234911:22
csoteloten, is there a way to solve it without property table, like de usual default value as my code?11:24
csotelothen*11:26
-!- catonano(~catonano@151.50.146.255) has joined #tryton11:26
pokolicsotelo: I don't think so11:27
csoteloI see11:27
pokolicsotelo: well probablly overriding default_get you can set the values for the fields11:30
pokolicsotelo: but the easiest way is to set the default value on the property table11:31
-!- thaneor(~ldlc6@179.26.117.83) has joined #tryton11:31
csoteloI just found how to do it on ir.property table, Sorry, wa a dumb question since I didnt see how to set it11:31
csotelopokoli, thanks a lot, I will be pendent on upgrade11:34
afibanezpokoli: i can't create migration topics on discuss :(11:38
csoteloI mean , when I do the upgrade to 4.4, I know now about the poperty table discusion :)11:41
pokoliafibanez: just add a comment on the current one11:42
afibanezpokoli: there is no "Migration from 3.6 to 3.8" topic11:43
pokoliafibanez: indeed the migration was from 3.4 to 3.6: https://discuss.tryton.org/t/migration-from-3-4-to-3-6/1711:45
pokoliafibanez: and it's explained as: "Use pyson for fields that were evaluated using safe_eval"11:45
-!- catonano_(~catonano@151.50.146.255) has joined #tryton11:56
afibanezpokoli:  it's not exactly the same. The condition in ir.trigger was Python in 3.6 too (https://bitbucket.org/tryton/trytond/src/dd324f6934ff59ffd8a2a737e84a38a61712a679/trytond/ir/trigger.py?at=3.6.19&fileviewer=file-view-default)11:59
-!- JanGB(~jan@x59cc8ba1.dyn.telefonica.de) has joined #tryton12:00
afibanezpokoli: and changed to pyson in 3.8: https://bitbucket.org/tryton/trytond/src/0a29a9dba7f56fbdef067772eea3f037934999c9/trytond/ir/trigger.py?at=3.8.0&fileviewer=file-view-default12:00
-!- catonano(~catonano@151.50.146.255) has joined #tryton12:01
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton12:04
pokoliafibanez: on which changeset it was changed?12:05
-!- JanGB1(~jan@ipservice-092-216-127-053.092.216.pools.vodafone-ip.de) has joined #tryton12:07
afibanezpokoli: https://bitbucket.org/tryton/trytond/diff/trytond/ir/trigger.py?diff2=f86ece096c0c&at=default12:07
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton12:07
pokoliafibanez: ok, so this is the following changeset: http://hg.tryton.org/trytond/rev/f86ece096c0c12:10
pokoliI will create the migration topic12:10
cedkafibanez: this did not change the type, it was already a PYSON statement12:10
afibanezpokoli: thank you! ;)12:10
cedkpokoli: no, the migration was in 3.612:11
pokolicedk: ok, that I thought as tests where modified before 3.6 release12:11
pokoliafibanez: so you have a 3.6 database with triggers working without pyson?12:12
cedkpokoli: the changeset f86ece096c0c just avoid to use compile to validate a json12:12
afibanezcedk: before this changeset, you could write pure python in ir.trigger.condition. Something like "self.id = 5 and self.type in (1, 2)"12:15
cedkafibanez: it will be validated but not working12:16
afibanezcedk: I have this working on 3.4 installation. In what point it changed?12:17
cedkafibanez: in 8c3da23d1fb412:18
cedkwhich is in 3.612:18
afibanezcedk: ok, I see. So this is strage, because between 3.6 and 3.8 ir.trigger.condition was in a kind of limbo, explaining and checking for python but using pyson in eval time12:21
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton12:24
cedkafibanez: a valid PYSON is a valid Python12:25
afibanezcedk: ok that's True. So it worked always, and just had the description outdated12:37
andrespolitihow can i get the list of ids of the selected records in a one2many field of a wizard view?13:17
cedkandrespoliti: you can not13:18
cedkandrespoliti: use a Many2Many13:18
cedkwhich need to be filled13:19
andrespolitii'm filling it with a default_ method13:19
andrespolitiand after i change the o2m to a m2m, how can i get the selected records?13:20
-!- JanGB(~jan@x59cc8ba1.dyn.telefonica.de) has joined #tryton13:32
-!- JanGB1(~jan@business-178-015-079-061.static.arcor-ip.net) has joined #tryton13:36
cedkandrespoliti: you still can not, but you have the record put in the m2m13:36
andrespolitii should remove the records i don't want with the "-" button?13:37
cedkandrespoliti: yes13:37
cedkandrespoliti: but you can use the multiselection widget which is nicer for this case13:38
andrespolitiooh that's great13:39
andrespolitithank you13:39
cedkandrespoliti: see an example in sale exception handler13:41
-!- sisalp(~sisalpuse@ip39.ip-46-105-32.eu) has joined #tryton13:49
-!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton14:03
-!- lukio(~lukio@200.68.72.41) has joined #tryton14:18
-!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton14:27
-!- rpit(~rpit@p5B22B745.dip0.t-ipconnect.de) has joined #tryton14:45
-!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton15:00
-!- VlijmenFileer(~VlijmenFi@139.193.196.139) has joined #tryton15:11
-!- lukio(~lukio@iplan.gcoop.com.ar) has joined #tryton15:21
-!- lukio(~lukio@200.68.72.41) has joined #tryton15:35
-!- lukio(~lukio@iplan.gcoop.com.ar) has joined #tryton15:37
-!- lukio(~lukio@iplan.gcoop.com.ar) has joined #tryton16:03
-!- thaneor(~ldlc6@r179-24-114-61.dialup.adsl.anteldata.net.uy) has joined #tryton16:13
-!- JanGB(~jan@x59cc8ba1.dyn.telefonica.de) has joined #tryton16:30
-!- JanGB1(~jan@ipservice-092-216-127-053.092.216.pools.vodafone-ip.de) has joined #tryton16:35
-!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton16:49
-!- lukio(~lukio@iplan.gcoop.com.ar) has joined #tryton17:13
_2cadzHi, how to delete/cancel a sale confirmed in error (it only contains service) ?18:01
cedk_2cadz: you have to cancel all generated document and run the handle exception warning to not re-create the cancelled documents18:05
-!- JanGB(~jan@ipservice-092-216-127-053.092.216.pools.vodafone-ip.de) has joined #tryton18:08
_2cadzcedk: sorry, but which document ? i see nothing in Invoices or Shipements tabs ?18:17
cedk_2cadz: ha indeed it is not yet processed18:17
cedk_2cadz: so maybe you can still update with SQL to set cancel before the cron process the sale18:18
_2cadzcedk: Just set the record to cancel by SQL ?18:19
cedk_2cadz: yes or you can process it and cancel the documents18:20
_2cadzcedk: ok i will try both solutions, thanks.18:21
_2cadzcedk: to deepen the question, why a cron to handle sales confirmed?18:27
cedk_2cadz: to confirm faster18:33
-!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton18:37
_2cadzI would like to use the scenarios to populate an existing base, is that possible ?18:43
cedk_2cadz: yes you can run it with the doctest module19:10
cedk_2cadz: http://hg.tryton.org/tryton-tips/file/tip/tips#l11619:10
-!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton19:14
andrespolitihow can i set the value of the next view of a wizard from the transition method?19:15
andrespolitithe value of a field of the next view*19:15
cedkandrespoliti: with the get_defaults of the StateView: http://doc.tryton.org/4.6/trytond/doc/ref/wizard.html#trytond.wizard.StateView.get_defaults19:19
_2cadzcedk: Yes, I saw this tips, thanks, I think I have a problem to load the config in my rst file : config = get_config() return none.19:19
andrespolitiis there an example of how to use the get_defauls method of the StateView?20:05
-!- mariomop(~quassel@host210.190-31-61.telecom.net.ar) has joined #tryton20:12
-!- mariomop(~quassel@host210.190-31-61.telecom.net.ar) has joined #tryton20:31
-!- _2cadz_(~2cadz@smtp.med-mag.com) has joined #tryton20:32
-!- _2cadz(~2cadz@82-64-14-213.subs.proxad.net) has joined #tryton20:37
-!- catonano(~user@151.50.159.183) has joined #tryton21:15
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:00

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