Skip to content

Instantly share code, notes, and snippets.

Created August 1, 2016 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/435724e8c6b1f160a554adad1b51402a to your computer and use it in GitHub Desktop.
Save anonymous/435724e8c6b1f160a554adad1b51402a to your computer and use it in GitHub Desktop.
.DemoClass
{
width: 90%;
position: absolute;
height: 70%;
background-color:gray;
left:auto;
right:auto;
}
.TextDemoClass
{
font-size:30px;
color:white;
text-align:center;
}
body {
background-color: #fff;
color: #111;
margin: 0;
padding: 0;
font: 1.5em "Lucida Grande", "Lucida Sans Unicode",
"Lucida Sans", Verdana, Tahoma, sans-serif;
}
.wrapper {
width: 80%;
margin: 20px auto 40px auto;
}
.datatable {
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:20px;
width: 100%;
border: 0px solid #d6dde6;
border-collapse: collapse;
}
.datatable td {
border: 0px solid #d6dde6;
padding: 0.3em;
}
.datatable th {
border-bottom: 1px solid black;
border-top: 0px solid black;
background-color: #fffff;
font-weight: bold;
text-align: right;
padding-left: 0.3em;
padding-right: 0.3em;
}
.datatable caption {
font: bold 110% Arial, Helvetica, sans-serif;
color: #33517a;
text-align: left;
padding: 0.4em 0 0.8em 0;
}
.datatable tr:nth-child(odd) {
background-color: #E8F0FA;
color: #000000;
}
.comanda {
color: #111;
margin-top: 20px;
margin-bottom:0;
margin-left:0;
margin-right:0;
padding: 0;
font: 1.5em "Lucida Grande", "Lucida Sans Unicode",
"Lucida Sans", Verdana, Tahoma, sans-serif;
}
.comanda span {
background-color: #E8F0FA;
}
.datatable_total {
margin-top:0;
margin-left:0;
margin-right:auto;
margin-bottom:0px;
width: 100%;
border: 1px solid black;
border-collapse: collapse;
}
.datatable_total td {
border: 0px solid #d6dde6;
padding: 0.3em;
}
img.resize_logo{
max-width:80%;
max-height:150px;
float: left;
}
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="sale.report_saleorder_document">
<t t-set="company" t-value="res_company" />
<div class="header">
<div class="row mt0 mb0">
<div class="col-xs-4">
<!-- <img class="resize_logo" t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height:45px; align:left; padding-bottom: 7px;"/> -->
<img class="resize_logo" t-if="company.logo" t-att-src="'/report_sd/static/src/img/logo_SD.png'" style=" padding-bottom: 7px;"/>
</div>
<div class="col-xs-8 text-right" style="margin-top:10px;" t-field="company.rml_header1"/>
</div>
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-3" name="company_address">
<div t-field="company.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" style="border-bottom: 1px solid black;"/>
</div>
</div>
</div>
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-6">
<strong t-if="doc.partner_shipping_id == doc.partner_invoice_id">Invoicing and shipping address:</strong>
<strong t-if="doc.partner_shipping_id != doc.partner_invoice_id">Invoicing address:</strong>
<div t-field="doc.partner_invoice_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
<p t-if="doc.partner_id.vat">VAT: <span t-field="doc.partner_id.vat"/></p>
<div t-if="doc.partner_shipping_id != doc.partner_invoice_id" class="mt8">
<strong>Shipping address:</strong>
<div t-field="doc.partner_shipping_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
<p t-if="doc.partner_id.vat">VAT: <span t-field="doc.partner_id.vat"/></p>
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-field="doc.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
</div>
</div>
<div class="comanda">
<span t-if="doc.state not in ['draft','sent']">Order # </span>
<span t-if="doc.state in ['draft','sent']">Quotation # </span>
<span t-field="doc.name"/>
</div>
<div class="row mt32 mb32" id="informations">
<div t-if="doc.date_order" class="col-xs-3">
<strong t-if="doc.state not in ['draft','sent']">Date Ordered:</strong>
<strong t-if="doc.state in ['draft','sent']">Quotation Date:</strong>
<p t-field="doc.date_order" t-field-options='{"format": "dd/MMM/yyyy"}'/>
</div>
<div t-if="doc.client_order_ref" class="col-xs-3">
<strong>Your Reference:</strong>
<p t-field="doc.client_order_ref"/>
</div>
<div t-if="doc.user_id.name" class="col-xs-3">
<strong>Salesperson:</strong>
<p t-field="doc.user_id"/>
</div>
<div name="payment_term" t-if="doc.payment_term_id" class="col-xs-3">
<strong>Payment Term:</strong>
<p t-field="doc.payment_term_id"/>
</div>
</div>
<!-- Is there a discount on at least one line? -->
<t t-set="display_discount" t-value="any([l.discount for l in doc.order_line])"/>
<table class="datatable">
<thead>
<tr style="background-color:white;">
<th style="width: 95px; text-align:left;">Art.</th>
<th style="width: 200px; text-align:left;">Description</th>
<th style="width: 75px">Quantity</th>
<th style="width: 75px">Price</th>
<th t-if="display_discount" groups="sale.group_discount_per_so_line" style="width: 75px">Disc.(%)</th>
<!-- <th class="text-right">Taxes</th> -->
<th style="width: 140px">Price</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-foreach="doc.order_line" t-as="l">
<tr t-if="l.product_uom_qty">
<td>
<span t-field="l.product_id"/>
</td>
<td>
<span t-field="l.product_id.description_sale"/>
<!-- <span t-field="l.name"/> -->
</td>
<td class="text-right">
<span t-field="l.product_uom_qty"/>
<span groups="product.group_uom" t-field="l.product_uom"/>
</td>
<td class="text-right">
<span t-field="l.price_unit"/>
</td>
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
<span t-field="l.discount"/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
</t>
</tbody>
</table>
<div class="row" name="total">
<div class="col-xs-4 pull-right">
<!-- <table class="table table-condensed table-bordered delivery_data" style="background-color:white; border:thin solid black;"> -->
<table class="datatable_total">
<tr style="background-color:white; border:thin solid black;">
<td style="width: 300px"><strong>Total Without Taxes</strong></td>
<td class="text-right" style="width: 170px">
<span t-field="doc.amount_untaxed"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="doc.amount_tax"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr style="background-color:#E8F0FA;">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="doc.amount_total"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</div>
<p t-field="doc.note" />
<p t-if="doc.payment_term_id.note">
<span t-field="doc.payment_term_id.note"/>
</p>
<p t-if="not doc.payment_term_id and doc.partner_id.property_payment_term_id">
<span t-field="doc.partner_id.property_payment_term_id.note"/>
</p>
<p id="fiscal_position_remark" t-if="doc.fiscal_position_id and doc.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.note"/>
</p>
<div class="oe_structure"/>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul t-if="not company.custom_footer" class="list-inline">
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.fax and company.phone">&amp;bull;</li>
<li t-if="company.fax">Fax: <span t-field="company.fax"/></li>
<li t-if="company.email and company.fax or company.email and company.phone">&amp;bull;</li>
<li t-if="company.email">Email: <span t-field="company.email"/></li>
<li t-if="company.website and company.email or company.website and company.fax or company.website and company.phone">&amp;bull;</li>
<li t-if="company.website">Website: <span t-field="company.website"/></li>
</ul>
<ul t-if="not company.custom_footer" class="list-inline" name="financial_infos">
<li t-if="company.vat">TIN: <span t-field="company.vat"/></li>
</ul>
<t t-if="company.custom_footer">
<span t-raw="company.rml_footer"/>
</t>
<ul class="list-inline">
<li>Page:</li>
<li><span class="page"/></li>
<li>/</li>
<li><span class="topage"/></li>
</ul>
</div>
</div>
</template>
</data>
</openerp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment