odoo/addons/report/views/layout_templates.xml

218 lines
8.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report.assets_common">
<t t-call="web.less_helpers"/>
<link href="/web/static/src/less/import_bootstrap.less" rel="stylesheet" type="text/less"/>
<link href="/base/static/src/css/description.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/less" href="/web_editor/static/src/less/web_editor.common.less"/>
<!-- FIXME remove website dependency ..? -->
<link href="/website/static/src/less/website.wrapwrap.less" rel="stylesheet" type="text/less"/>
<link href="/website/static/src/less/website.snippets.less" rel="stylesheet" type="text/less"/>
<link href="/report/static/src/less/report.less" rel="stylesheet" type="text/less"/>
<link href="/web/static/lib/fontawesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
</template>
<template id="report.assets_pdf">
<link href="/report/static/src/css/reset.min.css" rel="stylesheet"/>
</template>
<template id="report.assets_editor">
<t t-call="web.less_helpers"/>
<link href="/report/static/src/less/report.editor.less" rel="stylesheet" type="text/less"/>
<script type="text/javascript" src="/web/static/src/js/services/session.js"></script>
<script type="text/javascript" src="/report/static/src/js/utils.js"></script>
<script type="text/javascript" src='/report/static/src/js/report.editor.js' />
</template>
<template id="layout" name="Report layout">&lt;!DOCTYPE html&gt;
<html t-att-lang="lang and lang.replace('_', '-')"
t-att-data-editable="'1' if editable else None"
t-att-data-translatable="'1' if translatable else None"
t-att-data-edit_translations="'1' if edit_translations else None"
t-att-data-main-object="repr(main_object) if editable else None"
t-att-data-report-margin-top="data_report_margin_top"
t-att-data-report-header-spacing="data_report_header_spacing"
t-att-data-report-dpi="data_report_dpi"
t-att-web-base-url="web_base_url">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1"/>
<title><t t-esc="title or 'Odoo Report'"/></title>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="report.assets_common" t-js="false"/>
<t t-if="editable">
<t t-call-assets="web_editor.summernote" t-js="false"/>
<t t-call-assets="web_editor.assets_editor" t-js="false"/>
<t t-call-assets="report.assets_editor" t-js="false"/>
</t>
<t t-if="editable">
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="web_editor.summernote" t-css="false"/>
<t t-call-assets="web_editor.assets_editor" t-css="false"/>
<t t-call-assets="report.assets_editor" t-css="false"/>
</t>
</head>
<body class="container">
<div id="wrapwrap">
<main>
<t t-raw="0"/>
</main>
</div>
</body>
</html>
</template>
<template id="html_container">
<t t-set="body_classname" t-value="'container'"/>
<t t-call="report.layout">
<t t-raw="0"/>
</t>
</template>
<template id="external_layout">
<!-- Multicompany -->
<t t-if="not o and doc">
<t t-set="o" t-value="doc"/>
</t>
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-call="report.external_layout_header" />
<t t-raw="0" />
<t t-call="report.external_layout_footer" />
</template>
<template id="external_layout_header">
<div class="header">
<div class="row">
<div class="col-xs-3">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:20px;" 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>
<div class="row">
<div class="col-xs-6" name="company_address">
<span t-field="company.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
style="border-bottom: 1px solid black; display:inline-block;"/>
</div>
</div>
</div>
</template>
<template id="external_layout_footer">
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul t-if="not company.custom_footer" class="list-inline">
<t t-set="company" t-value="company.sudo()"/>
<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>
<template id="internal_layout">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<div class="header">
<div class="row">
<div class="col-xs-3">
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/>
</div>
<div class="col-xs-2 col-xs-offset-2 text-center">
<span t-esc="company.name"/>
</div>
<div class="col-xs-2 col-xs-offset-3 text-right">
<ul class="list-inline">
<li><span class="page"/></li>
<li>/</li>
<li><span class="topage"/></li>
</ul>
</div>
</div>
</div>
<t t-raw="0" />
</template>
<template id="minimal_layout">
<t t-raw="'&lt;base href=%s&gt;' % base_url"/>
&lt;!DOCTYPE html&gt;
<html style="height: 0;">
<head>
<t t-call-assets="report.assets_pdf" t-js="false"/>
<t t-call-assets="report.assets_common" t-js="false"/>
<t t-call-assets="report.assets_pdf" t-css="false"/>
<t t-call-assets="report.assets_common" t-css="false"/>
<meta charset="utf-8"/>
<t t-if="subst is True">
<script>
function subst() {
var vars = {};
var x = document.location.search.substring(1).split('&amp;');
for (var i in x) {
var z = x[i].split('=', 2);
vars[z[0]] = unescape(z[1]);
}
var x=['frompage', 'topage', 'page', 'webpage', 'section', 'subsection', 'subsubsection'];
for (var i in x) {
var y = document.getElementsByClassName(x[i]);
for (var j=0; j&lt;y.length; ++j)
y[j].textContent = vars[x[i]];
}
}
</script>
</t>
</head>
<body class="container" onload="subst()">
<t t-raw="body"/>
</body>
</html>
</template>
</odoo>