summaryrefslogtreecommitdiff
path: root/dynamic_accounts_report/report/ageing.xml
blob: ae708469263f5de370ff45ce14d3f30df814c376 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<odoo>
    <template id="dynamic_accounts_report.partner_ageing">
        <t t-call="web.html_container">
            <t t-set="data_report_margin_top" t-value="12"/>
            <t t-set="data_report_header_spacing" t-value="9"/>
            <t t-set="data_report_dpi" t-value="110"/>
            <t t-call="web.internal_layout">
                <div class="page">
                    <div class="oe_structure"/>
                    <h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Partner Ageing
                    </h3>
                    <strong> As On Date:</strong>
                    <t t-esc="Filters['date_from']"/>
                    <div>
                        <div style="text-align:centre;left:50%;" class="row">
                                <div class="col-3">
                                    <strong>Target move:</strong>
                                        <li>
                                            <t t-esc="Filters['target_move']"/>
                                        </li>
                                </div>
                                <div class="col-3">
                                    <strong>Account Type:</strong>
                                        <li>
                                            <t t-esc="Filters['result_selection']"/>
                                        </li>
                                </div>
                                 <div class="col-3" style="">
                                    <strong>Partners :</strong>
                                    <t t-foreach="Filters['partners']" t-as="pa">
                                        <li>
                                            <t t-esc="pa"/>
                                        </li>
                                    </t>
                                </div>
                                 <div class="col-3" style="">
                                    <strong>Partner Tag :</strong>
                                    <t t-foreach="Filters['partner_tags']" t-as="pt">
                                        <li>
                                            <t t-esc="pt"/>
                                        </li>
                                    </t>
                                </div>
                        </div>


                        <br></br>
                    <table class="table table-sm table-reports">
                        <thead>
                            <tr class="text-center">
                                <th>Entry Label</th>
                                <th>Due date</th>
                                <th>JRNL</th>
                                <th>Account</th>
                                <th>Not Due</th>
                                <th>0 - 30</th>
                                <th>30 - 60</th>
                                <th>60 - 90</th>
                                <th>90 - 120</th>
                                <th>120 +</th>
                                <th> Total</th>
                                <th groups="base.group_multi_currency">Currency</th>
                            </tr>
                        </thead>
                        <tbody>
                            <t t-foreach="account_data" t-as="account">
                                <tr style="font-weight: bold;">
                                    <td colspan="4">
                                        <span style="color: white;" t-esc="'..'"/>
                                        <span t-esc="account['name']"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['direction']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['4']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['3']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['2']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['1']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['0']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="account['total']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                    </td>

                                    <td groups="base.group_multi_currency"/>
                                </tr>
                                <tr t-foreach="account['child_lines']" t-as="line">
                                    <td><span t-esc="line['move']"/></td>
                                    <td><span t-esc="line['date']"/></td>
                                    <td><span t-esc="line['jrnl']"/></td>
                                    <td><span t-esc="line['acc_code']"/></td>
                                    <td class="text-right">
                                        <span t-if="line.get('period6')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                    <td class="text-right">
                                        <span t-if="line.get('period5')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                         <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                    <td class="text-right">
                                        <span t-if="line.get('period4')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                         <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                    <td class="text-right">
                                        <span t-if="line.get('period3')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                    <td class="text-right">
                                        <span t-if="line.get('period2')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                    <td class="text-right">
                                        <span t-if="line.get('period1')"
                                              t-esc="line['amount']"
                                              t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
                                        <span t-else="">
                                            <span>-</span>
                                        </span>
                                    </td>
                                </tr>
                            </t>
                        </tbody>
                    </table>
                    </div>
                    <br></br>
                </div>
            </t>
        </t>
    </template>

    <record id="action_print_ageing_partner" model="ir.actions.report">
            <field name="name">Partner Ageing</field>
            <field name="model">account.partner.ageing</field>
            <field name="report_type">qweb-pdf</field>
            <field name="report_name">dynamic_accounts_report.partner_ageing</field>
            <field name="report_file">dynamic_accounts_report.partner_ageing</field>
    </record>

</odoo>