|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<!-- Copyright 2024 - TODAY, Wesley Oliveira <[email protected]> |
| 3 | + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
| 4 | +<odoo> |
| 5 | + <template |
| 6 | + id="assets_report" |
| 7 | + name="mis_builder_custom_reports" |
| 8 | + inherit_id="web.report_assets_common" |
| 9 | + > |
| 10 | + <xpath expr="." position="inside"> |
| 11 | + <link |
| 12 | + href="/mis_builder_custom_reports/static/src/css/report.css" |
| 13 | + rel="stylesheet" |
| 14 | + /> |
| 15 | + </xpath> |
| 16 | + </template> |
| 17 | + <template |
| 18 | + id="report_mis_report_instance" |
| 19 | + inherit_id="mis_builder.report_mis_report_instance" |
| 20 | + > |
| 21 | + <xpath expr="//t[@t-call='web.internal_layout']" position="attributes"> |
| 22 | + <attribute name="t-call">web.basic_layout</attribute> |
| 23 | + </xpath> |
| 24 | + <xpath expr="//div[@class='page']" position="before"> |
| 25 | + <t t-set="company_id" t-value="o.query_company_ids[0]" /> |
| 26 | + <div |
| 27 | + t-attf-class="header o_company_#{company_id.id}_layout" |
| 28 | + t-att-style="report_header_style" |
| 29 | + > |
| 30 | + <div class="row mb-3"> |
| 31 | + <div class="col-3"> |
| 32 | + <t t-set="company_id" t-value="o.query_company_ids[0]" /> |
| 33 | + <img |
| 34 | + t-if="company_id.logo" |
| 35 | + t-att-src="image_data_uri(company_id.logo)" |
| 36 | + style="max-height: 45px; border-right: 1px solid gray;" |
| 37 | + alt="Logo" |
| 38 | + /> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + <div class="row"> |
| 42 | + <div class="col-12"> |
| 43 | + <span |
| 44 | + style="text-decoration: underline; text-transform: uppercase;" |
| 45 | + t-field="company_id.legal_name" |
| 46 | + /> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + <div class="row"> |
| 50 | + <div class="col-12"> |
| 51 | + <span |
| 52 | + style="text-transform: uppercase;" |
| 53 | + t-field="o.description" |
| 54 | + /> |
| 55 | + </div> |
| 56 | + </div> |
| 57 | + <div class="row"> |
| 58 | + <div class="col-12"> |
| 59 | + <span>(In thousands of reais - R$)</span> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + <div |
| 63 | + t-if="company_id.logo or company_id.report_header" |
| 64 | + class="row zero_min_height" |
| 65 | + > |
| 66 | + <div class="col-12"> |
| 67 | + <div style="border-bottom: 1px solid black;" /> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + </xpath> |
| 72 | + <xpath expr="//div[@class='page']/h3" position="replace"> |
| 73 | + <h3 /> |
| 74 | + </xpath> |
| 75 | + <xpath |
| 76 | + expr="//div[hasclass('mis_tbody')]/t[@t-as='row']/div[hasclass('mis_row')]" |
| 77 | + position="attributes" |
| 78 | + > |
| 79 | + <attribute name="t-if"> |
| 80 | + not ((row.style_props.hide_empty and row.is_empty()) |
| 81 | + or row.style_props.hide_always) and row.row_id != "check" |
| 82 | + </attribute> |
| 83 | + </xpath> |
| 84 | + <xpath expr="//div[@class='page']/h3" position="after"> |
| 85 | + <div |
| 86 | + t-attf-class="footer o_standard_footer o_company_#{company_id.id}_layout" |
| 87 | + > |
| 88 | + <div class="row"> |
| 89 | + <div class="col-12"> |
| 90 | + <span |
| 91 | + style="text-decoration: underline; text-transform: uppercase;" |
| 92 | + t-field="company_id.legal_name" |
| 93 | + /> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + <div class="row"> |
| 97 | + <div class="col-12" name="company_address"> |
| 98 | + <span t-field="company_id.partner_id.street_name" />, |
| 99 | + <span t-field="company_id.partner_id.street_number" />, |
| 100 | + <t t-if="company_id.partner_id.street2"> |
| 101 | + <span t-field="company_id.partner_id.street2" />, |
| 102 | + </t> |
| 103 | + <span t-field="company_id.partner_id.district" />, |
| 104 | + <span t-field="company_id.partner_id.zip" />, |
| 105 | + <span t-field="company_id.partner_id.city_id.name" /> - |
| 106 | + <span t-field="company_id.partner_id.state_id.name" />, |
| 107 | + <span t-field="company_id.partner_id.country_id.name" /> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + </xpath> |
| 112 | + </template> |
| 113 | +</odoo> |
0 commit comments