Skip to content

Commit b4bd15c

Browse files
committed
[IMP] l10n_ar_tax: change variable names for readability
1 parent 6343268 commit b4bd15c

1 file changed

Lines changed: 40 additions & 38 deletions

File tree

l10n_ar_tax/views/report_payment_receipt_templates.xml

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -79,42 +79,42 @@
7979
<t t-set="secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/>
8080
<thead>
8181
<tr>
82-
<th><span>Pagos</span></th>
83-
<th class="text-right" t-if="secondary_currency"><span>Importe divisa</span></th>
84-
<th class="text-right"><span>Importe</span></th>
82+
<th><strong><span>Pagos</span></strong></th>
83+
<th class="text-right" t-if="secondary_currency"><strong><span>Importe divisa</span></strong></th>
84+
<th class="text-right"><strong><span>Importe</span></strong></th>
8585
</tr>
8686
</thead>
8787
<tbody>
88-
<t t-foreach="payment_bundle" t-as="doc">
89-
<t t-foreach="doc._get_latam_checks()" t-as="check">
88+
<t t-foreach="payment_bundle" t-as="payment">
89+
<t t-foreach="payment._get_latam_checks()" t-as="check">
9090
<tr>
9191
<td>
9292
<span t-out="'Cheque nro %s' % (check.name)">Check nro 123456</span>
9393
<span t-if="check.bank_id" t-out="' - %s' % (check.bank_id.name)"> - Santander Rio</span>
94-
<span t-if="doc.payment_method_code == 'own_checks'" t-out="' (%s)' % (check.payment_method_line_id.name)"> (Chequera electrónica)</span>
94+
<span t-if="payment.payment_method_code == 'own_checks'" t-out="' (%s)' % (check.payment_method_line_id.name)"> (Chequera electrónica)</span>
9595
<span t-if="check.payment_date"> - Venc. <span t-field="check.payment_date"/></span>
9696
</td>
9797
<td class="text-right" t-if="secondary_currency">
9898
<span class="text-nowrap" t-out="check.amount if o.other_currency else secondary_currency.round(check.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/>
9999
</td>
100100
<td class="text-right o_price_total">
101-
<span class="text-nowrap" t-out="doc.company_currency_id.round(check.amount * secondary_currency_rate) if doc.other_currency else check.amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
101+
<span class="text-nowrap" t-out="payment.company_currency_id.round(check.amount * secondary_currency_rate) if payment.other_currency else check.amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
102102
</td>
103103
</tr>
104104
</t>
105105
</t>
106-
<t t-foreach="payment_bundle.l10n_ar_withholding_line_ids" t-as="line">
106+
<t t-foreach="payment_bundle.l10n_ar_withholding_line_ids" t-as="wth_payment">
107107
<tr>
108108
<td>
109-
<span t-if="line.tax_id.l10n_ar_tax_type in ['earnings', 'earnings_scale']" t-out="line.tax_id.invoice_label or 'Retención Ganancias'"/>
110-
<span t-else="" t-out="line.tax_id.invoice_label or line.tax_id.name"/>
109+
<span t-if="wth_payment.tax_id.l10n_ar_tax_type in ['earnings', 'earnings_scale']" t-out="wth_payment.tax_id.invoice_label or 'Retención Ganancias'"/>
110+
<span t-else="" t-out="wth_payment.tax_id.invoice_label or wth_payment.tax_id.name"/>
111111
</td>
112112
<td class="text-right" t-if="secondary_currency">
113113
<!-- TODO t t-set="line_secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/-->
114114

115-
<span class="text-nowrap" t-out="secondary_currency.round(line.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td>
115+
<span class="text-nowrap" t-out="secondary_currency.round(wth_payment.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td>
116116
<td class="text-right o_price_total">
117-
<span class="text-nowrap" t-field="line.amount"/>
117+
<span class="text-nowrap" t-field="wth_payment.amount"/>
118118
</td>
119119
</tr>
120120
</t>
@@ -123,38 +123,38 @@
123123
<t t-set='sign' t-value="o.payment_type == 'outbound' and -1 or 1"/>
124124
<tr>
125125
<td>
126-
<span t-field='line.tax_line_id.name'/>
126+
<span t-field='wth_payment.tax_line_id.name'/>
127127
</td>
128128
<td class="text-right" t-if="o.other_currency">
129-
<span t-out="line.amount_currency * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
129+
<span t-out="wth_payment.amount_currency * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
130130
</td>
131131
<td class="text-right o_price_total">
132-
<span t-out="line.balance * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
132+
<span t-out="wth_payment.balance * sign" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
133133
</td>
134134
</tr>
135135
</t> -->
136-
<t t-foreach="payment_bundle.filtered('write_off_amount')" t-as="doc">
136+
<t t-foreach="payment_bundle.filtered('write_off_amount')" t-as="woff_payment">
137137
<tr >
138138
<td>
139-
<span t-out="doc.write_off_type_id.label or doc.write_off_type_id.name"/>
139+
<span t-out="woff_payment.write_off_type_id.label or woff_payment.write_off_type_id.name"/>
140140
</td>
141141
<td class="text-right" t-if="secondary_currency">
142142
<!-- TODO t t-set="line_secondary_currency_rate" t-value="o.exchange_rate if o.other_currency else o.counterpart_exchange_rate"/-->
143-
<span class="text-nowrap" t-out="secondary_currency.round(doc.write_off_amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td>
143+
<span class="text-nowrap" t-out="secondary_currency.round(woff_payment.write_off_amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/></td>
144144
<td class="text-right o_price_total">
145-
<span class="text-nowrap" t-field="doc.write_off_amount"/>
145+
<span class="text-nowrap" t-field="woff_payment.write_off_amount"/>
146146
</td>
147147
</tr>
148148
</t>
149-
<t t-foreach="payment_bundle.filtered(lambda x: not x._is_latam_check_payment())" t-as="doc">
149+
<t t-foreach="payment_bundle.filtered(lambda x: not x._is_latam_check_payment())" t-as="check_payment">
150150
<tr>
151151
<td>
152-
<span t-field="doc.journal_id.name"/>
152+
<span t-field="check_payment.journal_id.name"/>
153153
</td>
154154
<td class="text-right" t-if="secondary_currency">
155-
<span class="text-nowrap" t-out="doc.amount_signed if doc.other_currency else secondary_currency.round(doc.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/> </td>
155+
<span class="text-nowrap" t-out="check_payment.amount_signed if check_payment.other_currency else secondary_currency.round(check_payment.amount / secondary_currency_rate)" t-options='{"widget": "monetary", "display_currency": secondary_currency}'/></td>
156156
<td class="text-right o_price_total">
157-
<span class="text-nowrap" t-out="doc.company_currency_id.round(doc.amount * secondary_currency_rate) if doc.other_currency else doc.amount" t-options='{"widget": "monetary", "display_currency": doc.company_currency_id}'/>
157+
<span class="text-nowrap" t-out="check_payment.company_currency_id.round(check_payment.amount * secondary_currency_rate) if check_payment.other_currency else check_payment.amount" t-options='{"widget": "monetary", "display_currency": check_payment.company_currency_id}'/>
158158
</td>
159159
</tr>
160160
</t>
@@ -175,33 +175,34 @@
175175
<table class="table table-sm o_main_table" name="matching_table">
176176
<thead>
177177
<tr>
178-
<th><span>Comprobantes Imputados</span></th>
179-
<th class="text-center"><span>Fecha Venc.</span></th>
180-
<th class="text-right"><span>Importe Original</span></th>
181-
<th class="text-right"><span>Importe Imputado</span></th>
178+
<th><strong><span>Comprobantes Imputados</span></strong></th>
179+
<th class="text-center"><strong><span>Fecha Venc.</span></strong></th>
180+
<th class="text-right"><strong><span>Importe Original</span></strong></th>
181+
<th class="text-right"><strong><span>Importe Imputado</span></strong></th>
182182
</tr>
183183
</thead>
184184
<tbody>
185-
<t t-foreach="payment_bundle.with_context(matched_payment_ids=payment_bundle.ids).mapped('matched_move_line_ids')" t-as="line">
185+
<t t-foreach="payment_bundle.with_context(matched_payment_ids=payment_bundle.ids).mapped('matched_move_line_ids')" t-as="match_payment">
186186
<tr>
187-
<td><span t-field='line.move_id.display_name'/></td>
187+
<td><span t-field='match_payment.move_id.display_name'/></td>
188188
<td class="text-center">
189-
<span class="text-nowrap" t-field="line.date_maturity"/>
189+
<span class="text-nowrap" t-field="match_payment.date_maturity"/>
190190
</td>
191191
<td class="text-right o_price_total">
192-
<span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * line.balance" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
192+
<span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * match_payment.balance" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
193193
</td>
194194
<td class="text-right o_price_total">
195-
<span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * line.payment_matched_amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
195+
<span class="text-nowrap" t-out="(o.partner_type == 'supplier' and -1.0 or 1.0) * match_payment.payment_matched_amount" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
196196
</td>
197197
</tr>
198198
</t>
199-
<tr t-if="sum(payment_bundle.mapped('unmatched_amount'))">
199+
<t t-set="unmatched_amount_sum" t-value="sum(payment_bundle.mapped('unmatched_amount'))" />
200+
<tr t-if="unmatched_amount_sum">
200201
<td>A cuenta</td>
201202
<td class="text-center"/>
202203
<td class="text-right o_price_total"/>
203204
<td class="text-right o_price_total">
204-
<span class="text-nowrap" t-out="sum(payment_bundle.mapped('unmatched_amount'))" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}" />
205+
<span class="text-nowrap" t-out="unmatched_amount_sum" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}" />
205206
</td>
206207
</tr>
207208
</tbody>
@@ -219,10 +220,11 @@
219220
<table class="table table-sm o_main_table" name="open_table" t-if="o.partner_type=='customer'" groups="l10n_ar_ux.group_include_pending_receivable_documents">
220221
<thead>
221222
<tr>
222-
<th><span>Comprobantes Pendientes al</span><span t-out="datetime.datetime.today()" t-options='{"widget": "date"}'/></th>
223-
<th class="text-center"><span>Fecha Venc.</span></th>
224-
<th class="text-right"><span>Importe Original</span></th>
225-
<th class="text-right"><span>Saldo</span></th>
223+
224+
<th><strong><span>Comprobantes Pendientes al </span><span t-out="datetime.datetime.today()" t-options='{"widget": "date"}'/></strong></th>
225+
<th class="text-center"><strong><span>Fecha Venc.</span></strong></th>
226+
<th class="text-right"><strong><span>Importe Original</span></strong></th>
227+
<th class="text-right"><strong><span>Saldo</span></strong></th>
226228
</tr>
227229
</thead>
228230
<tbody>

0 commit comments

Comments
 (0)