Skip to content

[IMP] *: standardize POS config creation#1578

Draft
trcazier wants to merge 2 commits intoodoo:19.0from
odoo-dev:19.0-standardize-pos-config-trcaz
Draft

[IMP] *: standardize POS config creation#1578
trcazier wants to merge 2 commits intoodoo:19.0from
odoo-dev:19.0-standardize-pos-config-trcaz

Conversation

@trcazier
Copy link
Contributor

@trcazier trcazier commented Jan 20, 2026

Following task-5364749, we noticed there were some industries like art_craft that are creating their POS configs and journals manually, which is probably error prone and will create unwanted behaviors like duplicate account journals. Instead, we should call a function to load a scenario and modify the existing data.

Furthermore, thanks to this commit odoo/odoo#244246, we can, from the data that is being imported, infer whether or not the module is loaded with demo. Therefore, we can call, from the data, the load_onboarding_scenario functions with the additional parameter with_demo_data as True or False to load the scenario's default demo data in one go.
NB: at the moment, the retail scenario has no demo data that come with the function call, but the parameter still exists. The kiosk scenario however has no demo data parameter.

@robodoo
Copy link
Collaborator

robodoo commented Jan 20, 2026

Pull request status dashboard

@trcazier trcazier changed the title [IMP] *: WIP [IMP] *: standardize POS config creation Jan 20, 2026
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch 12 times, most recently from de19cb5 to 63e34eb Compare January 26, 2026 16:22
@trcazier trcazier closed this Jan 27, 2026
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch from 63e34eb to 1ea25d1 Compare January 27, 2026 08:59
@trcazier trcazier reopened this Jan 27, 2026
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch 5 times, most recently from 76c4764 to d3f6610 Compare February 2, 2026 16:19
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch 4 times, most recently from 8d9a85f to c5dcb91 Compare February 9, 2026 10:25
Copy link
Collaborator

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review to check with you before moving on

@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch from c5dcb91 to b0a1c8e Compare February 17, 2026 08:14
Copy link
Collaborator

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments are very dumb, some require a discussion. Let's discuss tomorrow

@@ -30,7 +34,7 @@ def test_payment_demo(self):
self.assertTrue(
self.env['ir.module.module']._get('payment_demo').state == 'installed',
"Payment Demo module should be installed in demo when Website Payment is installed. "
"Call 'button_immediate_install' on 'base.module_payment_demo' in demo."
"Call 'button_immediate_install' on 'base.module_payment_demo' in demo.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this linter for? 🤖

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch from b0a1c8e to d8171a8 Compare February 18, 2026 12:35
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch 3 times, most recently from a7e6503 to 607ace1 Compare February 19, 2026 08:14
Copy link
Collaborator

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks overall good to me, waiting for a functional approval

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="cash" model="account.journal">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wonder why it was there in the first place. To double-check.

Comment on lines +661 to +665
"pos.session record with id '%s' in file %s is not initialized. "
"Please initialize the session properly by setting state='opened' or 'closed' or add a call to action_pos_session_closing_control.",
record_id,
file_name,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent is weird. What does your linter say about it? 😈

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My linter says you are weird

{
'name': 'Wedding Planner',
'version': '1.0',
'version': '1.1',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no change here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized I'll have to bump twice because of the two commits 🤡

Following task-5364749, we noticed there were some industries like art_craft that are creating their POS configs and journals manually, which is probably error prone and will create unwanted behaviors like duplicate account journals. Instead, we should call a function to load a scenario and modify the existing data.

Furthermore, thanks to this commit odoo/odoo#244246, we can, from the data that is being imported, infer whether or not the module is loaded with demo. Therefore, we can call, from the data, the load_onboarding_scenario functions with the additional parameter with_demo_data as true or false to load the scenario's default demo data in one go.
So, all load_onboarding_scenario functions will be modified to include this toggle.
NB: at the moment, the retail scenario has no demo data that come with the function call, but the parameter still exists. The kiosk scenario however has no demo data parameter.

task-5468844
@trcazier trcazier force-pushed the 19.0-standardize-pos-config-trcaz branch from 607ace1 to 7f89c16 Compare February 20, 2026 09:38
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.

3 participants