### enable onboarding step sharing Purpose: Allow to use the same step (and progress) for multiple onboardings. This is required for the migration of some onboardings such as the `account` invoicing and sale `quotation` onboardings which both use common steps (s.g., "Set up company data"). This is done by mutating the onboarding - onboarding step relation and progress - progress step models relationships to m2m: * Progress step records are now linked to several progress records if the step they track is used in several onboardings. * There will still be multiple progress step records for per-company tracking, if applicable. ### Allow steps w/o onboarding This commit enables creating and tracking the completion of onboarding steps that are not included in an onboarding panel. Before this PR, such steps could already be defined and used. This is the case of the `payment_provider` step from the payment module, that could be included in an onboarding panel defined in website_sale_dashboard (both are migrated in later commits of this PR and related ENT). ### Support changing is_per_company Having onboarding (steps) being immutably per-company or not per-company is not convenient. We are here taking advantage of the migration of onboardings (next commits) to have a working framework for these changes. The alternative solution of having to change all onboardings and linked steps together and ensuring all or none are per-company was in fact more complex to support and fragile as depending on python constraints on the many2many relationship. We also considered it wasn't worth the complexity to identify which onboarding_progress record could safely be removed when its last 'per-company' step is updated to not per-company. In that case, all companies will have to close the panel independently, but the completion of each remaining step will not have to be done for each company. ### Miscellaneous #### add safe close action This eases the handling closing an onboarding panel that may have been deleted. The code for each panel can therefore be simplified. #### add onboarding step form controller Extracted from `appointment` to be reused in other modules' onboardings. We are also cleaning the closing behavior which is no longer required as dialogs now do close on save/discard. Tests are added and updated. Task-3025136 Part-of: odoo/odoo#104223
8 lines
250 B
Python
8 lines
250 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import onboarding_onboarding
|
|
from . import onboarding_onboarding_step
|
|
from . import onboarding_progress
|
|
from . import onboarding_progress_step
|