[IMP] *: standardize POS config creation#1578
Conversation
de19cb5 to
63e34eb
Compare
63e34eb to
1ea25d1
Compare
76c4764 to
d3f6610
Compare
8d9a85f to
c5dcb91
Compare
vava-odoo
left a comment
There was a problem hiding this comment.
Preliminary review to check with you before moving on
c5dcb91 to
b0a1c8e
Compare
vava-odoo
left a comment
There was a problem hiding this comment.
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.", | |||
There was a problem hiding this comment.
what is this linter for? 🤖
There was a problem hiding this comment.
There was a problem hiding this comment.
b0a1c8e to
d8171a8
Compare
a7e6503 to
607ace1
Compare
vava-odoo
left a comment
There was a problem hiding this comment.
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"> | |||
There was a problem hiding this comment.
I really wonder why it was there in the first place. To double-check.
| "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, | ||
| ) |
There was a problem hiding this comment.
Indent is weird. What does your linter say about it? 😈
There was a problem hiding this comment.
My linter says you are weird
wedding_planner/__manifest__.py
Outdated
| { | ||
| 'name': 'Wedding Planner', | ||
| 'version': '1.0', | ||
| 'version': '1.1', |
There was a problem hiding this comment.
there is no change here
There was a problem hiding this comment.
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
607ace1 to
7f89c16
Compare


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_scenariofunctions with the additional parameterwith_demo_dataasTrueorFalseto 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.