8000 [ADD] pos_layout: configurable POS receipt layouts with preview support by kame-odoo · Pull Request #762 · odoo/tutorials · GitHub
[go: up one dir, main page]

Skip to content

[ADD] pos_layout: configurable POS receipt layouts with preview support #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: 18.0
Choose a base branch
from

Conversation

kame-odoo
Copy link

Introduced a new pos_layout module to allow POS users to configure and
preview custom receipt layouts.
Added a "Configure Receipt Layout" button in POS settings.
Provided three layout options: Default, Lined, and Boxed.
Enabled configuration of receipt header and footer text.
The selected layout type is applied globally across all POS configs.
Live preview of the selected layout is shown in a modal wizard.
Layout type dynamically influences receipt rendering during printing.

kame-odoo added 5 commits May 9, 2025 10:27
This commit adds a Configure Receipt button to the POS settings view by
inheriting res.config.settings. When clicked, it opens a wizard allowing
users to select the receipt layout from three options: Default, Boxed, or
Lined , also allows you to change header footer and logo of the same.
This commit improves the Point of Sale receipt preview by conditionally
rendering one of three receipt templates—default, lined, or boxed
based on the selected display layout. The enhancement is achieved
by patching the existing OrderReceipt component and dynamically
modifying its rendering logic to reflect the chosen layout.
This commit adds test cases to validate behavior across all supported
layout types: default, lined, and boxed.
The tests ensure the receipt preview renders correctly for each layout,
confirming that the recent layout rendering changes work as intended.
This commit addresses minor styling issues removes unused code.
These changes improve code readability and maintain consistency
across all layout types.
…roller

Improved the /pos/get_display_layout controller to update the pos_disp_type
field for all POS configurations based on the layout selected in the active
POS session. This ensures consistent receipt layout across all POS terminals.
@robodoo
Copy link
robodoo commented May 12, 2025

Pull request status dashboard

kame-odoo added 3 commits May 12, 2025 14:06
updated controller in pos_layout module to
update the pos_disp_type field only for the POS configuration linked to the
active session, rather than updating all configurations globally.
This ensures layout changes apply strictly per-session context, respecting
multi-terminal setups. Also cleaned up unused and redundant code for clarity
and maintainability.
Cleaned up the pos_layout module by removing unused variables
and redundant code in the controller. Also fixed minor spacing and
indentation inconsistencies to improve code readability and
maintain coding standards.
Cleaned up the pos_layout module by removing unused variables
and redundant code in the controller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0