Hello Everyone!
I'm trying to Modify Odoo 18 Community Document Layout of Invoices as appeared on the image below to look like that of standard POS paper size: 50mm/80mm.
How can I go about that?
Thanks in anticipation!

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I'm trying to Modify Odoo 18 Community Document Layout of Invoices as appeared on the image below to look like that of standard POS paper size: 50mm/80mm.
How can I go about that?
Thanks in anticipation!

Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit se| Related Posts | Odpovědi | Zobrazení | Aktivita | |
|---|---|---|---|---|
|
change between 2 Invoice formats
Vyřešeno
|
1
čvc 25
|
1711 | ||
|
2
čvc 25
|
2050 | |||
|
1
čvc 25
|
3007 | |||
|
3
dub 25
|
2911 | |||
|
3
dub 25
|
3882 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Hello,
If you want to customize the layout then Settings -> General Settings-> Companies -> Edit Layout.
Or if you want to add fields inside this layout then go with this- "view_base_document_layout"
@Codesphere Tech
Do you have Idea about the exact code? I know where to drop that.
Thanks!
It depends what you want to customize.. tell me what you want to change?
I just want it to appear in one tiny column so as to use a POS printer for printing the pages.
Thanks!
You can create a paper format for your custom size and then select here in Paper Format.
How please?
You check this blog from Cybrosys:
https://www.cybrosys.com/blog/overview-of-paper-format-in-odoo-18
Thanks for your reply, article on the link seems to be for paper size but not actually recoding them to be in a single column using the Qweb format.
<t t-name="web.external_layout_standard">
<div t-attf-class="header o_company_#{company.id}_layout">
<div class="d-flex justify-content-between align-items-center mb-2">
<img t-if="company.logo" class="o_company_logo_small" t-att-src="image_data_uri(company.logo)" alt="Logo"/>
<div t-if="company.report_header" t-field="company.report_header" class="o_company_tagline mw-50 fw-bold">Company tagline</div>
</div>
<div class="row">
<div class="col-6" name="company_address">
<ul class="list-unstyled" name="company_address_list">
<li t-if="company.is_company_details_empty"><span t-field="company.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}">
<div class="bg-light border-1 rounded h-100 d-flex flex-column align-items-center justify-content-center p-4 w-100 opacity-75 text-muted text-center">
<strong>Company address block</strong>
<div>Contains the company address.</div>
</div>
</span></li>
<li t-else="">
<span t-field="company.company_details">
<div class="bg-light border-1 rounded h-100 d-flex flex-column align-items-center justify-content-center p-4 w-100 opacity-75 text-muted text-center">
<strong>Company details block</strong>
<div>Contains the company details.</div>
</div>
</span>
</li>
<li t-if="not forced_vat"/>
<li t-else="">
<t t-esc="company.country_id.vat_label or 'Tax ID'">Tax ID</t>:
<span t-esc="forced_vat">US12345671</span>
</li>
</ul>
</div>
</div>
</div>
<div t-attf-class="article o_report_layout_standard o_table_standard o_company_#{company.id}_layout o_snail_mail {{'o_report_layout_background' if company.layout_background != 'Blank' else ''}}" t-attf-style="background-image: url({{ 'data:image/png;base64,%s' % company.layout_background_image.decode('utf-8') if company.layout_background_image and company.layout_background == 'Custom' else '/base/static/img/demo_logo_report.png' if company.layout_background == 'Demo logo' else ''}});" 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-call="web.address_layout"/>
<h2 t-out="layout_document_title"/>
<t t-out="0"/>
</div>
<div t-attf-class="footer o_company_#{company.id}_layout {{report_type != 'pdf' and 'mt-auto'}}">
<div class="o_footer_content d-flex border-top pt-2">
<div class="flex-grow-1 text-start me-2" t-field="company.report_footer"/>
<div class="text-end text-muted">
<div t-if="report_type == 'pdf' and display_name_in_footer" t-out="o.name">(document name)</div>
<div t-if="report_type == 'pdf'">Page <span class="page"/> / <span class="topage"/></div>
</div>
</div>
</div>
</t>
I think the code above is generating the invoice, how to exactly customize the above to render a single column to fit my tiny paper size is the problem.
Can you provide an example that what you want to update in this layout?