[13.0][FIX] contract: Set layout for section and note in portal template

This commit is contained in:
Denis Roussel
2021-04-30 16:18:34 +02:00
parent e824f1da01
commit 0261d34211

View File

@@ -227,14 +227,23 @@
t-foreach="contract.contract_line_ids" t-foreach="contract.contract_line_ids"
t-as="line" t-as="line"
> >
<tr> <tr
t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"
>
<t t-if="not line.display_type">
<td name="td_name"> <td name="td_name">
<span t-field="line.name" /> <span t-field="line.name" />
</td> </td>
<td name="td_quantity" class="text-right"> <td
name="td_quantity"
class="text-right"
>
<span t-field="line.quantity" /> <span t-field="line.quantity" />
</td> </td>
<td name="td_price_unit" class="text-right"> <td
name="td_price_unit"
class="text-right"
>
<span <span
t-field="line.price_unit" t-field="line.price_unit"
t-options='{"widget": "monetary", "display_currency": contract.currency_id}' t-options='{"widget": "monetary", "display_currency": contract.currency_id}'
@@ -258,7 +267,8 @@
>Month(s)</t> >Month(s)</t>
<t <t
t-if="line.recurring_rule_type=='monthlylastday'" t-if="line.recurring_rule_type=='monthlylastday'"
>Month(s) last day</t> >Month(s) last
day</t>
<t <t
t-if="line.recurring_rule_type=='quarterly'" t-if="line.recurring_rule_type=='quarterly'"
>Quarter(s)</t> >Quarter(s)</t>
@@ -277,6 +287,27 @@
t-field="line.recurring_next_date" t-field="line.recurring_next_date"
/> />
</td> </td>
</t>
<t
t-if="line.display_type == 'line_section'"
>
<td colspan="99">
<span t-field="line.name" />
</td>
<t
t-set="current_section"
t-value="line"
/>
<t
t-set="current_subtotal"
t-value="0"
/>
</t>
<t t-if="line.display_type == 'line_note'">
<td colspan="99">
<span t-field="line.name" />
</td>
</t>
</tr> </tr>
</t> </t>
</tbody> </tbody>