Hi,
You can create a custom paper format through the UI
or by using code. The page number is already shown in the report by
default. To display the printed date, you need to create a custom
layout. A Python file is not required, as the report is connected to the
model through the report action using the binding ID, which allows you
to access all data from that model.
1. Custom Paper Format
Settings-> Technical-> reporting-> Paper Formats.

- Landscape orientation can be set using the Orientation field
- Choose Pro-forma Invoice in the Associated Reports field.
- You can set the top, bottom, left, and right margins as needed.
2. Custom Layout
Sample custom layout
<template id="report_custom_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>
<div class="header">
<div class="row">
<img t-if="company.custom_report_header"
t-att-src="image_data_uri(company.custom_report_header)"
alt="Logo" width="100%"/>
</div>
</div>
<div class="footer o_standard_footer" style="position: relative;">
<div style="width: 100%;">
<div class="row"
style="display: -webkit-box; display: flex; -webkit-justify-content: space-between; justify-content: space-between; width: 100%;">
<div class="col-4 text-center" style="font-size: 10px;">
<span t-esc="time.strftime('%Y-%m-%d')"/>-
<span t-esc="time.strftime('%H:%M')"/>
</div>
<div class="col-4 text-center" style="font-size: 10px;">
<span>Page</span>
<span class="page"/>/
<span class="topage"/>
</div>
</div>
</div>
<div style="width: 100%;">
<img t-if="company.custom_report_footer"
t-att-src="image_data_uri(company.custom_report_footer)"
alt="Logo" width="100%"/>
</div>
</div>
<div class="article o_report_layout_standard"
t-att-data-oe-model="o and o._name"
t-att-data-oe-id="o and o.id"
t-att-data-oe-lang="o and o.env.context.get('lang')">
<t t-raw="0"/>
</div>
</template>
<div class="col-4 text-center" style="font-size: 10px;">
<span t-esc="time.strftime('%Y-%m-%d')"/>-
<span t-esc="time.strftime('%H:%M')"/>
</div>
This code indicates - printed date and time
3. Inherit Pro-Forma Invoice
<template id="sale_order_report_saleorder_document"
inherit_id="sale.report_saleorder_document">
<xpath expr="//t[@t-call='web.external_layout']" position="replace">
<t t-call="module_name.report_custom_external_layout">
<!-- Details-->
</t>
</xpath>
</template>
Hope it helps.