a simple view

77 views
Skip to first unread message

Cato Nano

unread,
Dec 7, 2017, 7:50:32 AM12/7/17
to tryton
I have a simple entity and I d like to show a simple tree view (as a first step)

I tried to follow the manual in creating that but the tree view doesnt get showed

Here s a picture (my menu in the red shape)
https://imgur.com/a/I5XMc

And here is the relevant file
https://gitlab.com/devincentis.emilio/tributi/blob/master/tributi.xml

Thanks in advance

Cato Nano

unread,
Dec 14, 2017, 10:29:26 AM12/14/17
to tryton
in the browser consolle I find this error:

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. ExtensionCommon.jsm:407

Did I mess up the SAO installation ?

How so ?

This happens also on the other menus too, but only mine can't load a view

Thanks for any hint

Cédric Krier

unread,
Dec 14, 2017, 10:40:07 AM12/14/17
to tryton
On 2017-12-14 07:29, Cato Nano wrote:
> Il giorno giovedì 7 dicembre 2017 13:50:32 UTC+1, Cato Nano ha scritto:
> > I have a simple entity and I d like to show a simple tree view (as a first step)
> >
> > I tried to follow the manual in creating that but the tree view doesnt get showed
> >
> > Here s a picture (my menu in the red shape)
> > https://imgur.com/a/I5XMc
> >
> > And here is the relevant file
> > https://gitlab.com/devincentis.emilio/tributi/blob/master/tributi.xml
> >
> > Thanks in advance
>
> in the browser consolle I find this error:
>
> Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. ExtensionCommon.jsm:407
>
> Did I mess up the SAO installation ?

This sounds like the server crash when answering. Check the server log.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Cato Nano

unread,
Dec 15, 2017, 5:17:26 AM12/15/17
to tryton
this happens also with the other menus

But they do show a view in the window

The error is common to all the menus but the only one not showing anything is mine

This is console after clicking on the
"Administration -> Modules -> Modules" menu

https://imgur.com/a/FvuQI

Cato Nano

unread,
Dec 15, 2017, 5:20:06 AM12/15/17
to tryton
for reference, this is what I find in my log

~$ cat /var/log//tryton/trytond.log
Fri Dec 15 05:17:56 2017] ERROR:werkzeug:5.8.18.8 - - [15/Dec/2017 05:17:56] code 400, message Bad HTTP/0.9 request type ('\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie:')
Fri Dec 15 06:01:47 2017] ERROR:werkzeug:77.72.83.110 - - [15/Dec/2017 06:01:47] code 400, message Bad HTTP/0.9 request type ('\x03\x00\x00*%à\x00\x00\x00\x00\x00Cookie:')
Fri Dec 15 06:01:48 2017] ERROR:werkzeug:77.72.83.110 - - [15/Dec/2017 06:01:48] code 400, message Bad HTTP/0.9 request type ('\x03\x00\x00*%à\x00\x00\x00\x00\x00Cookie:')


But these entries are at 6 in the morning, the took the picture of the console right now.

And right now is about 11:15

Sergi Almacellas Abellana

unread,
Dec 15, 2017, 5:24:17 AM12/15/17
to try...@googlegroups.com
El 15/12/17 a les 11:17, Cato Nano ha escrit:
> Il giorno giovedì 14 dicembre 2017 16:40:07 UTC+1, Cédric Krier ha scritto:
>> On 2017-12-14 07:29, Cato Nano wrote:
>>> Il giorno giovedì 7 dicembre 2017 13:50:32 UTC+1, Cato Nano ha scritto:
>>>> I have a simple entity and I d like to show a simple tree view (as a first step)
>>>>
>>>> I tried to follow the manual in creating that but the tree view doesnt get showed
>>>>
>>>> Here s a picture (my menu in the red shape)
>>>> https://imgur.com/a/I5XMc
>>>>
>>>> And here is the relevant file
>>>> https://gitlab.com/devincentis.emilio/tributi/blob/master/tributi.xml
>>>>
>>>> Thanks in advance
>>>
>>> in the browser consolle I find this error:
>>>
>>> Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. ExtensionCommon.jsm:407
>>>
>>> Did I mess up the SAO installation ?
>>
>> This sounds like the server crash when answering. Check the server log.
>
> this happens also with the other menus
>
> But they do show a view in the window
>
> The error is common to all the menus but the only one not showing anything is mine
>
> This is console after clicking on the
> "Administration -> Modules -> Modules" menu
>
> https://imgur.com/a/FvuQI
>

It seems that your browser can not reach the tryton server. This does
not sound as a view definition error.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cato Nano

unread,
Dec 15, 2017, 9:04:07 AM12/15/17
to tryton
I'm puzzled

Clicking on the Administration -> Modules -> Modules menu produces the console shown in my previous post but it also produces this modules screen
https://imgur.com/a/g2R8Q


While clicking on my menu produuces the same console but no screen !

Also, now I set the sao folder permissions (recursively) to 777. That didn't help

What else could I attempt ?

Sorry for the bothering :-/

The machine is here, you can see that yourself
http://52.59.227.113:8000/index.html
user admin
pwd tryton

Cédric Krier

unread,
Dec 15, 2017, 9:30:22 AM12/15/17
to tryton
On 2017-12-15 06:04, Cato Nano wrote:
> The machine is here, you can see that yourself
> http://52.59.227.113:8000/index.html
> user admin
> pwd tryton

OK, I clicked and I get in the javascript console:

TypeError: c is undefined

But as you use the minified sao version, I can not know more.

Cato Nano

unread,
Dec 15, 2017, 10:15:18 AM12/15/17
to tryton
Il giorno venerdì 15 dicembre 2017 15:30:22 UTC+1, Cédric Krier ha scritto:
> On 2017-12-15 06:04, Cato Nano wrote:
> > The machine is here, you can see that yourself
> > http://52.59.227.113:8000/index.html
> > user admin
> > pwd tryton
>
> OK, I clicked and I get in the javascript console:

Than you for your concern, i appreciate it

>
> TypeError: c is undefined
>
> But as you use the minified sao version, I can not know more.

Ah sorry for that :-/

I'm using the minified version because the instructions I followed probably are for a "production" deployment

Now I rebuilt the SAO with

grunt dev

this should give a more inspectable build

I took a look at the console right now and there's a log stack

That shold be more meaningful

Than you again
In the Gruntfile I see there are 2 targets for develompment

Cédric Krier

unread,
Dec 15, 2017, 10:25:06 AM12/15/17
to tryton
There are still the minified version, so those are still used.

Cato Nano

unread,
Dec 15, 2017, 10:49:26 AM12/15/17
to tryton
Il giorno venerdì 15 dicembre 2017 16:25:06 UTC+1, Cédric Krier ha scritto:
> On 2017-12-15 07:15, Cato Nano wrote:
> > Il giorno venerdì 15 dicembre 2017 15:30:22 UTC+1, Cédric Krier ha scritto:
> > > On 2017-12-15 06:04, Cato Nano wrote:
> > > > The machine is here, you can see that yourself
> > > > http://52.59.227.113:8000/index.html
> > > > user admin
> > > > pwd tryton
> > >
> > > OK, I clicked and I get in the javascript console:
> >
> > Than you for your concern, i appreciate it
> >
> > >
> > > TypeError: c is undefined
> > >
> > > But as you use the minified sao version, I can not know more.
> >
> > Ah sorry for that :-/
> >
> > I'm using the minified version because the instructions I followed probably are for a "production" deployment
> >
> > Now I rebuilt the SAO with
> >
> > grunt dev
> >
> > this should give a more inspectable build
> >
> > I took a look at the console right now and there's a log stack
> >
> > That shold be more meaningful
>
> There are still the minified version, so those are still used.

Ouch :-/

I'm sorry again

Ok, I discarded the sao folder and decompressed it from scratch, I installed and run
"grunt dev"
in it

This time there should be nothing produced by the ""default" task

If there's anything more that I should do please tell me

Thanks again

Cédric Krier

unread,
Dec 15, 2017, 10:55:06 AM12/15/17
to tryton
Still the minified version. Please check before.

Cato Nano

unread,
Dec 15, 2017, 11:17:13 AM12/15/17
to tryton
i dont understand

I built it from scratch

Ok, I' m terribly sorry for all this fuss

For today, I think I can' t do more

I' ll investigate this frontend thing and I' ll be back here soon
Probably tomorrow

I apologize

Cato Nano

unread,
Dec 17, 2017, 12:39:43 PM12/17/17
to tryton
we are still unable to tame the SAO installation. The frontend is not really our thing

In the meantime we mananged to connect to our server with a native client and the error is there too !!

So the problem must be in my code !!

Here s a picture
https://imgur.com/a/ICSri

And here s the stacktrace
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/view/list.py", line 990, in __sig_switch
if not self.screen.row_activate() and self.children_field:
File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/screen/screen.py", line 460, in default_row_activate
}, context=self.context.copy(), warning=False)
File "/usr/lib/python2.7/dist-packages/tryton/action/main.py", line 194, in exec_keyword
Action._exec_action(action, data, context=context)
File "/usr/lib/python2.7/dist-packages/tryton/action/main.py", line 154, in _exec_action
context_domain=action['context_domain'])
File "/usr/lib/python2.7/dist-packages/tryton/gui/window/window.py", line 26, in create
win = Form(model, **attributes)
File "/usr/lib/python2.7/dist-packages/tryton/gui/window/form.py", line 40, in __init__
self.screen = Screen(self.model, **attributes)
File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/screen/screen.py", line 50, in __init__
if not (MODELACCESS[model_name]['write']
File "/usr/lib/python2.7/dist-packages/tryton/common/common.py", line 144, in __getitem__
idx = self._models.index(model)
ValueError: u'tributi.bolletta' is not in list

Cédric Krier

unread,
Dec 17, 2017, 1:35:09 PM12/17/17
to tryton
On 2017-12-17 09:39, Cato Nano wrote:
> And here s the stacktrace
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/view/list.py", line 990, in __sig_switch
> if not self.screen.row_activate() and self.children_field:
> File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/screen/screen.py", line 460, in default_row_activate
> }, context=self.context.copy(), warning=False)
> File "/usr/lib/python2.7/dist-packages/tryton/action/main.py", line 194, in exec_keyword
> Action._exec_action(action, data, context=context)
> File "/usr/lib/python2.7/dist-packages/tryton/action/main.py", line 154, in _exec_action
> context_domain=action['context_domain'])
> File "/usr/lib/python2.7/dist-packages/tryton/gui/window/window.py", line 26, in create
> win = Form(model, **attributes)
> File "/usr/lib/python2.7/dist-packages/tryton/gui/window/form.py", line 40, in __init__
> self.screen = Screen(self.model, **attributes)
> File "/usr/lib/python2.7/dist-packages/tryton/gui/window/view_form/screen/screen.py", line 50, in __init__
> if not (MODELACCESS[model_name]['write']
> File "/usr/lib/python2.7/dist-packages/tryton/common/common.py", line 144, in __getitem__
> idx = self._models.index(model)
> ValueError: u'tributi.bolletta' is not in list

You did not register in the Pool you model in __init__.py
Also I just see that the file bolletta.py has syntax errors.

Cato Nano

unread,
Dec 17, 2017, 5:31:16 PM12/17/17
to tryton
Il giorno domenica 17 dicembre 2017 19:35:09 UTC+1, Cédric Krier ha scritto:

>
> You did not register in the Pool you model in __init__.py
> Also I just see that the file bolletta.py has syntax errors.

Sorry to bother with such trivial issues :-/

Anyway, I didn' t register my model in __init__.py because this doc
http://doc.tryton.org/4.6/trytond/doc/topics/models/index.html#topics-models

doesn' t mention __init__.py

In fact, it shows the registration in the pool of the "Party" model in the Party.py file

So that' s what I had done in my Bolletta.py

But that doesn' t work

Now, the registration in the pool in bolletta.py is commented out and the view on my bollette is working !!

When I' ll be a bit more confident in tryton I hope to bother you with less trivial issues ;-)

Thanks !
Ciao

Cédric Krier

unread,
Dec 17, 2017, 6:05:07 PM12/17/17
to tryton
On 2017-12-17 14:31, Cato Nano wrote:
> Il giorno domenica 17 dicembre 2017 19:35:09 UTC+1, Cédric Krier ha scritto:
>
> >
> > You did not register in the Pool you model in __init__.py
> > Also I just see that the file bolletta.py has syntax errors.
>
> Sorry to bother with such trivial issues :-/
>
> Anyway, I didn' t register my model in __init__.py because this doc
> http://doc.tryton.org/4.6/trytond/doc/topics/models/index.html#topics-models
>
> doesn' t mention __init__.py

https://codereview.tryton.org/43841002

Cato Nano

unread,
Dec 18, 2017, 6:01:32 AM12/18/17
to tryton
Il giorno lunedì 18 dicembre 2017 00:05:07 UTC+1, Cédric Krier ha scritto:
> On 2017-12-17 14:31, Cato Nano wrote:
> > Il giorno domenica 17 dicembre 2017 19:35:09 UTC+1, Cédric Krier ha scritto:
> >
> > >
> > > You did not register in the Pool you model in __init__.py
> > > Also I just see that the file bolletta.py has syntax errors.
> >
> > Sorry to bother with such trivial issues :-/
> >
> > Anyway, I didn' t register my model in __init__.py because this doc
> > http://doc.tryton.org/4.6/trytond/doc/topics/models/index.html#topics-models
> >
> > doesn' t mention __init__.py
>
> https://codereview.tryton.org/43841002

Thank you !

Now I am creating my first selection field and I have some troubles with that too

I ll open a new thread for that !

Ciao
Reply all
Reply to author
Forward
0 new messages