ME Multi Paperformat
by Bojan Mijuskovic https://www.montexel.com , Montex-Elektronika https://www.montexel.comAvailability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 33 |
Technical Name |
me_multi_paperformat |
License | LGPL-3 |
Website | https://www.montexel.com |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 33 |
Technical Name |
me_multi_paperformat |
License | LGPL-3 |
Website | https://www.montexel.com |
ME Multi Paperformat
Enhanced paperformat selection for multicompany environments
Problem Solved
In standard Odoo, when using multicompany environments, reports often use the paperformat of the main company (usually company ID 1) regardless of which company the user is currently logged into or which company the record belongs to. This can lead to inconsistent report layouts and incorrect paper sizes.
ME Multi Paperformat solves this problem by automatically selecting the correct paperformat based on the company of the record being printed, ensuring consistent and correct report layouts across all companies.
Key Features
Company-Aware Paperformat Selection
Automatically selects the correct paperformat based on the company of the record being printed, ensuring consistent layouts across all your companies.
Smart Detection
Uses intelligent detection to identify the correct record and company when generating reports, whether viewed directly or downloaded.
Technical Implementation
The module extends the get_paperformat
method in ir.actions.report
to:
- First check if the report has a specific paperformat defined
- Extract the record ID from the URL path when viewing a report directly
- Find the company associated with that record
- Use the document layout paperformat for that company if available
- Fall back to the company's default paperformat if needed
This implementation ensures that reports always use the correct paperformat without requiring any manual configuration from users.
Important Notes
- Company Context: Always be aware of which company you are logged into when designing report templates
- Document Layouts: Configure document layouts for each company to ensure proper paperformat selection
- Testing: Test reports in different companies to ensure they use the correct paperformats
Compatibility
This module is compatible with Odoo 16.0 Community and Enterprise editions.
Support
For questions or support, please contact us at: bojan.mijuskovic@montex.me
Please log in to comment on this module