Skip to content

Commit

Permalink
Merge pull request #83 from Escodoo/14.0-add-mis_builder_custom_reports
Browse files Browse the repository at this point in the history
[14.0][RFC] mis_builder_custom_reports: refactor mis builder report footer
  • Loading branch information
marcelsavegnago authored Nov 12, 2024
2 parents d2bb0c1 + 02c30a0 commit 873fbb6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 18 deletions.
73 changes: 55 additions & 18 deletions mis_builder_custom_reports/report/mis_report_instance_qweb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,63 @@
<div
t-attf-class="footer o_standard_footer o_company_#{company_id.id}_layout"
>
<div style="padding: 10px 0;" />
<div class="mis_footer_line" />
<div class="row">
<div class="col-12">
<span
style="text-decoration: underline; text-transform: uppercase;"
t-field="company_id.legal_name"
/>
<div class="col-5" name="company_info">
<table>
<tbody>
<tr>
<td>
<div class="mis_footer_icon">
<div class="fa fa-2x fa-map-marker" />
</div>
</td>
<td class="mis_footer_text">
<span t-field="company_id.street_name" />,
<span t-field="company_id.street_number" />,
<t t-if="company_id.street2">
<span t-field="company_id.street2" />,
</t>
<span t-field="company_id.district" />,
<span t-field="company_id.city_id.name" /> -
<span t-field="company_id.state_id.code" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-12" name="company_address">
<span t-field="company_id.partner_id.street_name" />,
<span t-field="company_id.partner_id.street_number" />,
<t t-if="company_id.partner_id.street2">
<span t-field="company_id.partner_id.street2" />,
</t>
<span t-field="company_id.partner_id.district" />,
<span t-field="company_id.partner_id.zip" />,
<span t-field="company_id.partner_id.city_id.name" /> -
<span t-field="company_id.partner_id.state_id.name" />,
<span t-field="company_id.partner_id.country_id.name" />
<div class="col-3" name="phone">
<table>
<tbody>
<tr>
<td>
<div class="mis_footer_icon">
<div class="fa fa-2x fa-phone" />
</div>
</td>
<td class="mis_footer_text">
<span t-field="company_id.phone" />
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-4" name="website">
<table>
<tbody>
<tr>
<td>
<div class="mis_footer_icon">
<div class="fa fa-2x fa-globe" />
</div>
</td>
<td class="mis_footer_text">
<span t-field="company_id.website" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
Expand Down
22 changes: 22 additions & 0 deletions mis_builder_custom_reports/static/src/css/report.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
.mis_table .mis_cell.mis_amount {
text-align: center;
}
.mis_footer_line {
padding: 20px 0;
border-top: 2px solid #b294de;
}
.mis_footer_icon {
color: white;
background: #b294de;
width: 40px;
height: 40px;
border-radius: 100%;
display: table;
text-align: center;
}
.mis_footer_icon div {
display: table-cell;
vertical-align: middle;
}
.mis_footer_text {
padding-left: 10px;
display: table-cell;
vertical-align: middle;
}

0 comments on commit 873fbb6

Please sign in to comment.