IRC logs of #tryton for Tuesday, 2017-07-18 #tryton log beginning Tue Jul 18 00:00:01 CEST 2017
-!- sergio_( has joined #tryton00:28
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:41
-!- kstenger1( has joined #tryton01:38
-!- smarro(~sebastian@ has joined #tryton01:47
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton02:16
-!- thaneor( has joined #tryton03:49
-!- scrapper( has joined #tryton04:46
-!- dmollerm( has joined #tryton08:26
-!- Timitos( has joined #tryton08:30
dmollermcedk, pokoli: I found the root of the problem about a field not being synced with a xml record: it was a translatable field and a translation did not exist yet. After manually saving a translation all works smooth. I'll consider bundling an en.po file with a translation for this record.08:39
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:01
-!- nicoe( has joined #tryton09:40
-!- scrapper( has left #tryton10:00
-!- sim6(sim6matrix@gateway/shell/ has joined #tryton10:06
sim6I'm starting with tryton!10:07
-!- afibanez(501c77aa@gateway/web/cgi-irc/ has joined #tryton10:16
pokolisim6: hello, I hope you have fun with tryton :)10:20
afibanezI'm having some troubles with permissions, or context, or I don't know... I have a process that work when triggered by a Tryton button, but when is triggered by a cron job it fails at finding property fields. I'm using set_user and set_context to act as another company10:22
afibanezThere are some common knowledge or examples of behaivours like this? I will appreciate a lot10:23
cedkafibanez: you have to define the companies for which the cron job must be run10:26
afibanezyes, i know. But i need to run the job with one company and in one moment view the a property field with the information of the another company. The use case is that i'm reinvoicing, so if I have a invoice from A to B (both are companies in my Tryton), i need to create the supplier invoice in B10:29
pokoliafibanez: you call set_user(0)?10:42
pokoliafibanez: and with which context you browse the instace from where the property is read?10:42
afibanezpokoli: yes i call 'with transaction.set_user(0, set_context=True):' and 'with transaction.set_context(, _check_access=False):'10:48
-!- csotelo(~csotelo@2001:1388:49c7:3e7:acb8:cfdc:234e:4a65) has joined #tryton10:52
pokoliafibanez: and you browse the instance inside this code block?10:54
afibanezpokoli: yes... i am doing more tests and i discovered that if i use administrator as the executor user it works... but if i use an special user for the cron (like normally) it fails... i will check permissions... but with set_user and _check_access I thought there would work10:59
pokoliafibanez: it should not be realated11:02
pokoliafibanez: btw, have you seen that we droped properties on latests version? Maybe you should consider upgrading11:03
afibanezpokoli: i found that if I configure in the cron user a company that can view all subcompanies data, it works... :/11:08
afibanezpokoli: yes, I like the properties drop in the newest Tryton. But we can't upgrade for now (it's planned)11:09
cedkthe context company is checked against the companies of the user11:15
-!- orphean(~Orphean@ has joined #tryton12:02
afibanezOk, it not works well and i'm revising the cron code. I've found in company/ a "# TODO replace with context". And I viewed that the company is setted and unsetted to the cron user. Thats a problem, because i can't set a company that works, it needs to change only the context. If i comment both writes, It works with the set_context only.13:03
afibanezWhy is there that two writes? Are necessary for something?13:04
-!- mariomop(~quassel@ has joined #tryton13:06
pokoliafibanez: there is an issue for that:
jcmHi, do I need to close something when exiting a proteus script? postgresql complains on other sessions using db, I need to use pg_terminate_backend(pid) to release them.13:06
pokolijcm: when does postgresql complain?13:07
pokolijcm: AFAIK you don't have to close anything13:07
jcmpokoli: when I dropdb for instance13:09
pokolijcm: do you have som trytond server running that have connected to the database?13:09
afibanezpokoli: I see. But there is no explanation why the set_context is there and the writes too13:10
cedkafibanez: write is there for historical reason13:15
afibanezcedk: ok, but its safe remove it?13:25
cedkafibanez: do not know13:25
cedkafibanez: but the write should not prevent your code to work13:31
cedkafibanez: I guess the cron user is not added to all the companies it needs to be13:31
jcmpokoli: the client is disconnected, python console are terminanted, but ps aux|grep tryton shows up postgres: tryton <my_db> [local] idle13:37
pokolijcm: as far as the server is running, the connections to the database are keep in a pool for new connections13:38
pokolijcm: stoping the server will allow you to drop the DB13:38
afibanezcedk: ok... i will think abour it13:38
jcmpokoli: ok thks13:39
-!- rpit(~rpit@2a02:908:e671:9f80:56ee:75ff:fe0d:d3c7) has joined #tryton14:13
jcmme again... I don't find how to add users through proteus: with only company module activated, I get on user.main_company = company an AttributeError: 'res.user' Model has no attribute '_changed_values': {'employee': None, 'company': Pool().get('')(**{}), 'main_company': Pool().get('')(**{})}14:20 without setting main_company raises a UserError in tryton4.4/trytond/trytond/res/", line 298, in create14:20
pokolijcm:  have you saved the company first?14:20
jcmpokoli: yes14:21
pokolijcm: it's strange because you should probably get the company id on the repr, but I see an empty values :$14:21
jcmpokoli: found... company above is company = company_config.form. I need to reload the proper object14:22
-!- alexbodn(~alex@ has joined #tryton14:47
-!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton15:27
-!- thaneor1(~ldlc6@ has joined #tryton15:49
-!- mariomop_(~quassel@ has joined #tryton15:52
-!- apostatize(~visavis@unaffiliated/apostatize) has joined #tryton16:05
-!- smarro(~sebastian@ has joined #tryton16:09
-!- kstenger( has joined #tryton16:17
-!- JosDzG(~Thunderbi@ has joined #tryton17:51
orpheanI've been looking through to try and find why nginx proxying ssl is preventing the client from connecting and I'm not going to lie I'm a bit lost.17:55
orpheanI can connect to the static werkzeug server fine through a browser with ssl on port 800017:55
orpheanand the client even seems like it starts to connect as the green bar starts shuttling backward and forward in Profile Editor window17:56
orpheanbut then all I get is "Could not connect to the server"17:56
pokoliorphean: have checked the know_hosts of the tryton client?17:56
orpheanI nuked that file twice already17:56
orpheanIs there some sort of url decoration I need to put on the url for the client to detect it should connect with ssl?17:57
pokoliorphean: are you using custom certificates?17:57
pokoliorphean: which tryton version?17:57
pokoliorphean: have a look at:!topic/tryton/S4eyVIe-b0417:57
orpheanmy certificate are from letsencrypt authority and installed in nginx17:57
orpheantryton is running on standard http behind nginx reverse proxy17:58
pokoliorphean: have you checked nginx logs?17:58
orpheanI will do much more digging myself, I was just checking at this point whether there was some obvious url decoration / switch I needed to flip in the client.18:00
orpheanI'll update once I find a solution.18:00
-!- Telesight( has joined #tryton18:10
orpheanAlright so after much messing around I was constantly missing in the logs nginx is throwing 400 responses rather than 200s over ssl19:10
orpheanAfter enabling debug logging in nginx its throwing the response because it claims "client sent plain HTTP request to HTTPS port while reading client request headers"19:10
orpheanso now i need to work out how to configure nginx to ignore this situation or rewrite some headers or whatever19:11
-!- smarro( has joined #tryton19:20
-!- robinak(~quassel@unaffilated/robink) has joined #tryton19:51
orpheanyea so I don't have a development environment set up for the client right now so I can't check where exactly but the try block in https_connection must be failing on some ssl.SSLError and falling back to http_connection() as the known hosts file keeps getting updated with the hostname without the fingerprint20:36
-!- JosDzG(~Thunderbi@ has joined #tryton20:37
kwmiebachHello. In relatorio, is it possible to define a python function?20:56
-!- deep-book-gk_(~1wm_su@ has joined #tryton20:56
-!- deep-book-gk_(~1wm_su@ has left #tryton20:57
-!- JosDzG(~Thunderbi@ has joined #tryton20:58
-!- alexbodn(~alex@ has joined #tryton21:09
cedkkwmiebach: no, it is a template engine21:39
cedkkwmiebach: if you need a method, just add it to the report context21:40
cedkorphean: run it in verbose mode21:41
kwmiebachcedk thank you, I will look into the context21:44
cedkkwmiebach: the method to override is: Report.get_context21:49
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
orpheanhi cedk, I narrowed it down to SSL Handshake failure22:47
orpheanI still don't know why as my certificate chain is working fine for standard https22:48
orpheanSSL_do_handshake() failed (SSL: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:SSL alert number 48) while SSL handshaking, client: ::::::, server: [::]:800022:52
orpheannginx error log22:52
orpheani chopped out the ipv6 client address22:53
orpheanAt this point I'm going to break and continue looking at it tomorrow22:56
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:12
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton23:52

Generated by 2.11.0 by Marius Gedminas - find it at!