This file is indexed.

/usr/lib/python2.7/dist-packages/trytond/modules/account_payment_sepa_cfonb/payment.py is in tryton-modules-account-payment-sepa-cfonb 3.8.0-2.

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
50
51
# This file is part of Tryton.  The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import os

import genshi
import genshi.template

from trytond.pool import PoolMeta
from trytond.modules.account_payment_sepa import payment as sepa_payment


__metaclass__ = PoolMeta
__all__ = ['Journal', 'Group']


class Journal:
    __name__ = 'account.payment.journal'

    @classmethod
    def __setup__(cls):
        super(Journal, cls).__setup__()
        payable_flavor_cfonb = ('pain.001.001.03-cfonb',
            'pain.001.001.03 CFONB')
        receivable_flavor_cfonb = ('pain.008.001.02-cfonb',
            'pain.008.001.02 CFONB')
        for flavor, field in [
                (payable_flavor_cfonb, cls.sepa_payable_flavor),
                (receivable_flavor_cfonb, cls.sepa_receivable_flavor),
                ]:
            if flavor not in field.selection:
                field.selection.append(flavor)

loader = genshi.template.TemplateLoader([
        os.path.join(os.path.dirname(__file__), 'template'),
        os.path.join(
            os.path.dirname(
                sepa_payment.__file__), 'template'),
        ], auto_reload=True)


class Group:
    __name__ = 'account.payment.group'

    def get_sepa_template(self):
        if (self.kind == 'payable'
                and self.journal.sepa_payable_flavor.endswith('-cfonb')):
            return loader.load('%s.xml' % self.journal.sepa_payable_flavor)
        if (self.kind == 'receivable'
                and self.journal.sepa_receivable_flavor.endswith('-cfonb')):
            return loader.load('%s.xml' % self.journal.sepa_receivable_flavor)
        return super(Group, self).get_sepa_template()