This file is indexed.

/usr/share/pyshared/tryton/gui/window/view_form/view/widget_parse.py is in tryton-client 3.0.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#This file is part of Tryton.  The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from interface import ParserInterface
import form_gtk
import list_gtk
import graph_gtk
import calendar_gtk
from form import ViewForm
from list import ViewList
from graph import ViewGraph
from calendar_ import ViewCalendar
from tryton.exceptions import TrytonError

PARSERS = {
    'form': form_gtk.ParserForm,
    'tree': list_gtk.ParserTree,
    'graph': graph_gtk.ParserGraph,
    'calendar': calendar_gtk.ParserCalendar,
    }

PARSERS2 = {
    'form': ViewForm,
    'tree': ViewList,
    'graph': ViewGraph,
    'calendar': ViewCalendar,
    }


class WidgetParse(ParserInterface):

    def parse(self, screen, root_node, fields, children_field=None):
        for node in root_node.childNodes:
            if not node.nodeType == node.ELEMENT_NODE:
                continue
            if node.localName in PARSERS:
                widget = PARSERS[node.localName](self.parent, self.attrs,
                    screen, children_field)
                (wid, child, state_widgets, on_write, notebooks,
                    cursor_widget) = widget.parse(screen.model_name, node,
                        fields)
                screen.set_on_write(on_write)
                res = PARSERS2[node.localName](screen, wid, child,
                    state_widgets, notebooks, cursor_widget, children_field)
                res.title = widget.title
                return res
            else:
                raise TrytonError('Unknow view mode: %s' % node.localName)