IRC logs of #tryton for Monday, 2013-08-19

chat.freenode.net #tryton log beginning Mon Aug 19 00:00:02 CEST 2013
2013-08-19 11:29 <jvblasco> morning everyone
2013-08-19 11:31 <jvblasco> i'm trying to make an access rule to allow users to only see registers they created
2013-08-19 11:32 <jvblasco> is it possible?
2013-08-19 11:33 <jvblasco> for example, a user (customer) creates through web services a sale order
2013-08-19 11:34 <jvblasco> i want him to only be able to access their own sale orders and the other users sale orders
2013-08-19 11:35 <jvblasco> can u access the user that is making the request to use it as the field in the domain statement?
2013-08-19 11:36 <udono> jvblasco: hi
2013-08-19 11:37 <udono> jvblasco: yes, as far as it is a res.user, it should be accessible in the domain of a rule.
2013-08-19 11:37 <udono> jvblasco: just grep the other modules, and you will find many examples, IIUC.
2013-08-19 11:38 <jvblasco> and how do i access the res.user executing the request?
2013-08-19 11:38 <jvblasco> i tried with [('res.user.id','=','self.create_uid')]
2013-08-19 11:38 <udono> jvblasco: btw. you will find more examples in the xml files of the internal modules like ir, res.
2013-08-19 11:40 <jvblasco> and i get the following error
2013-08-19 11:40 <jvblasco> http://pastebin.com/iF9yyMLR
2013-08-19 11:40 <jvblasco> u mean i can do it with a view permission?
2013-08-19 11:42 <jvblasco> cause those users will make request through web services, no views involved
2013-08-19 11:42 <udono> jvblasco: sorry phone
2013-08-19 11:45 <jvblasco> udono: np :)
2013-08-19 12:02 <jvblasco> udono: solved, it seems my coworker altered the order of the domain statement, he was trying [('statement', 'operand', 'field')] instead of [('field', 'operand', 'statement')]
2013-08-19 12:02 <jvblasco> sorry everyone for the trouble
2013-08-19 12:03 <jvblasco> now we have problems with the views, but no problem at all as customers are only accessing the system through webservices
2013-08-19 12:03 <jvblasco> btw any recomendation for jsonrpc library for php?
2013-08-19 12:10 <udono> jvblasco: back. Good you solve the problem with the domain. About php and jsonrpc I have no idea.
2013-08-19 12:12 <jvblasco> udono: thnx ;)
2013-08-19 12:14 <udono> jvblasco: about the problems with the views: Is it the 'Yout try to bypass an access rule!' user-error?
2013-08-19 12:35 <jvblasco> udono: yeah, we noticed that the groups accessing a view are hardcoded in the view (for example for sales module in the view they declare that u have to be in group_sale to access)
2013-08-19 12:37 <jvblasco> udono: we are trying to create a special group for customers access rules to the system and u are required to be in the sales group (but we only want them to access their own records)
2013-08-19 14:41 <jvblasco> does anyone know if there's any documentation regarding jsonrpc webservices? I mean how to make a request, how to login (get the user id)...
2013-08-19 14:41 <jvblasco> ?
2013-08-19 14:50 <Pilou> jvblasco: using bash http://pastebin.com/jaezjAYY & http://pastebin.com/qcn0mAsd
2013-08-19 16:43 <vcardon> hello everyone
2013-08-19 16:44 <vcardon> can someone tell me the difference between "sequences strict" and "sequences", and an illustrative use of each?
2013-08-19 17:07 -!- sisalp2(~sisalpuse@37.59.34.70) has left #tryton
2013-08-19 17:42 <jvblasco> Pilou: Thnx so much, i'll give it a try
2013-08-19 18:57 <albertca> vcardon: you still there for an explanation about sequences?
2013-08-19 18:57 <albertca> vcardon: sequence strict ensures there are no gaps when giving new numbers
2013-08-19 18:58 <albertca> vcardon: which is required only in some documents such invoices
2013-08-19 18:58 <albertca> vcardon: other documents that is not so important and so is better to avoid strict sequences because it avoids a lock in the database
2013-08-19 19:34 <vcardon> albertca: thanks for the explanation, I was more or less sure that this was the purpose.I'm now hurting with the sequences that need to be unique per fiscalyear.
2013-08-19 19:35 <vcardon> I think will have to change this default behavior in my future instance (have sequences that span multiple fiscalyears)
2013-08-19 19:36 <vcardon> we are evaluating a migration from OERP 6.0.4 to tryton 2.8
2013-08-19 19:38 <albertca> Then you should really check http://www.openerp2tryton.com/migration.html
2013-08-19 19:38 <albertca> You can have sequences that span several fiscal years in tryton too afaik
2013-08-19 19:41 <vcardon> albertca: we've checked out the migration scripts, but I have some dead rats in my OERP 6.0.4 closet from previous migrations and we're doing it mostly through the object layers, cleaning as we go.
2013-08-19 19:41 <vcardon> albertca: also, we're more familiar with python scripting than with keetle, but the work that has been done is impressive, kudos
2013-08-19 19:58 -!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has left #tryton
2013-08-19 20:55 -!- priyankarani(~priyanka@115.184.51.60) has left #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!