IRC logs of #tryton for Wednesday, 2013-09-04 #tryton log beginning Wed Sep 4 00:00:10 CEST 2013
kotekAnyone here can help with reports generation?03:42
-!- dmf( has left #tryton08:29
abhisarhow to  display a field of many2one field  of a model in  its view in tryton 2.8??08:46
WUDI have a model which has a M2O field in it, for example: a module which has a M20 for 'sale', now I want to show the 'lines' from 'sale' in the view for my 'module', how do I do it? I've looked for examples through product 2.8 but couldn't find it. Does leaving out inherit in 2.8 cause us to not be able to use specific fields from our referenced modules?08:49
nicoeabhisar, WUD: use function fields08:50
abhisarcan you please elaborate08:51
nicoeabhisar: There is plenty of example in the code08:56
jeancavallo1abhisar: Let's assume you have model A which has a M2O link (my_field) to a model B with a Char field (some_data). What you got to do is create a Function field in model A (my_displayer) which will get the value you want so you can display it in a model A view08:57
jvblascomorning everyone10:42
jvblascoi think i an issue with the session management in the server side. We found that if we create a new database and set the admin password and log in to it as admin u can get admin access to another database through the backup/restore function in the client10:48
nicoejvblasco: morning10:48
jvblascoThe process to replicate would be create 2 databases from client with 2 different admin passwords10:48
jvblascolog into one of them as admin, and then dump the other database.10:49
cedkjvblasco: of course10:49
jvblascodelete the database u loged in and restore the other one with the same name as the deleted one10:50
cedkjvblasco: I see no problem here10:50
cedkjvblasco: session are in the DB10:50
jvblascoand u will be able to log with the other database password and not the original one10:50
jvblascofor example, db1 pass wop db2 pass tururu10:50
cedkjvblasco: no, you will just be able to use the same session because you dumped it10:51
jvblascobut i log into the other database10:51
jvblascoi mean i use db1 password to log into db210:51
jvblascorestored database10:51
cedkjvblasco: and af course password of users are also dumped10:51
jvblascoexcuse my english10:51
jvblascoyeah, but as soon as i restart the server everything fits again10:52
jvblascolet me try to explain again10:52
jvblascodb1 and db210:52
jvblascoi log into db110:52
jvblascoafter that10:52
jvblascoi dump db210:52
jvblascodelete db110:52
jvblascoand restore db2 with db1 name10:53
jvblascoif i try to log into the new db110:53
yangoon1jvblasco: it seems you confound admin password of database and of server10:53
jvblascoi log with the deleted db1 password and not the dumped db2 password10:53
jvblascoi know admin password is for database managent, and it is configured in /etc/tryton-server.cong10:54
yangoon1on client side for dumping and restoring you have to use the server admin password10:54
jvblascoi know10:54
yangoon1so I don't understand the problem right now10:55
jvblascogive it a try10:55
jvblascocreate 2 databases10:55
jvblascoand use different passwords for the admin users10:55
jvblasco(i know the client admin password for dumping and restoring is another one and configured in the server side)10:56
jvblascoafter that log in in both databases10:56
jvblascoand dump one of them10:56
cedkjvblasco: ok get_login has a cache10:56
jvblascothat was my guess cause as soon as i restarted the server everything went back to normal fucntionality10:57
jvblasconot sure if i would consider this a security hole10:57
jvblascocause anyone with the admin password (not the database one i mean the database management one)10:58
jvblascomay get access to database he wouldn't get other way10:58
jvblascoanyway with the admin password he may dump it anyway10:58
jvblasconot a real issue for a production server with only one database10:59
jvblascook, sry about that, just wanted to ask b4 reporting a bug11:03
yangoon1jvblasco: no matter to be sorry, would you fill an issue please?11:04
jvblascoin the bug tracker?11:04
jvblascoanyway, that makes me wonder11:04
yangoon1jvblasco: thx11:04
jvblascohow would i scale horizontally the tryton server with a load balancer if it caches the sessions?11:05
yangoon1multi_server = True disables caching11:06
jvblascoyangoon1: Good to know, thnx so much.11:12
yangoon1 jvblasco welcome11:13
jvblascoi will report that as a bug11:18
jvblascoi don't think feature or wish is accurate for that.11:19
priyankaranithere seems to be a bug in the convert_domain function of (introduced in migration to 2.8 removal of _inherits)11:26
priyankaraniit will not convert [()]11:26
cedkpriyankarani: for me, it is not a valid domain11:27
priyankaraniit will convert [('template.category', '=', 1)] to [('template', '=', 1)]11:27
priyankaranicedk: that was a typo11:27
priyankaranicedk: look at the example i have written.. and I have a patch with test for this11:28
priyankaranicedk: is there any existing bug report you are aware of, or should i create one ?11:28
cedkpriyankarani: make a search11:29
jvblascoyangoon1: already reported, also reported the client restore database error although it's restoring it, it throws the error11:30
yangoon1jvblasco: good11:31
priyankaranicedk: the related issue is already closed and your patch seems to have introduced the bug
priyankaranicedk: do you want me to reopen the issue or create a new one ?11:38
cedkpriyankarani: yes11:39
priyankaranicedk: reopen ?11:40
cedkpriyankarani: yes if it is not fixed11:42
priyankaranicedk: In tryton 2.8 we need to pass empty tuple in selection field if there is no default value set. But there is no empty tuple passed for 'Resource' field in ir.attachment ?14:16
cedkpriyankarani: I don't understand the question14:17
priyankaranicedk: I'm creating  attachment in my module. But its breaking saying ('UserError', (u'The field "Resource" on "Attachment" is not in the selection.', '')).  I guess Its because no empty tuple is added to selection values of 'Resource' field.14:22
cedkpriyankarani: yes the field is required14:25
cedkpriyankarani: an attachment must be attached to something14:25
jeancavallo1priyankarani: I am not sure, but I think the idea is that "resource" is considered a mandatory field. It is initialized through the context14:25
jvblascowhere can i find the code where tryton checks the access rules and that kind of stuff? We are somehow stuck in the access rules, not sure how the rules domain is checked and would be nice to know16:48
jeancavallo1jvblasco: What are you trying to do ?17:07
jvblascojeancavallo1: i'm trying to restrict a user to only be able to read, write their own generated sale orders, for example17:30
jvblascojeancavallo1: i tried to use the rule [('create_uid', '=', '')], but i thoght using the Transaction.user would be better [('create_uid', '=', 'Transaction.user')]. But i don't really have any clues to what i have access within that domain. That's why i wanted to read the code.17:34
-!- vcardon( has left #tryton20:27
-!- vcardon( has left #tryton20:45
koteksharkcz, <323:23
kotekyou are providing relatorio&neso packages for fedora?23:23

Generated by 2.11.0 by Marius Gedminas - find it at!