IRC logs of #tryton for Tuesday, 2017-07-04

chat.freenode.net #tryton log beginning Tue Jul 4 00:00:01 CEST 2017
2017-07-04 00:16 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 00:17 -!- smarro(~sebastian@181.16.7.104) has joined #tryton
2017-07-04 01:07 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-07-04 02:43 -!- thaneor(~ldlc6@r179-25-48-17.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-07-04 02:46 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 04:14 -!- vbastos(~vbastos@san1823193.lnk.telstra.net) has joined #tryton
2017-07-04 06:02 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-07-04 06:44 -!- rpit(~rpit@aftr-37-24-144-89.unity-media.net) has joined #tryton
2017-07-04 07:46 -!- zmijunkie(~Adium@p5B024D08.dip0.t-ipconnect.de) has joined #tryton
2017-07-04 08:15 -!- dmollerm(~dmollerm@170.red-80-28-119.staticip.rima-tde.net) has joined #tryton
2017-07-04 08:18 -!- zmijunkie(~Adium@p5B024D08.dip0.t-ipconnect.de) has joined #tryton
2017-07-04 08:18 -!- zmijunkie(~Adium@p200300CC23CDAA00B012C8669E0D9CEA.dip0.t-ipconnect.de) has joined #tryton
2017-07-04 08:50 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2017-07-04 09:17 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-07-04 10:13 -!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton
2017-07-04 11:27 -!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton
2017-07-04 12:14 -!- csotelo(~csotelo@2001:1388:49c7:2502:8abb:2393:b42f:eb9b) has joined #tryton
2017-07-04 12:46 -!- udono(~udono@078-058-210-188.ip-addr.inexio.net) has joined #tryton
2017-07-04 13:06 -!- mariomop(~quassel@181.95.2.52) has joined #tryton
2017-07-04 13:17 <alexbodn> hello friends
2017-07-04 13:18 <alexbodn> hello pokoli.
2017-07-04 13:18 <alexbodn> how can i know which group is needed for a special operation?
2017-07-04 13:18 <alexbodn> *specific
2017-07-04 13:23 -!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton
2017-07-04 13:25 <alexbodn> the domain is showing: ['AND', ['OR', [[u'groups', u'in', []]]], ['OR', [[u'company', u'=', 1]], [[u'company', u'=', None]]]]
2017-07-04 13:49 <pokoli> alexbodn: look at the code :)
2017-07-04 13:49 <pokoli> alexbodn: which is the pyson expression of this domain?
2017-07-04 13:57 <alexbodn> hey pokoli
2017-07-04 13:58 <alexbodn> pokoli: the generated sql expression is: ((((?))) AND ((("company" = ?)) OR (("company" IS NULL))))
2017-07-04 14:02 <pokoli> alexbodn: but where is defined this access rule? Or whatever generates this domain
2017-07-04 14:07 <alexbodn> pokoli, i'm failing with this code
2017-07-04 14:07 <alexbodn> invoice_sequence, = SequenceStrict.create([{
2017-07-04 14:07 <alexbodn> 'name': '%s' % date.year,
2017-07-04 14:07 <alexbodn> 'code': 'account.invoice',
2017-07-04 14:07 <alexbodn> 'company': company,
2017-07-04 14:07 <alexbodn> }])
2017-07-04 14:25 <pokoli> alexbodn: do you have the company set on the context?
2017-07-04 14:26 <pokoli> alexbodn: it should contain the company that you are creating the sequence
2017-07-04 14:31 <alexbodn> pokoli, how could i set this?
2017-07-04 14:35 -!- smarro(~sebastian@cust-245-46-13-200.trynet.com.ar) has joined #tryton
2017-07-04 14:43 <pokoli> alexbodn: sorry but i have to go
2017-07-04 14:43 <alexbodn> enjoy, pokoli, thanks :)
2017-07-04 14:46 <cedk> alexbodn: the easiest way is to use a user with the field company correctly set
2017-07-04 14:46 -!- thaneor1(~ldlc6@179.26.59.49) has joined #tryton
2017-07-04 14:50 <alexbodn> cedk: i've set company and main_company of the user. now i understand i have to add the user to groups
2017-07-04 15:00 <alexbodn> cedk, the domain shows: ['AND', ['OR', [[u'groups', u'in', []]]], ['OR', [[u'company', u'=', 1]], [[u'company', u'=', None]]]]. the company is correct, but the groups domain is empty. what is the right way to assign the user a group?
2017-07-04 15:19 <mrichez> alexbodn: In Administration Section -> Users -> Groups
2017-07-04 15:53 -!- silwol(silwolmatr@gateway/shell/matrix.org/x-ppkxwldoqjytarpo) has joined #tryton
2017-07-04 16:08 -!- silwol(silwolmatr@gateway/shell/matrix.org/x-mpptixsxweqvmxya) has joined #tryton
2017-07-04 16:39 -!- fmorato[m](fmoratomat@gateway/shell/matrix.org/x-uezizfldokixixsq) has joined #tryton
2017-07-04 16:41 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 16:53 -!- kstenger(~karla@r190-133-91-221.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-07-04 16:53 -!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton
2017-07-04 16:58 <alexbodn> thanks mrichez. i'm writing a python script that creates an user, and i wish it to also assign group(s) to the user.
2017-07-04 16:59 <alexbodn> mrichez, i also don't know which groups should the user join
2017-07-04 16:59 <mrichez> alexbodn: ah ok, usually i assign user to specific group in xml file
2017-07-04 17:00 <alexbodn> mrichez, good ideaa, but how could i open an xml file from a python program?
2017-07-04 17:01 <andrespoliti> hello, per request of a client, i need to automate the submit of a wizard in the callback of a widget (in Sao)
2017-07-04 17:01 <mrichez> it's a specific xml file in the tryton module structure
2017-07-04 17:01 <alexbodn> not just open, but load the records from the xml
2017-07-04 17:02 <andrespoliti> is there a way of accessing the on_click() function of a button from within a widget callback?
2017-07-04 17:02 <mrichez> tryton loads them automatically, see country module-> file country.xml
2017-07-04 17:03 <andrespoliti> (this is all happening in the init of a new type of widget i defined)
2017-07-04 17:03 <alexbodn> andrespoliti, not out of sao knowledge, you may assign another click event in jquery
2017-07-04 17:03 <mrichez> alexbodn: sorry, i have to go
2017-07-04 17:04 <alexbodn> mrichez, ok i'll search how is it being loaded, thanks :)
2017-07-04 17:04 <alexbodn> bye mrichez
2017-07-04 17:04 <cedk> andrespoliti: press "Enter"
2017-07-04 17:04 <mrichez> alexbodn: bye
2017-07-04 17:04 <cedk> alexbodn: I guess you just need to do user.groups.append(group)
2017-07-04 17:05 <alexbodn> hey cedk, typical orm behaviour :)
2017-07-04 17:06 <alexbodn> cedk, is the group an object, or an id?
2017-07-04 17:07 <alexbodn> an object, i guess, cedk
2017-07-04 17:08 <cedk> alexbodn: I guess you are scripting with proteus, so you must get groups using .find
2017-07-04 17:09 <alexbodn> cedk, thanks. would you recommend .find over search?
2017-07-04 17:11 <nicoe> alexbodn: you must use find as search is not useable with proteus
2017-07-04 17:12 <alexbodn> cedk, do you recommend using proteus over direct import of trytond modules?
2017-07-04 17:13 <alexbodn> nicoe, sorry, that was your answer
2017-07-04 17:16 <nicoe> alexbodn: it depends, proteus is easier to use but its goal is to mimic the client so it's a bit slower
2017-07-04 17:17 <nicoe> alexbodn: we usually use proteus though
2017-07-04 17:17 <alexbodn> nicoe, i understand
2017-07-04 17:39 <andrespoliti> cedk: how do i trigger an "Enter"?
2017-07-04 17:40 <andrespoliti> if i'm still inside the callback, would an "enter" event have effect?
2017-07-04 17:41 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 17:44 <cedk> andrespoliti: I do not understand but pressing Enter trigger the default button of a wizard
2017-07-04 17:45 <andrespoliti> cedk: i defined a qr scanner widget, and the client wants that as soon as the qr is detected, the wizard ends, without having to press the button
2017-07-04 17:45 -!- kobain(~kobain@unaffiliated/kobain) has joined #tryton
2017-07-04 17:46 <andrespoliti> cedk: i have a callback for when the qr scanner sucessfully detects the qr code, and it sets the input value
2017-07-04 17:47 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 17:47 <cedk> andrespoliti: maybe you can trigger "Enter" on the input
2017-07-04 17:48 <cedk> andrespoliti: https://stackoverflow.com/questions/17217892/how-to-trigger-the-enter-keypress
2017-07-04 17:49 <andrespoliti> cedk: yes, i'm trying to trigger a keypress event, but if i'm still inside the callback, and the event closes the wizard, would it work?
2017-07-04 17:50 <cedk> andrespoliti: do not know
2017-07-04 17:58 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton
2017-07-04 18:12 -!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton
2017-07-04 18:51 -!- udono(~udono@078-058-210-188.ip-addr.inexio.net) has joined #tryton
2017-07-04 18:56 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-07-04 19:55 -!- smarro(~sebastian@cust-230-46-13-200.trynet.com.ar) has joined #tryton
2017-07-04 20:12 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-07-04 21:22 -!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton
2017-07-04 22:01 -!- semarie(~semarie@unaffiliated/semarie) has joined #tryton
2017-07-04 22:03 -!- kobain(~kobain@unaffiliated/kobain) has joined #tryton
2017-07-04 22:07 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-07-04 23:09 -!- kstenger(~karla@r190-133-235-2.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-07-04 23:32 -!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton

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