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

chat.freenode.net #tryton log beginning Tue Jul 4 00:00:01 CEST 2017
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton00:16
-!- smarro(~sebastian@181.16.7.104) has joined #tryton00:17
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:07
-!- thaneor(~ldlc6@r179-25-48-17.dialup.adsl.anteldata.net.uy) has joined #tryton02:43
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton02:46
-!- vbastos(~vbastos@san1823193.lnk.telstra.net) has joined #tryton04:14
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton06:02
-!- rpit(~rpit@aftr-37-24-144-89.unity-media.net) has joined #tryton06:44
-!- zmijunkie(~Adium@p5B024D08.dip0.t-ipconnect.de) has joined #tryton07:46
-!- dmollerm(~dmollerm@170.red-80-28-119.staticip.rima-tde.net) has joined #tryton08:15
-!- zmijunkie(~Adium@p5B024D08.dip0.t-ipconnect.de) has joined #tryton08:18
-!- zmijunkie(~Adium@p200300CC23CDAA00B012C8669E0D9CEA.dip0.t-ipconnect.de) has joined #tryton08:18
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:50
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:17
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton10:13
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton11:27
-!- csotelo(~csotelo@2001:1388:49c7:2502:8abb:2393:b42f:eb9b) has joined #tryton12:14
-!- udono(~udono@078-058-210-188.ip-addr.inexio.net) has joined #tryton12:46
-!- mariomop(~quassel@181.95.2.52) has joined #tryton13:06
alexbodnhello friends13:17
alexbodnhello pokoli.13:18
alexbodnhow can i know which group is needed for a special operation?13:18
alexbodn*specific13:18
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton13:23
alexbodnthe domain is showing: ['AND', ['OR', [[u'groups', u'in', []]]], ['OR', [[u'company', u'=', 1]], [[u'company', u'=', None]]]]13:25
pokolialexbodn: look at the code :)13:49
pokolialexbodn: which is the pyson expression of this domain?13:49
alexbodnhey pokoli13:57
alexbodnpokoli: the generated sql expression is: ((((?))) AND ((("company" = ?)) OR (("company" IS NULL))))13:58
pokolialexbodn: but where is defined this access rule? Or whatever generates this domain14:02
alexbodnpokoli, i'm failing with this code14:07
alexbodn        invoice_sequence, = SequenceStrict.create([{14:07
alexbodn            'name': '%s' % date.year,14:07
alexbodn            'code': 'account.invoice',14:07
alexbodn            'company': company,14:07
alexbodn        }])14:07
pokolialexbodn: do you have the company set on the context?14:25
pokolialexbodn: it should contain the company that you are creating the sequence14:26
alexbodnpokoli, how could i set this?14:31
-!- smarro(~sebastian@cust-245-46-13-200.trynet.com.ar) has joined #tryton14:35
pokolialexbodn: sorry but i have to go14:43
alexbodnenjoy, pokoli, thanks :)14:43
cedkalexbodn: the easiest way is to use a user with the field company correctly set14:46
-!- thaneor1(~ldlc6@179.26.59.49) has joined #tryton14:46
alexbodncedk: i've set company and main_company of the user.  now i understand i have to add the user to groups14:50
alexbodncedk, 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?15:00
mrichezalexbodn: In Administration Section -> Users -> Groups15:19
-!- silwol(silwolmatr@gateway/shell/matrix.org/x-ppkxwldoqjytarpo) has joined #tryton15:53
-!- silwol(silwolmatr@gateway/shell/matrix.org/x-mpptixsxweqvmxya) has joined #tryton16:08
-!- fmorato[m](fmoratomat@gateway/shell/matrix.org/x-uezizfldokixixsq) has joined #tryton16:39
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton16:41
-!- kstenger(~karla@r190-133-91-221.dialup.adsl.anteldata.net.uy) has joined #tryton16:53
-!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton16:53
alexbodnthanks mrichez. i'm writing a python script that creates an user, and i wish it to also assign group(s) to the user.16:58
alexbodnmrichez, i also don't know which groups should the user join16:59
mrichezalexbodn: ah ok, usually i assign user to specific group in xml file16:59
alexbodnmrichez, good ideaa, but how could i open an xml file from a python program?17:00
andrespolitihello, per request of a client, i need to automate the submit of a wizard in the callback of a widget (in Sao)17:01
mrichezit's a specific xml file in the tryton module structure17:01
alexbodnnot just open, but load the records from the xml17:01
andrespolitiis there a way of accessing the on_click() function of a button from within a widget callback?17:02
mricheztryton loads them automatically, see country module-> file country.xml17:02
andrespoliti(this is all happening in the init of a new type of widget i defined)17:03
alexbodnandrespoliti, not out of sao knowledge, you may assign another click event in jquery17:03
mrichezalexbodn: sorry, i have to go17:03
alexbodnmrichez, ok i'll search how is it being loaded, thanks :)17:04
alexbodnbye mrichez17:04
cedkandrespoliti: press "Enter"17:04
mrichezalexbodn: bye17:04
cedkalexbodn: I guess you just need to do user.groups.append(group)17:04
alexbodnhey cedk, typical orm behaviour :)17:05
alexbodncedk, is the group an object, or an id?17:06
alexbodnan object, i guess, cedk17:07
cedkalexbodn: I guess you are scripting with proteus, so you must get groups using .find17:08
alexbodncedk, thanks. would you recommend .find over search?17:09
nicoealexbodn: you must use find as search is not useable with proteus17:11
alexbodncedk, do you recommend using proteus over direct import of trytond modules?17:12
alexbodnnicoe, sorry, that was your answer17:13
nicoealexbodn: it depends, proteus is easier to use but its goal is to mimic the client so it's a bit slower17:16
nicoealexbodn: we usually use proteus though17:17
alexbodnnicoe, i understand17:17
andrespoliticedk: how do i trigger an "Enter"?17:39
andrespolitiif i'm still inside the callback, would an "enter" event have effect?17:40
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton17:41
cedkandrespoliti: I do not understand but pressing Enter trigger the default button of a wizard17:44
andrespoliticedk: 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 button17:45
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton17:45
andrespoliticedk: i have a callback for when the qr scanner sucessfully detects the qr code, and it sets the input value17:46
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton17:47
cedkandrespoliti: maybe you can trigger "Enter" on the input17:47
cedkandrespoliti: https://stackoverflow.com/questions/17217892/how-to-trigger-the-enter-keypress17:48
andrespoliticedk: 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?17:49
cedkandrespoliti: do not know17:50
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton17:58
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton18:12
-!- udono(~udono@078-058-210-188.ip-addr.inexio.net) has joined #tryton18:51
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton18:56
-!- smarro(~sebastian@cust-230-46-13-200.trynet.com.ar) has joined #tryton19:55
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:12
-!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton21:22
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton22:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:07
-!- kstenger(~karla@r190-133-235-2.dialup.adsl.anteldata.net.uy) has joined #tryton23:09
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton23:32

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