IRC logs of #tryton for Wednesday, 2013-09-18

chat.freenode.net #tryton log beginning Wed Sep 18 00:00:02 CEST 2013
-!- priyankarani(~priyanka@122.177.8.204) has left #tryton08:17
jvblascoGuys any documentation / tips for deploying a tryton in a production server? For development i'm using the ppa in the google code wiki. But my guess is that it may not be the most optimal way for production environments (maybe i'm wrong)11:48
yangoon1jvblasco: which PPA? Ubuntu?11:55
yangoon1jvblasco: especially for production environments I would recommend distribution packages11:56
jvblascoyangoon1: yeah, the ubuntu one. The problem with distro packages is that it packages tryton 2.4 not 2.812:00
jvblascoyangoon1: https://launchpad.net/~rayanayar/+archive/tryton-2.812:00
yangoon1jvblasco: I meant packaged software for the distribution, so you can go with the PPA12:05
jvblascoi c12:05
corroI recommend packages from PYPI, they are most up-to-date and earlier versions are available too. Like that you have full control over your environment.12:05
corroBe sure to checkout virtualenv too, no need to install the packages globally12:06
jvblascoyangoon1, corro: may i say that pypi is the officialy maintained packaging and ppa is community maintained?12:07
corrojvblasco: Official packages are released on PYPI, yes. I don't know who maintains the PPA meantioned.12:08
yangoon1corro: I disagree for production environments. You have perhaps full control, but you *must* take it. You are out of the package management of the system and have to take care of the consequences.12:08
yangoon1corro: a look at the PPA mentionned could help12:09
jvblascoyangoon1, corro: i may go, for speed purposes, with the ppa right now. But maybe in the future i will switch to pypi12:10
corroyangoon1: You have to take control over the packaging system anyway, just imagine the PPA get updated to 3.0 but you want to stay at 2.8 for a while?12:11
jvblascocorro: u can always tell apt to freeze the version12:11
yangoon1corro: yes, use the package management adequate and set preferences12:12
jvblascoanyway i'm new to python and i'm still getting used to tools like pypi, virtualenv is an unknown for me, and i need to study that. But right now time is my enemy12:12
jvblascocorro: if u can point me in the right direction working with pypi / virtualenv (i mean point to some good starting docs) i would really appreciate the help ;)12:13
jvblascoyangoon1, corro: anyway thanks so much for the help and your time guys ;)12:14
yangoon1jvblasco: welcome12:14
sisalp1jvblasco: I use pypi/environment too for my hosting services.12:31
sisalp1if interested in an installer example, let me know, I have one somewhere12:32
jvblascosisalp1: sure12:35
sisalp1jvblasco: here https://docs.google.com/document/d/1lKIHZcc3TFOUrjQebQ-sVyQ000mIv9gkxJSbCt0JQjE/edit?usp=sharing12:37
sisalp1jvblasco: tested on a virtual server with debian 7 or ubuntu 12.0412:38
sisalp1You probably don't need all the complexity, but it gives you an example of a working setup12:38
sisalp1jvblasco: support on a separate irc in case needed12:39
jvblascosisalp1: sure, i will give it a look asap. Thnx so much for sharing ;)12:57
jvblascoguys i'm having issues with triggers. They are only being processed when i create a register from the client. When i create the register from the code, triggers don't seem to work. Any thing i should know about them? Do they have anything implemented in the client side?13:18
cedkjvblasco: no everything is done on server side13:20
cedkjvblasco: but root user doesn't trigger13:20
jvblascocedk: ahm. That may be the problem then. Then i wonder how to implement a system where users only have access to an api module but that api needs to create registers and read in other models. I thought changing the user for the transaction would do the trick. May creating a special user for that kind of work the way to go instead of using the root?13:23
cedkjvblasco: the restriction on root user is not sure, there is a comment in the code13:32
jvblascocedk: in the ir trigger code?13:35
jvblascoif Transaction().user == 0: return []  # XXX is it want we want?13:36
cedkjvblasco: yes13:36
jvblascocedk: i guess that's what makes root user to not trigger triggers13:37
cedkjvblasco: yes13:37
jvblascocedk: thnx so much, i'll try to find a workaround with the admin user or creating a specific user for that. btw may i switch to, for example, the admin with the "with" statement using "with Transaction().set_user(1, set_context=True):" or i have to log the admin user in runtime?13:40
cedkjvblasco: no you can13:44
jvblascocedk: and where may i find documentation about contexts and context management?13:52
jvblascocedk: i mean in tryton13:57
cedkjvblasco: it is managed by Transaction: http://doc.tryton.org/2.8/trytond/doc/ref/transaction.html?highlight=context#transaction14:08
cedkjvblasco: by the way: http://codereview.tryton.org/107300214:11
cedkjvblasco: I think it is a better behavior14:11
WUDare text fields like 'description' on 'product' stored as null in the database when they are empty or empty strings?14:13
jvblascoWUD: u mean when created from the client?14:15
jvblascoWUD: or created with the ORM in the code?14:15
cedkWUD: depends what you mean by empty14:15
WUDcreated from the client14:15
jvblascoWUD: With the client the field in the database has an empty string, from the code the field in the database has nothing.14:16
WUDso it stores it as an empty string, because it happens from the client14:16
WUDan empty string is , ''14:16
jvblascoWUD: that would be my guess. Yeah that's what i see in the database ;)14:16
jvblascoWUD: anyway im new to tryton, i may be mistaken.14:17
WUDI think It should be null14:17
WUDor nil14:17
cedkWUD: client can not show None but only an empty string14:18
cedkWUD: so both could be in the DB and you always have to deal with14:18
WUDI have to deal with both? An empty and a nil?14:18
jvblascocedk: is that code review planned to enter the trunk code?14:18
cedkjvblasco: as all codereview14:19
cedkjvblasco: indeed I put the comment because I had no idea of cases where we would like something else14:23
cedkbut now, at least with your example doing "sudo" should trigger14:24
-!- WUD(~WUD@122.177.8.204) has left #tryton14:36
jvblascocedk: what do u mean with sudo?14:38
cedkjvblasco: using root user to perform some action but keep user in context14:39
jvblascocedk: with Transaction().set_user(0, set_context=True):?14:39
cedkjvblasco: yes14:39
jvblascocedk: hehehe, ok. Thanks so much for the help. A workaround would have been very painfull ;)14:40
vezjakvcedk: hi, regarding submitting translations for different core modules: can there be a single review for multiple modules, e.g. for account, account_invoice, account_...14:55
vezjakvcedk: or each module has its own review id (since module has own repo)14:56
cedkvezjakv: you can become the official translator for your language14:59
cedkvezjakv: than you will have push access14:59
cedkvezjakv: but before that you should submit few translation to check if you follow correctly the guidelines15:00
vezjakvcedk: yes, make sense15:00
vezjakvcedk: so, for each module a separate review id?15:01
cedkvezjakv: at first15:01
vezjakvcedk: ok, thnx15:01
jvblascocedk: It all works like a breeze with the patch. Everything working as intended. Thank u very much cedk. The opportunity cost of the work around would have meant a failure in the project. U saved me there ;)16:53
jvblascoBTW i think i found a bug in the email_template module.16:54
jvblascoi know it's not part of the core but still a very usefull modulethough16:54
cedkjvblasco: please report to the author16:55
jvblascomaybe it's intended, but i will ;)16:56
cedkjvblasco: always report, authors will be happy to have your feedback17:01
jvblascocedk: yeah, same as startups (like us) live from customer's feedback xD17:01
jvblascocedk: btw, when are code reviews merged in the trunk?17:04
cedkjvblasco: when reviewed normally17:05
cedkjvblasco: but sometimes, I got some reviews nobody looks so I push them after few days17:06
vezjakvhi all, 1q: does localize_modules.py from tryton-tools work with trunk? it worked with 2.8 branch17:16
cedkvezjakv: did you test it?17:17
jvblascommmmmmm17:18
vezjakvcedk: when executing PYTHONPATH=.:../proteus ../tryton-tools/localize_modules.py -l sl_SI -d testdb trytond/modules, I've got:17:18
vezjakvcedk: /database.py", line 344, in execute     return self.cursor.execute(sql) sqlite3.OperationalError: table ir_configuration already exists17:18
jvblascoguys, i have created a user that doesn't belong to any group and it has read access to party, carrier and product modules. Am i missing something? Is it the intended behaviour?17:19
vezjakvcedk: anyway, I'll do it manually through Export Translation17:20
jvblascomay that user inherit any kind of access rule from the company it belongs to?17:21
jvblascoI also tried creating a group that only has access to a model that doesn't have any field, just methods. And it keeps havind read/write access to those models.17:27
jvblascohaving*17:27
cedkvezjakv: I think this should fix the script: http://codereview.tryton.org/1076002/17:38
cedkjvblasco: yes it is intended behavior17:39
jvblascocedk: and how do i cut all kind of access to any model?17:39
jvblascocedk: i need users without any access to the system aside from an api-like model17:40
cedkjvblasco: except maybe for carrier17:40
cedkjvblasco: create model access17:41
jvblascocedk: give it a look in test.urbansherpas.es:8000 db: ProvesPermisos user: admin pass: provisional123 | created user: usuario pass: usuario12317:42
jvblascocedk: dbname ProvesPermissos, sry17:45
jvblascocedk: i created a model access to the api-like model, added the user to the group, and can still read party and above models17:47
cedkjvblasco: create model access to others models17:48
jvblascocedk: ok17:48
vezjakvcedk: hmm, now it throws: tryton/trunk/trytond/trytond/backend/sqlite/database.py", line 165, in connect     db_filename = self.database_name + '.sqlite' TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'17:59
vezjakvcedk: it seems that dbname is not passed somehow17:59
cedkvezjakv: did you apply the patch also on trytond?18:07
vezjakvcedk: uf, just proteus, didn't know :(18:09
vezjakvcedk: is it possible to apply with hgreview --fetch if repo already contains changes? or, I have to apply manually?18:11
cedkvezjakv: manually or clean the repo18:15
vezjakvcedk: great! it works. thnx again.18:19
cedkvezjakv: about translation, I think I can stop submitting review19:05
cedkvezjakv: let's wait for monday and submit your commits19:06
cedkvezjakv: after that I will give you push access19:06
cedkvezjakv: by the way, translators doesn't have the right to modify setup.py19:06
vezjakvcedk: ok, I felt a bit as 'spammer' :(19:07
cedkvezjakv: so I will add the classifier later19:07
vezjakvcedk: so setup.py should be left untouched?19:07
cedkvezjakv: yes19:12
jvblascosee u tomorrow everyone ;)19:22

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