IRC logs of #tryton for Thursday, 2018-01-18 #tryton log beginning Thu Jan 18 00:00:01 CET 2018
-!- swayf( has joined #tryton00:36
-!- thaneor(~ldlc6@ has joined #tryton04:11
-!- zodman(~zodman@ has joined #tryton04:30
csoteloI ma trying to set payment_terms bu default however it doesnt work, my models are, any sugges?04:59
-!- hedererjs( has joined #tryton06:40
-!- _2cadz(~2cadz@ has joined #tryton07:02
-!- JanGB( has joined #tryton07:21
-!- zmijunkie( has joined #tryton07:40
-!- JanGB( has joined #tryton07:57
-!- Timitos( has joined #tryton08:02
-!- csotelo(~csotelo@ has joined #tryton08:29
-!- mrichez( has joined #tryton08:54
-!- Telesight( has joined #tryton08:58
-!- rpit( has joined #tryton09:14
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:29
-!- rpit( has joined #tryton09:52
-!- afibanez(uid207678@gateway/web/ 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@ 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, 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( 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 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
csoteloten, is there a way to solve it without property table, like de usual default value as my code?11:24
-!- catonano(~catonano@ 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@ has joined #tryton11:31
csoteloI just found how to do it on 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:
pokoliafibanez: and it's explained as: "Use pyson for fields that were evaluated using safe_eval"11:45
-!- catonano_(~catonano@ has joined #tryton11:56
afibanezpokoli:  it's not exactly the same. The condition in ir.trigger was Python in 3.6 too (
-!- JanGB( has joined #tryton12:00
afibanezpokoli: and changed to pyson in 3.8:
-!- catonano(~catonano@ has joined #tryton12:01
-!- swayf( has joined #tryton12:04
pokoliafibanez: on which changeset it was changed?12:05
-!- JanGB1( has joined #tryton12:07
-!- swayf( has joined #tryton12:07
pokoliafibanez: ok, so this is the following changeset:
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 " = 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( 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( has joined #tryton13:32
-!- JanGB1( 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( has joined #tryton13:49
-!- csotelo_at_work(~csotelo@ has joined #tryton14:03
-!- lukio(~lukio@ has joined #tryton14:18
-!- lukio( has joined #tryton14:27
-!- rpit( has joined #tryton14:45
-!- lukio( has joined #tryton15:00
-!- VlijmenFileer(~VlijmenFi@ has joined #tryton15:11
-!- lukio( has joined #tryton15:21
-!- lukio(~lukio@ has joined #tryton15:35
-!- lukio( has joined #tryton15:37
-!- lukio( has joined #tryton16:03
-!- thaneor( has joined #tryton16:13
-!- JanGB( has joined #tryton16:30
-!- JanGB1( has joined #tryton16:35
-!- lukio( has joined #tryton16:49
-!- lukio( 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( 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( 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
-!- andrespoliti( 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:
_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( has joined #tryton20:12
-!- mariomop( has joined #tryton20:31
-!- _2cadz_( has joined #tryton20:32
-!- _2cadz( has joined #tryton20:37
-!- catonano(~user@ has joined #tryton21:15
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:00

Generated by 2.11.0 by Marius Gedminas - find it at!