|
@ -15,60 +15,36 @@ |
|
|
t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" |
|
|
t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" |
|
|
style="max-height: 80px;"/> |
|
|
style="max-height: 80px;"/> |
|
|
</div> |
|
|
</div> |
|
|
<div t-attf-class="pull-#{o.theme_id.company_position} " |
|
|
|
|
|
t-attf-style="font:14px lucida-console,sans-serif; color:#{o.theme_id.company_text_color} !important;"> |
|
|
|
|
|
<span t-field="company.partner_id"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-field="company.partner_id.street"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-field="company.partner_id.street2"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-field="company.partner_id.city"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-field="company.partner_id.country_id"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-field="company.partner_id.vat"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<t t-call="web.external_layout"> |
|
|
<t t-call="web.external_layout"> |
|
|
<t t-set="o" |
|
|
<t t-set="o" |
|
|
t-value="o.with_context({'lang':o.partner_id.lang})"/> |
|
|
t-value="o.with_context({'lang':o.partner_id.lang})"/> |
|
|
<div class="page"> |
|
|
<div class="page"> |
|
|
<div class=" row mt32 mb32"> |
|
|
<div id="customer_address" |
|
|
<div class="col-12" style="padding-top:20px;"> |
|
|
t-attf-style="color:#{o.theme_id.customer_text_color}"> |
|
|
<div t-attf-class=" pull-#{o.theme_id.customer_position} text-#{o.theme_id.customer_position}" |
|
|
<div class="row"> |
|
|
style="font:15px lucida-console,sans-serif !important;"> |
|
|
<div t-attf-class="col-12 text-#{o.theme_id.customer_position} "> |
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
<div itemprop="address" class="address"> |
|
|
t-field="o.partner_id"/> |
|
|
<div> |
|
|
<br/> |
|
|
<span t-if="o.partner_id"> |
|
|
<span t-if="o.theme_id.address"> |
|
|
<span style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/> |
|
|
t-field="o.partner_id.street"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
|
|
|
t-field="o.partner_id.street2"/> |
|
|
|
|
|
</span> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-if="o.theme_id.city"> |
|
|
|
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
|
|
|
t-field="o.partner_id.city"/> |
|
|
|
|
|
</span> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
|
|
|
t-field="o.partner_id.state_id"/> |
|
|
|
|
|
<br/> |
|
|
|
|
|
<span t-if="o.theme_id.country"> |
|
|
|
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
|
|
|
t-field="o.partner_id.country_id"/> |
|
|
|
|
|
</span> |
|
|
</span> |
|
|
<br/> |
|
|
</div> |
|
|
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
<div> |
|
|
|
|
|
<span t-if="o.partner_id.vat"> |
|
|
|
|
|
<span style="color:#{o.theme_id.customer_text_color} !important;" |
|
|
t-field="o.partner_id.vat"/> |
|
|
t-field="o.partner_id.vat"/> |
|
|
<br/> |
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div t-attf-class="pull-right" |
|
|
<br/> |
|
|
|
|
|
<div class="page"> |
|
|
|
|
|
<div |
|
|
t-attf-style="font:15px lucida-console,sans-serif !important;background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};padding:2%"> |
|
|
t-attf-style="font:15px lucida-console,sans-serif !important;background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};padding:2%"> |
|
|
<h2> |
|
|
<h2> |
|
|
<span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')"> |
|
|
<span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')"> |
|
@ -111,31 +87,69 @@ |
|
|
<span t-field="o.name"/> |
|
|
<span t-field="o.name"/> |
|
|
</font> |
|
|
</font> |
|
|
</h2> |
|
|
</h2> |
|
|
<div t-if="o.invoice_date"> |
|
|
<br/> |
|
|
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
<div id="invoice_information"> |
|
|
<strong>Invoice Date:</strong> |
|
|
<div class="row mt32 mb32" id="informations"> |
|
|
<p t-field="o.invoice_date"/> |
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
</font> |
|
|
t-if="o.invoice_date" |
|
|
|
|
|
name="invoice_date"> |
|
|
|
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
|
|
|
Invoice Date: |
|
|
|
|
|
</strong> |
|
|
|
|
|
<p class="m-0" |
|
|
|
|
|
t-attf-style="color:#{o.theme_id.text_color}" |
|
|
|
|
|
t-field="o.invoice_date"/> |
|
|
</div> |
|
|
</div> |
|
|
<div t-if="o.name"> |
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted'" |
|
|
<strong>Due Date:</strong> |
|
|
name="due_date"> |
|
|
<p t-field="o.invoice_date_due"/> |
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
|
|
|
Due Date: |
|
|
|
|
|
</strong> |
|
|
|
|
|
<p class="m-0" |
|
|
|
|
|
t-attf-style="color:#{o.theme_id.text_color}" |
|
|
|
|
|
t-field="o.invoice_date_due"/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
|
|
|
t-if="o.invoice_payment_term_id" |
|
|
|
|
|
name="payment_term"> |
|
|
|
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
|
|
|
Payment Term: |
|
|
|
|
|
</strong> |
|
|
|
|
|
<p class="m-0" |
|
|
|
|
|
t-attf-style="color:#{o.theme_id.text_color}" |
|
|
|
|
|
t-field="o.invoice_payment_term_id"/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!--optional information--> |
|
|
|
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
|
|
|
t-if="o.user_id"> |
|
|
|
|
|
<div t-if="o.theme_id.sales_person"> |
|
|
|
|
|
<font t-attf-style="color:#{o.theme_id.text_color}"> |
|
|
|
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
|
|
|
Sales Person: |
|
|
|
|
|
</strong> |
|
|
|
|
|
<p t-field="o.user_id"/> |
|
|
</font> |
|
|
</font> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
|
|
|
t-if="o.ref"> |
|
|
<div t-if="o.theme_id.reference"> |
|
|
<div t-if="o.theme_id.reference"> |
|
|
<div t-if="o.ref"> |
|
|
<font t-attf-style="color:#{o.theme_id.text_color}"> |
|
|
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
<strong>Reference:</strong> |
|
|
Customer Reference: |
|
|
|
|
|
</strong> |
|
|
<p t-field="o.ref"/> |
|
|
<p t-field="o.ref"/> |
|
|
</font> |
|
|
</font> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="col-auto col-3 mw-100 mb-2" |
|
|
|
|
|
t-if="o.invoice_origin"> |
|
|
<div t-if="o.theme_id.source"> |
|
|
<div t-if="o.theme_id.source"> |
|
|
<div t-if="o.invoice_origin"> |
|
|
<font t-attf-style="color:#{o.theme_id.text_color}"> |
|
|
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
<strong t-attf-style="color:#{o.theme_id.heading_text_color}"> |
|
|
<strong>Source:</strong> |
|
|
Source: |
|
|
|
|
|
</strong> |
|
|
<p t-field="o.invoice_origin"/> |
|
|
<p t-field="o.invoice_origin"/> |
|
|
</font> |
|
|
</font> |
|
|
</div> |
|
|
</div> |
|
@ -164,7 +178,8 @@ |
|
|
Unit Price |
|
|
Unit Price |
|
|
</th> |
|
|
</th> |
|
|
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}" |
|
|
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}" |
|
|
t-if="display_discount" class="text-right" |
|
|
t-if="display_discount" |
|
|
|
|
|
class="text-right" |
|
|
groups="sale.group_discount_per_so_line"> |
|
|
groups="sale.group_discount_per_so_line"> |
|
|
Disc.(%) |
|
|
Disc.(%) |
|
|
</th> |
|
|
</th> |
|
@ -205,18 +220,21 @@ |
|
|
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_ids))"/> |
|
|
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_ids))"/> |
|
|
</td> |
|
|
</td> |
|
|
</span> |
|
|
</span> |
|
|
<td class="text-right" t-if="l.price_subtotal"> |
|
|
<td class="text-right" |
|
|
|
|
|
t-if="l.price_subtotal"> |
|
|
<span t-field="l.price_subtotal" |
|
|
<span t-field="l.price_subtotal" |
|
|
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> |
|
|
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
|
<div> |
|
|
<div class="clearfix mb-4"> |
|
|
<div class="col-4 pull-right"> |
|
|
<div class="col-4 pull-right"> |
|
|
<table class="table table-condensed"> |
|
|
<table class="table table-condensed"> |
|
|
<t t-set="tax_totals" t-value="json.loads(o.tax_totals_json)"/> |
|
|
<t t-set="tax_totals" |
|
|
<t t-foreach="tax_totals['subtotals']" t-as="subtotal"> |
|
|
t-value="json.loads(o.tax_totals_json)"/> |
|
|
|
|
|
<t t-foreach="tax_totals['subtotals']" |
|
|
|
|
|
t-as="subtotal"> |
|
|
<tr class="border-black o_subtotal"> |
|
|
<tr class="border-black o_subtotal"> |
|
|
<td> |
|
|
<td> |
|
|
<strong t-esc="subtotal['name']"/> |
|
|
<strong t-esc="subtotal['name']"/> |
|
@ -231,7 +249,8 @@ |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
|
|
|
|
|
|
<t t-set="subtotal_to_show" t-value="subtotal['name']"/> |
|
|
<t t-set="subtotal_to_show" |
|
|
|
|
|
t-value="subtotal['name']"/> |
|
|
<t t-call="account.tax_groups_totals"/> |
|
|
<t t-call="account.tax_groups_totals"/> |
|
|
</t> |
|
|
</t> |
|
|
|
|
|
|
|
@ -257,12 +276,49 @@ |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div style="padding-top:15%;" class="col-12"> |
|
|
|
|
|
<p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference" |
|
|
|
|
|
name="payment_communication"> |
|
|
|
|
|
Please use the following communication for |
|
|
|
|
|
your |
|
|
|
|
|
payment : |
|
|
|
|
|
<b> |
|
|
|
|
|
<span t-field="o.payment_reference"/> |
|
|
|
|
|
</b> |
|
|
|
|
|
</p> |
|
|
|
|
|
<p t-if="o.invoice_payment_term_id" |
|
|
|
|
|
name="payment_term"> |
|
|
|
|
|
<span t-field="o.invoice_payment_term_id.note"/> |
|
|
|
|
|
</p> |
|
|
|
|
|
<div t-if="not is_html_empty(o.narration)" |
|
|
|
|
|
name="comment"> |
|
|
|
|
|
<span t-field="o.narration"/> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<p t-if="not is_html_empty(o.fiscal_position_id.note)" |
|
|
|
|
|
name="note"> |
|
|
|
|
|
<span t-field="o.fiscal_position_id.note"/> |
|
|
|
|
|
</p> |
|
|
|
|
|
<p t-if="o.invoice_incoterm_id" name="incoterm"> |
|
|
|
|
|
<strong>Incoterm:</strong> |
|
|
|
|
|
<span t-field="o.invoice_incoterm_id.code"/> |
|
|
|
|
|
- |
|
|
|
|
|
<span t-field="o.invoice_incoterm_id.name"/> |
|
|
|
|
|
</p> |
|
|
|
|
|
<div id="qrcode" |
|
|
|
|
|
t-if="o.display_qr_code and o.amount_residual > 0"> |
|
|
|
|
|
<p t-if="qr_code_urls.get(o.id)"> |
|
|
|
|
|
<strong class="text-center">Scan me with |
|
|
|
|
|
your banking app. |
|
|
|
|
|
</strong> |
|
|
<br/> |
|
|
<br/> |
|
|
<br/> |
|
|
<br/> |
|
|
<br/> |
|
|
<img class="border border-dark rounded" |
|
|
<br/> |
|
|
t-att-src="qr_code_urls[o.id]"/> |
|
|
<br/> |
|
|
</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</t> |
|
|
</t> |
|
|
</template> |
|
|
</template> |
|
|