Files
odoo_source/addons/spreadsheet/views/public_readonly_spreadsheet_templates.xml
T
Rémi Rahir (rar) 542b3b97ed [IMP] spreadsheet*: Add a print mode for spreadsheets
The current spreadsheet layout is not adapted to print the document as
the spreadsheet component is designed to only be rendered in the visible
part of the client viewport, the invisible parts of the spreadsheet are
not rendered.

This revision adds the possibility to render the whole spreadsheet when
the user wants to print the document (either via a top menu button or
with the generic shortcut Ctrl+P).

closes odoo/odoo#140281

Task: 3575484
Related: odoo/enterprise#49829
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-07 17:57:11 +00:00

40 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="spreadsheet.public_spreadsheet_layout" name="Public spreadsheet layout">
<t t-call="web.layout">
<t t-set="head">
<script>
odoo.__session_info__ = <t t-out="json.dumps(session_info)"/>;
odoo.__session_info__.spreadsheet_public_props = <t t-out="json.dumps(props)"/>;
</script>
<t t-call-assets="spreadsheet.public_spreadsheet"/>
</t>
<div class="d-flex flex-column justify-content vh-100 o-public-spreadsheet">
<header class="container-fluid p-0 d-flex align-items-center justify-content-between border-bottom">
<div t-out="spreadsheet_name" class="text-primary fw-bold ps-3"/>
<div class="fst-italic flex-fill ps-3">
Frozen and copied on <span t-field="share.create_date"/>
<div class="d-inline-flex">
<a class="btn btn-secondary btn-block o_download_btn" t-att-href="props['downloadExcelUrl']" title="Download"><i class="fa fa-download"/></a>
</div>
</div>
<div class="d-table my-auto">
<t t-call="portal.user_dropdown">
<t t-set="_user_name" t-value="True"/>
<t t-set="_item_class" t-valuef="nav-item d-table-cell text-center"/>
<t t-set="_link_class" t-valuef="nav-link fw-bold"/>
</t>
<t t-call="portal.user_sign_in_redirect">
<t t-set="_item_class" t-valuef="nav-item d-table-cell text-center"/>
<t t-set="_link_class" t-valuef="nav-link fw-bold"/>
</t>
</div>
</header>
<main id="spreadsheet-mount-anchor" class="flex-fill"/>
</div>
</t>
</template>
</odoo>