This file is indexed.

/usr/share/pyshared/tryton/gui/window/view_form/view/widget_parse.py is in tryton-client 2.2.1-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
48
49
#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.parser_calendar,
}

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


class WidgetParse(ParserInterface):

    def parse(self, screen, root_node, fields, children_field=None):
        widget = 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, buttons, 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, buttons,
                    notebooks, cursor_widget, children_field)
                res.title = widget.title
                widget = res
                break
            else:
                raise TrytonError('Unknow view mode: %s' % node.localName)
        return widget