[IMP]: changed address design for invoice report and misc
This commit is contained in:
parent
82089dc1d3
commit
d0486ef121
@ -6,9 +6,38 @@
|
|||||||
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
|
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div name="invoice_address" class="col-xs-5 col-xs-offset-7">
|
<div name="invoice_address" class="col-xs-6 col-xs-offset-6">
|
||||||
<address t-field="o.partner_id"
|
<table>
|
||||||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
|
<tr t-if="o.partner_id.name">
|
||||||
|
<td colspan="4"><strong t-field="o.partner_id.name"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr t-if="o.partner_id.street">
|
||||||
|
<td colspan="4"><span t-field="o.partner_id.street"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr t-if="o.partner_id.street2">
|
||||||
|
<td colspan="4"><span t-field="o.partner_id.street2"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span t-if="o.partner_id.city and o.partner_id.zip">
|
||||||
|
<span t-field="o.partner_id.city"/> - <span t-field="o.partner_id.zip"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="o.partner_id.city and not o.partner_id.zip">
|
||||||
|
<span t-field="o.partner_id.city"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="not o.partner_id.city and o.partner_id.zip">
|
||||||
|
<span t-field="o.partner_id.zip"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="o.partner_id.state_id">
|
||||||
|
<span t-field="o.partner_id.state_id.name"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="o.partner_id.country_id">
|
||||||
|
<span t-field="o.partner_id.country_id.name"/>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.partner_id.vat"/></div>
|
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.partner_id.vat"/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,10 +26,15 @@
|
|||||||
</t>
|
</t>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//table[@name='invoice_line_table']" position="replace">
|
<xpath expr="//table[@name='invoice_line_table']" position="replace">
|
||||||
|
|
||||||
|
<!-- Is there a HSN code in at least one product? -->
|
||||||
|
<t t-set="hsn_code" t-value="any([l.product_id.l10n_in_hsn_code for l in o.invoice_line_ids])"/>
|
||||||
|
|
||||||
<table class="table table-condensed" name="invoice_line_table">
|
<table class="table table-condensed" name="invoice_line_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th t-if="hsn_code">HSN</th>
|
||||||
<th class="hidden">Source Document</th>
|
<th class="hidden">Source Document</th>
|
||||||
<th class="text-right">Quantity</th>
|
<th class="text-right">Quantity</th>
|
||||||
<th class="text-right">Unit Price</th>
|
<th class="text-right">Unit Price</th>
|
||||||
@ -38,17 +43,18 @@
|
|||||||
<th class="text-right">Taxes</th>
|
<th class="text-right">Taxes</th>
|
||||||
</t>
|
</t>
|
||||||
<th class="text-right">Amount</th>
|
<th class="text-right">Amount</th>
|
||||||
<t t-if="o.company_id.country_id.code == 'IN'">
|
<!-- <t t-if="o.company_id.country_id.code == 'IN'">
|
||||||
<th class="text-right" t-if="is_cgst">CGST</th>
|
<th class="text-right" t-if="is_cgst">CGST</th>
|
||||||
<th class="text-right" t-if="is_cgst">SGST</th>
|
<th class="text-right" t-if="is_cgst">SGST</th>
|
||||||
<th class="text-right" t-if="is_igst">IGST</th>
|
<th class="text-right" t-if="is_igst">IGST</th>
|
||||||
<th class="text-right" t-if="is_cess">CESS</th>
|
<th class="text-right" t-if="is_cess">CESS</th>
|
||||||
</t>
|
</t> -->
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="invoice_tbody">
|
<tbody class="invoice_tbody">
|
||||||
<tr t-foreach="o.invoice_line_ids" t-as="l">
|
<tr t-foreach="o.invoice_line_ids" t-as="l">
|
||||||
<td><span t-field="l.name"/><t t-if="l.product_id.l10n_in_hsn_code"><h6><strong class="ml16">HSN/SAC Code:</strong> <span t-field="l.product_id.l10n_in_hsn_code"/></h6></t></td>
|
<td><span t-field="l.name"/></td>
|
||||||
|
<td t-if="hsn_code"><span t-field="l.product_id.l10n_in_hsn_code"/></td>
|
||||||
<td class="hidden"><span t-field="l.origin"/></td>
|
<td class="hidden"><span t-field="l.origin"/></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="l.quantity"/>
|
<span t-field="l.quantity"/>
|
||||||
@ -69,7 +75,7 @@
|
|||||||
<span t-field="l.price_subtotal"
|
<span t-field="l.price_subtotal"
|
||||||
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
||||||
</td>
|
</td>
|
||||||
<t t-if="o.company_id.country_id.code == 'IN'">
|
<!-- <t t-if="o.company_id.country_id.code == 'IN'">
|
||||||
<td class="text-right" t-if="is_cgst">
|
<td class="text-right" t-if="is_cgst">
|
||||||
<t t-foreach="tax_datas[l.id]" t-as="tax_data">
|
<t t-foreach="tax_datas[l.id]" t-as="tax_data">
|
||||||
<t t-if="tag_cgst_id in tax_data['tag_ids']">
|
<t t-if="tag_cgst_id in tax_data['tag_ids']">
|
||||||
@ -100,7 +106,7 @@
|
|||||||
</t>
|
</t>
|
||||||
<t t-esc="total_cess" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
|
<t t-esc="total_cess" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
|
||||||
</td>
|
</td>
|
||||||
</t>
|
</t> -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr t-foreach="range(max(5-len(o.invoice_line_ids),0))" t-as="l">
|
<tr t-foreach="range(max(5-len(o.invoice_line_ids),0))" t-as="l">
|
||||||
<td>&nbsp;</td>
|
<td>&nbsp;</td>
|
||||||
|
@ -275,11 +275,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6" name="company_address">
|
<table style="margin-left:16px;">
|
||||||
<span t-field="company.partner_id"
|
<tr t-if="company.partner_id.name">
|
||||||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
<td colspan="4"><strong t-field="company.partner_id.name"/></td>
|
||||||
style="border-bottom: 1px solid black; display:inline-block;"/>
|
</tr>
|
||||||
</div>
|
<tr t-if="company.partner_id.street">
|
||||||
|
<td colspan="4"><span t-field="company.partner_id.street"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr t-if="company.partner_id.street2">
|
||||||
|
<td colspan="4"><span t-field="company.partner_id.street2"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span t-if="company.partner_id.city and company.partner_id.zip">
|
||||||
|
<span t-field="company.partner_id.city"/> - <span t-field="company.partner_id.zip"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="company.partner_id.city and not company.partner_id.zip">
|
||||||
|
<span t-field="company.partner_id.city"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="not company.partner_id.city and company.partner_id.zip">
|
||||||
|
<span t-field="company.partner_id.zip"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="company.partner_id.state_id">
|
||||||
|
<span t-field="company.partner_id.state_id.name"/>,
|
||||||
|
</span>
|
||||||
|
<span t-if="company.partner_id.country_id">
|
||||||
|
<span t-field="company.partner_id.country_id.name"/>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user