IRC logs of #tryton for Tuesday, 2017-07-04 #tryton log beginning Tue Jul 4 00:00:01 CEST 2017
-!- JosDzG(~Thunderbi@ has joined #tryton00:16
-!- smarro(~sebastian@ has joined #tryton00:17
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:07
-!- thaneor( has joined #tryton02:43
-!- JosDzG(~Thunderbi@ has joined #tryton02:46
-!- vbastos( has joined #tryton04:14
-!- Timitos( has joined #tryton06:02
-!- rpit( has joined #tryton06:44
-!- zmijunkie( has joined #tryton07:46
-!- dmollerm( has joined #tryton08:15
-!- zmijunkie( has joined #tryton08:18
-!- zmijunkie( has joined #tryton08:18
-!- mrichez( has joined #tryton08:50
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:17
-!- smarro( has joined #tryton10:13
-!- nicoe( has joined #tryton11:27
-!- csotelo(~csotelo@2001:1388:49c7:2502:8abb:2393:b42f:eb9b) has joined #tryton12:14
-!- udono( has joined #tryton12:46
-!- mariomop(~quassel@ 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
-!- smarro( 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( 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@ 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/ has joined #tryton15:53
-!- silwol(silwolmatr@gateway/shell/ has joined #tryton16:08
-!- fmorato[m](fmoratomat@gateway/shell/ has joined #tryton16:39
-!- JosDzG(~Thunderbi@ has joined #tryton16:41
-!- kstenger( has joined #tryton16:53
-!- andrespoliti( 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@ 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@ has joined #tryton17:47
cedkandrespoliti: maybe you can trigger "Enter" on the input17:47
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@ has joined #tryton17:58
-!- smarro( has joined #tryton18:12
-!- udono( has joined #tryton18:51
-!- Telesight( has joined #tryton18:56
-!- smarro( 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( has joined #tryton23:09
-!- JosDzG(~Thunderbi@ has joined #tryton23:32

Generated by 2.11.0 by Marius Gedminas - find it at!