diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 746d942e..0a90069c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,17 +2,10 @@ exclude: | (?x) # NOT INSTALLABLE ADDONS - ^accountancy_install/| ^base_mail_security/| ^base_partner_security/| ^base_user_limit/| - ^community_org_install/| ^container_hr_recruitment/| - ^container_install_standard/| - ^project_org_install/| - ^services_org_install/| - ^trade_org_install/| - ^university_org_install/| # END NOT INSTALLABLE ADDONS # Files and folders generated by bots, to avoid loops ^setup/|/static/description/index\.html$| diff --git a/accountancy_install/__init__.py b/account_install/__init__.py similarity index 100% rename from accountancy_install/__init__.py rename to account_install/__init__.py diff --git a/account_install/__manifest__.py b/account_install/__manifest__.py new file mode 100644 index 00000000..ae296428 --- /dev/null +++ b/account_install/__manifest__.py @@ -0,0 +1,58 @@ +{ + "name": "Accounting", + "summary": "Invoices, Contracts & Payments", + "author": "Onestein", + "category": "Accounting", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "account", + "account_payment_mode", + "account_payment_order", + "account_payment_partner", + "account_fiscal_position_vat_check", + "account_invoice_constraint_chronology", + "account_invoice_line_default_account", + "account_journal_lock_date", + "account_lock_date_update", + "account_move_print", + "account_usability", + "base_vat_optional_vies", + "account_reconcile_oca", + "account_statement_base", + "account_payment_sale", + "product_margin", + "account_financial_report", + "product_category_product_link", + "account_statement_import_camt", + "account_statement_import_camt54", + "account_statement_import_file_reconcile_oca", + "account_period_auto_create", + "account_statement_import_online_ponto", + "account_statement_import_online_ponto_statement_creation_mode", + "account_statement_import_sheet_file", + "account_statement_import_sheet_file_sheet_mappings", + "account_move_line_attachment_preview", + "account_configuration", + "account_invoice_overdue_reminder", + "account_move_line_tax_editable", + "account_move_tier_validation", + "account_statement_import_online_paypal", + "contract", + "contract_payment_mode", + "currency_rate_update", + "l10n_nl_rgs", + "l10n_nl_rgs_usability", + "l10n_nl_rgs_mis_report", + "l10n_nl_rgs_account_financial_report", + "l10n_nl_rgs_asset", + "l10n_nl_bank", + "l10n_nl_xaf_auditfile_export", + "l10n_nl_tax_statement", + "l10n_nl_tax_statement_date_range", + "l10n_nl_tax_statement_icp", + "mollie_account_sync", + "payment_mollie_official", + ], + "bundle": True, +} diff --git a/account_install/static/description/icon.png b/account_install/static/description/icon.png new file mode 100644 index 00000000..bf531700 Binary files /dev/null and b/account_install/static/description/icon.png differ diff --git a/accountancy_install/__manifest__.py b/accountancy_install/__manifest__.py deleted file mode 100644 index ea012b18..00000000 --- a/accountancy_install/__manifest__.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2023 Onestein BV -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - -{ - "name": "Accountancy Install", - "summary": """ - This module installs all default Accountancy modules""", - "version": "16.0.1.0.0", - "category": "Accounting & Finance", - "license": "AGPL-3", - "author": "Onestein BV, André Schenkels", - "website": "https://www.onestein.eu", - "depends": [ - "account_configuration", - "container_install_standard", - # PREOCA? - "l10n_nl_rgs", - "l10n_nl_rgs_account_financial_report", - "l10n_nl_rgs_asset", - "l10n_nl_rgs_mis_report", - # BASE - "payment_mollie", - "sale_stock", - "sale_management", - # COMMUNITY - # OCA account-financial-reporting - "account_financial_report", - # OCA account-financial-tools - "account_asset_management", - "account_spread_cost_revenue", - "account_fiscal_position_vat_check", - "account_invoice_constraint_chronology", - "account_journal_lock_date", - "account_lock_date_update", - "account_move_line_purchase_info", - "account_move_line_sale_info", - "account_move_line_tax_editable", - "account_move_print", - "account_usability", - "base_vat_optional_vies", - # OCA account-invoicing - "account_move_tier_validation", - # OCA account-reconcile - "account_reconcile_oca", - # OCA bank-payment - "account_banking_pain_base", - "account_banking_sepa_credit_transfer", - "account_banking_sepa_direct_debit", - "account_payment_sale", - # OCA bank-statement-import - "account_statement_import_camt", - "account_statement_import_camt54", - "account_statement_import_online_paypal", - "account_statement_import_online_ponto", - "account_statement_import_sheet_file", - # OCA credit-control - "account_invoice_overdue_reminder", - # OCA currency - "currency_rate_update", - # OCA l10n-netherlands - "l10n_nl_bank", - "l10n_nl_bsn", - "l10n_nl_postcode", - "l10n_nl_tax_statement", - "l10n_nl_tax_statement_date_range", - "l10n_nl_tax_statement_icp", - "l10n_nl_xaf_auditfile_export", - # OCA mis-builder - "mis_builder", - "mis_builder_budget", - # OCA product-attribute - "product_category_product_link", - # OCA reporting-engine - "report_qr", - "report_qweb_parameter", - "report_wkhtmltopdf_param", - "report_xlsx", - "report_xlsx_helper", - # OCA server-brand - "disable_odoo_online", - "remove_odoo_enterprise", - # OCA server-tools - # OCA server-ux - "date_range", - # OCA stock-logistics-warehouse - "account_move_line_stock_info", - # OCA web - "web_no_bubble", - "web_responsive", - "web_search_with_and", - # THIRD-PARTY - "mollie_account_sync", - "payment_mollie_official", - ], - "data": [], - "installable": False, -} diff --git a/base_module_bundle/__init__.py b/base_module_bundle/__init__.py new file mode 100644 index 00000000..aee8895e --- /dev/null +++ b/base_module_bundle/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import wizards diff --git a/base_module_bundle/__manifest__.py b/base_module_bundle/__manifest__.py new file mode 100644 index 00000000..35ae3885 --- /dev/null +++ b/base_module_bundle/__manifest__.py @@ -0,0 +1,10 @@ +{ + "name": "Module Bundles", + "category": "Technical", + "version": "16.0.1.0.0", + "author": "Onestein", + "website": "https://onestein.nl", + "depends": ["base_setup"], + "data": [], + "license": "LGPL-3", +} diff --git a/base_module_bundle/models/__init__.py b/base_module_bundle/models/__init__.py new file mode 100644 index 00000000..8e2d2d1b --- /dev/null +++ b/base_module_bundle/models/__init__.py @@ -0,0 +1 @@ +from . import ir_module_module diff --git a/base_module_bundle/models/ir_module_module.py b/base_module_bundle/models/ir_module_module.py new file mode 100644 index 00000000..204c1504 --- /dev/null +++ b/base_module_bundle/models/ir_module_module.py @@ -0,0 +1,44 @@ +from odoo import conf, fields, models + + +class IrModuleModule(models.Model): + _inherit = "ir.module.module" + + is_bundle = fields.Boolean( + help="A bundle purges dependencies on uninstallation of this module", + compute="_compute_is_bundle", + ) # Can't be stored + + def _compute_is_bundle(self): + for module in self: + module_info = self.get_module_info(module.name) + module.is_bundle = module_info.get("bundle", False) + + def _get_modules_to_uninstall_for_bundle(self): + self.ensure_one() + other_installed_bundle_modules = self.search( + [("state", "=", "installed"), ("id", "!=", self.id)] + ).filtered(lambda m: m.is_bundle) + modules_to_keep = self.search([("name", "in", conf.server_wide_modules)]) + modules_to_keep += other_installed_bundle_modules.upstream_dependencies( + exclude_states=("uninstalled",) + ) + modules_to_keep = set(modules_to_keep) + modules_to_remove = self.upstream_dependencies(exclude_states=("uninstalled",)) + modules_to_remove = modules_to_remove.filtered( + lambda d: d not in modules_to_keep + ) + return modules_to_remove + + def button_uninstall(self): + """ + Uninstall upstream modules but only if they're not in another bundle modules dependency. + This will not be invoked if a dependency of a bundle is uninstalled, only when a bundle is directly uninstalled + """ + modules = self.search([("state", "=", "installed")]) + bundle_modules = modules.filtered(lambda m: m.is_bundle) + for to_uninstall in self.filtered(lambda m: m in bundle_modules): + modules_to_remove = to_uninstall._get_modules_to_uninstall_for_bundle() + modules_to_remove.write({"state": "to remove"}) + + return super().button_uninstall() diff --git a/base_module_bundle/wizards/__init__.py b/base_module_bundle/wizards/__init__.py new file mode 100644 index 00000000..d0362e4b --- /dev/null +++ b/base_module_bundle/wizards/__init__.py @@ -0,0 +1 @@ +from . import base_module_uninstall diff --git a/base_module_bundle/wizards/base_module_uninstall.py b/base_module_bundle/wizards/base_module_uninstall.py new file mode 100644 index 00000000..6d9f98e6 --- /dev/null +++ b/base_module_bundle/wizards/base_module_uninstall.py @@ -0,0 +1,16 @@ +from odoo import api, models + + +class ModuleUninstall(models.TransientModel): + _inherit = "base.module.uninstall" + + def _get_modules(self): + modules = super()._get_modules() + if not self.module_id.is_bundle: + return modules + modules += self.module_id._get_modules_to_uninstall_for_bundle() + return modules + + @api.depends("module_id.is_bundle") + def _compute_module_ids(self): + return super()._compute_module_ids() diff --git a/base_onboarding/__manifest__.py b/base_onboarding/__manifest__.py index 98d66e15..0cea06d0 100644 --- a/base_onboarding/__manifest__.py +++ b/base_onboarding/__manifest__.py @@ -4,11 +4,11 @@ { "name": "Onboarding", "author": "Onestein", - "website": "https://www.onestein.eu", + "website": "https://onestein.nl", "category": "Extra Tools", "version": "16.0.1.0.0", "license": "AGPL-3", - "depends": ["website", "multi_step_wizard", "web", "mail"], + "depends": ["multi_step_wizard", "web", "mail"], "data": [ "security/res_groups.xml", "security/ir.model.access.csv", diff --git a/base_onboarding/models/__init__.py b/base_onboarding/models/__init__.py index a6da6c56..21a04f03 100644 --- a/base_onboarding/models/__init__.py +++ b/base_onboarding/models/__init__.py @@ -1,2 +1,2 @@ -from . import ir_module_module from . import base_document_layout +from . import ir_module_module diff --git a/base_onboarding/models/ir_module_module.py b/base_onboarding/models/ir_module_module.py index 1157d739..3fa70bf0 100644 --- a/base_onboarding/models/ir_module_module.py +++ b/base_onboarding/models/ir_module_module.py @@ -1,29 +1,17 @@ -from odoo import api, models +from odoo import models class IrModuleModule(models.Model): _inherit = "ir.module.module" - @api.model - def _fields_view_get( - self, view_id=None, view_type="form", toolbar=False, submenu=False - ): - if ( - view_type == "kanban" - and self.env.context.get("active_model") == "base.onboarding.wizard" - ): - view_id = self.env.ref("website.theme_view_kanban").id - return super()._fields_view_get( - view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu - ) + def button_immediate_install(self): + res = super().button_immediate_install() + if self.env.context.get("onboarding_wizard", False): + return {"type": "ir.actions.act_url", "url": "/web", "target": "self"} + return res - def button_choose_theme(self): - res = super().button_choose_theme() - if self.env.context.get("active_model") == "base.onboarding.wizard": - wizard = self.env["base.onboarding.wizard"].search( - [("id", "=", self.env.context.get("active_id"))] - ) - if wizard.state == "theme": - wizard.open_next() - res = wizard._reopen_self() + def button_immediate_uninstall(self): + res = super().button_immediate_uninstall() + if self.env.context.get("onboarding_wizard", False): + return {"type": "ir.actions.act_url", "url": "/web", "target": "self"} return res diff --git a/base_onboarding/wizards/onboarding_wizard.py b/base_onboarding/wizards/onboarding_wizard.py index 34972ed0..adecc1ec 100644 --- a/base_onboarding/wizards/onboarding_wizard.py +++ b/base_onboarding/wizards/onboarding_wizard.py @@ -6,131 +6,118 @@ class OnboardingWizard(models.TransientModel): _inherit = ["multi.step.wizard.mixin"] _description = "Onboarding Wizard" - def _default_website(self): - website = self.env["website"].search( - [("company_id", "=", self.env.company.id)], limit=1 - ) - if ( - not website - ): # Get the first available website if there's no website found for the current active company - website = self.env["website"].search([], limit=1) - return website - company_id = fields.Many2one( comodel_name="res.company", default=lambda self: self.env.company ) - - website_id = fields.Many2one(comodel_name="website", default=_default_website) - company_logo = fields.Binary(related="company_id.logo", readonly=False) - company_vat = fields.Char(related="company_id.vat", readonly=False) - company_registry = fields.Char( related="company_id.company_registry", readonly=False ) - company_phone = fields.Char(related="company_id.phone", readonly=False) - company_email = fields.Char(related="company_id.email", readonly=False) - company_website = fields.Char(related="company_id.website", readonly=False) - website_name = fields.Char(related="website_id.name", readonly=False) - fetchmail_server_id = fields.Many2one( comodel_name="fetchmail.server", string="Incoming Mail Server" ) - ir_mail_server_id = fields.Many2one( comodel_name="ir.mail_server", string="Outgoing Mail Server" ) - social_twitter = fields.Char(related="website_id.social_twitter", readonly=False) - social_facebook = fields.Char(related="website_id.social_facebook", readonly=False) - social_linkedin = fields.Char(related="website_id.social_linkedin", readonly=False) - social_youtube = fields.Char(related="website_id.social_youtube", readonly=False) - social_instagram = fields.Char( - related="website_id.social_instagram", readonly=False - ) - theme_module_ids = fields.Many2many( - comodel_name="ir.module.module", compute="_compute_theme_module_ids" + module_ids = fields.Many2many( + comodel_name="ir.module.module", compute="_compute_module_ids" ) + @api.depends("state") + def _compute_module_ids(self): + installable_module_names = [ + "account_install", + "website_install", + "website_sale_install", + "website_membership_install", + "membership_development_install", + "membership_install", + "hr_install", + "helpdesk_install", + "stock_install", + "mass_mailing_install", + "crm_install", + "project_install", + "event_install", + "website_event_install", + "sale_install", + ] + installable_modules = self.env["ir.module.module"].search( + [("name", "in", installable_module_names)] + ) + for wizard in self: + wizard.module_ids = installable_modules + + @api.depends("state") + def _compute_allow_back(self): + for record in self: + record.allow_back = record.state != "start" + def _reopen_self(self): action = super()._reopen_self() action["name"] = _("Welcome to Odoo") return action - def _compute_theme_module_ids(self): - for wizard in self: - wizard.theme_module_ids = self.env["ir.module.module"].search( - [ - ("state", "!=", "uninstallable"), - ( - "category_id", - "not in", - [ - self.env["ir.model.data"]._xmlid_to_res_id( - "base.module_category_hidden" - ), - self.env["ir.model.data"]._xmlid_to_res_id( - "base.module_category_theme_hidden" - ), - ], - ), - "|", - ( - "category_id", - "=", - self.env["ir.model.data"]._xmlid_to_res_id( - "base.module_category_theme" - ), - ), - ( - "category_id.parent_id", - "=", - self.env["ir.model.data"]._xmlid_to_res_id( - "base.module_category_theme" - ), - ), - ] - ) - @api.model def _selection_state(self): return [ - ("start", "Company Information"), - ("website", "Website"), - ("theme", "Theme"), + ("start", "Installation"), + ("company_info", "Company Information"), ("mailing", "Mailing"), ("final", "Final"), ] - def state_exit_start(self): - self.state = "website" + def _get_current_state_index(self): + state_selection = self._selection_state() + state_index = 0 + for state in state_selection: + if self.state == state[0]: + break + state_index += 1 + return state_index + + def _get_next_state(self): + state_selection = self._selection_state() + state_index = self._get_current_state_index() + return state_selection[state_index + 1][0] + + def _get_previous_state(self): + state_selection = self._selection_state() + state_index = self._get_current_state_index() + return state_selection[state_index - 1][0] + + def go_to_state(self, state): + self.state = state + enter_method = getattr(self, "state_enter_{}".format(self.state), None) + if enter_method: + enter_method() + return self._reopen_self() - def state_exit_website(self): - self.state = "theme" + def open_next(self): + state_method = getattr(self, "state_exit_{}".format(self.state), None) + if state_method is None: + return self.go_to_state(self._get_next_state()) + return super().open_next() - def state_exit_theme(self): - self.state = "mailing" + def open_previous(self): + state_method = getattr(self, "state_previous_{}".format(self.state), None) + if state_method is None: + return self.go_to_state(self._get_previous_state()) + return super().open_previous() - def state_exit_mailing(self): + def state_exit_start(self): + return self.go_to_state(self._get_next_state()) + + def state_enter_final(self): onboarding_group = self.env.ref("base_onboarding.onboarding_group") onboarding_group.sudo().write({"users": [(3, self.env.user.id, 0)]}) - self.state = "final" - - def state_previous_mailing(self): - self.state = "theme" - - def state_previous_theme(self): - self.state = "website" - - def state_previous_website(self): - self.state = "start" def skip_to_end(self): self.ensure_one() - self.state_exit_mailing() - return self._reopen_self() + return self.go_to_state("final") diff --git a/base_onboarding/wizards/onboarding_wizard_view.xml b/base_onboarding/wizards/onboarding_wizard_view.xml index 3d00335d..858aa477 100644 --- a/base_onboarding/wizards/onboarding_wizard_view.xml +++ b/base_onboarding/wizards/onboarding_wizard_view.xml @@ -28,8 +28,55 @@ - - + +

Activating apps can take some time

+ + + + + + + + + + + + +
+ + Icon +
+

+   +

+

+ +

+
+ + + + +
+
+
+
+
+
+
+
+

It's important for your company to have a corporate identity. @@ -55,73 +102,6 @@ - -

-
- - - - - - - -
- - - - - - - - - - - - - - -
- - - - -
-
-
- -
- -
-
- -
- - Live Preview - -
-
-
-
- -
-
- -
-
-
- - - - - diff --git a/community_org_install/README.rst b/community_org_install/README.rst deleted file mode 100644 index 7595757e..00000000 --- a/community_org_install/README.rst +++ /dev/null @@ -1,5 +0,0 @@ -====================================== -Community Based Organization - Install -====================================== - -Community Based Organization - Install diff --git a/community_org_install/__manifest__.py b/community_org_install/__manifest__.py deleted file mode 100644 index 0ed2ae58..00000000 --- a/community_org_install/__manifest__.py +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright 2023 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -{ - "name": "Community Based Organization - Install", - "description": "Community Based Organization - Install", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "author": "Onestein", - "website": "https://www.onestein.eu", - "license": "AGPL-3", - "depends": [ - "account_configuration", - "container_install_standard", - # Base - "account", - "account_edi", - "account_edi_ubl_cii", - "account_payment", - "account_qr_code_sepa", - "sale_timesheet", - "analytic", - "association", - "attachment_indexation", - "auth_signup", - "auth_totp", - "auth_totp_mail", - "auth_totp_portal", - "barcodes", - "base_address_extended", - "base_automation", - "base_geolocalize", - "base_iban", - "base_import", - "base_setup", - "base_vat", - "board", - "calendar", - "calendar_sms", - "contacts", - "contract", - "contract_payment_mode", - "loyalty", - "crm", - "crm_sms", - "event", - "event_crm", - "event_crm_sale", - "event_sale", - "event_sms", - "google_recaptcha", - "hr", - "hr_contract", - "hr_expense", - "hr_org_chart", - "hr_recruitment", - "hr_timesheet", - "http_routing", - "l10n_nl", - "link_tracker", - "mail", - "mail_bot", - "mail_bot_hr", - "mass_mailing", - "mass_mailing_crm", - "mass_mailing_event", - "mass_mailing_event_track", - "mass_mailing_sale", - "membership", - "payment", - "payment_demo", - "payment_custom", - "phone_validation", - "portal", - "portal_rating", - "product", - "product_margin", - "project", - "project_hr_expense", - "project_purchase", - "purchase", - "purchase_stock", - "rating", - "resource", - "sale", - "sale_loyalty", - "sale_crm", - "sale_expense", - "sale_management", - "sale_project", - "sale_purchase", - "sale_purchase_stock", - "sale_sms", - "sale_stock", - "sales_team", - "sms", - "snailmail", - "snailmail_account", - "social_media", - "stock", - "stock_sms", - "survey", - "uom", - "utm", - "web_editor", - "web_kanban_gauge", - "web_tour", - "web_unsplash", - "website", - "website_blog", - "website_crm", - "website_crm_partner_assign", - "website_crm_sms", - "website_customer", - "website_event", - "website_event_crm", - "website_event_sale", - "website_event_track", - "website_form_project", - "website_google_map", - "website_hr_recruitment", - "website_links", - "website_mail", - "website_mass_mailing", - "website_membership", - "website_partner", - "website_payment", - "website_sale", - "website_sale_loyalty", - "website_sale_stock", - "website_sms", - # Community - "account_invoice_overdue_reminder", - "account_reconcile_oca", - "account_usability", - "account_financial_report", - "account_asset_management", - "account_spread_cost_revenue", - "account_banking_sepa_credit_transfer", - "account_banking_sepa_direct_debit", - "account_fiscal_position_vat_check", - "account_invoice_constraint_chronology", - "account_journal_lock_date", - "account_lock_date_update", - "account_move_line_purchase_info", - "account_move_line_sale_info", - "account_move_line_stock_info", - "account_move_line_tax_editable", - "account_move_print", - "base_vat_optional_vies", - "account_move_tier_validation", - "account_statement_import_online_paypal", - "website_analytics_matomo", - "account_statement_import_file_reconcile_oca", - "account_statement_import_camt", - "account_statement_import_online", - "account_statement_import_online_ponto", - "account_statement_import_sheet_file", - "attachment_preview_remove_preview_button", - "base_fontawesome", - "currency_rate_update", - "date_range", - "l10n_nl_bank", - "l10n_nl_bsn", - "l10n_nl_postcode", - "l10n_nl_tax_statement", - "l10n_nl_tax_statement_date_range", - "l10n_nl_tax_statement_icp", - "l10n_nl_xaf_auditfile_export", - "partner_external_map", - "product_category_product_link", - "project_role", - "report_qr", - "report_qweb_parameter", - "report_wkhtmltopdf_param", - "report_xlsx", - "report_xlsx_helper", - # 'web_widget_dropdown_dynamic', - "web_responsive", - # 'web_responsive_disable_form_attachment_preview', - "website_odoo_debranding", - "hr_expense_remove_mobile_link", - # Onestein - "base_municipality", - "mass_mailing_membership_committee", - "mass_mailing_membership_section", - "mass_mailing_help", - "membership_accessibility", - "membership_committee", - "membership_hr", - "membership_hr_recruitment", - "membership_section", - "project_role_members", - "website_event_share_filter_option", - "website_hide_navbar_technical", - "website_mass_mailing_membership_section", - "website_membership_registration", - "website_membership_section", - "website_project", - "website_project_role_members", - "website_sale_share_filter_option", - "website_share_blogger", - "website_share_diaspora", - "website_share_filter_option_blogger", - "website_share_filter_option_diaspora", - "website_share_filter_option_friendica", - "website_share_filter_option_mastodon", - "website_share_filter_option_pleroma", - "website_share_filter_option_reddit", - "website_share_filter_option_skype", - "website_share_filter_option_snapchat", - "website_share_filter_option_technical", - "website_share_filter_option_telegram", - "website_share_filter_option_tumblr", - "website_share_filter_option_wordpress", - "website_share_friendica", - "website_share_mastodon", - "website_share_pleroma", - "website_share_reddit", - "website_share_skype", - "website_share_snapchat", - "website_share_telegram", - "website_share_tumblr", - "website_share_wordpress", - "website_snippet_dynamic_link", - "website_snippet_openstreetmap", - "website_two_steps_share_technical", - # 3rd-Party - "mollie_account_sync", - "mollie_subscription_ept", - "payment_mollie_official", - "membership_mollie_subscription", - "l10n_nl_rgs", - "l10n_nl_rgs_account_financial_report", - "l10n_nl_rgs_asset", - "l10n_nl_rgs_mis_report", - # 'nextcloud_odoo_sync', - # 'nextcloud_calendar_instance_per_user', - ], - "data": [], - "installable": False, -} diff --git a/container_accessibility/__manifest__.py b/container_accessibility/__manifest__.py index 6b9b9f0b..6d78e503 100644 --- a/container_accessibility/__manifest__.py +++ b/container_accessibility/__manifest__.py @@ -10,11 +10,9 @@ "base_setup", "privacy_lookup", "web_tour", - "website", "payment", "base_menu_visibility_restriction", "auth_oidc", - "hr", "auditlog", "server_environment", "fs_storage", diff --git a/container_accessibility/data/auditlog_rule_data.xml b/container_accessibility/data/auditlog_rule_data.xml index 771d258c..e4aaf628 100644 --- a/container_accessibility/data/auditlog_rule_data.xml +++ b/container_accessibility/data/auditlog_rule_data.xml @@ -42,20 +42,6 @@ - - Employees - - full - - - - - - - + + + + + + diff --git a/container_accessibility/models/ir_module_module.py b/container_accessibility/models/ir_module_module.py index dfbfbfa5..31247b37 100644 --- a/container_accessibility/models/ir_module_module.py +++ b/container_accessibility/models/ir_module_module.py @@ -1,21 +1,29 @@ -from odoo import _, models -from odoo.exceptions import AccessError +from odoo import models class IrModuleModule(models.Model): _inherit = "ir.module.module" def button_immediate_install(self): + self_sudo = self if self.env.user.is_restricted_user() and not self.env.su: - raise AccessError(_("Access denied to install modules")) - return super().button_immediate_install() + filtered = self._filter_access_rules("write") + if filtered: + self_sudo = self.sudo() + return super(IrModuleModule, self_sudo).button_immediate_install() def button_immediate_upgrade(self): + self_sudo = self if self.env.user.is_restricted_user() and not self.env.su: - raise AccessError(_("Access denied to update modules")) - return super().button_immediate_upgrade() + filtered = self._filter_access_rules("write") + if filtered: + self_sudo = self.sudo() + return super(IrModuleModule, self_sudo).button_immediate_upgrade() def button_immediate_uninstall(self): + self_sudo = self if self.env.user.is_restricted_user() and not self.env.su: - raise AccessError(_("Access denied to uninstall modules")) - return super().button_immediate_uninstall() + filtered = self._filter_access_rules("write") + if filtered: + self_sudo = self.sudo() + return super(IrModuleModule, self_sudo).button_immediate_uninstall() diff --git a/container_accessibility/models/res_config_settings.py b/container_accessibility/models/res_config_settings.py index 818adeac..3c6243ea 100644 --- a/container_accessibility/models/res_config_settings.py +++ b/container_accessibility/models/res_config_settings.py @@ -1,4 +1,4 @@ -from odoo import fields, models +from odoo import api, fields, models class ResConfigSettings(models.TransientModel): @@ -6,6 +6,31 @@ class ResConfigSettings(models.TransientModel): module_auth_oauth = fields.Boolean(readonly=True) + @api.model + def _get_view(self, view_id=None, view_type="form", **options): + """Hide all module options""" + arch, view = super()._get_view(view_id, view_type, **options) + if self.env.user.is_restricted_user() and view_type == "form": + nodes = arch.xpath( + "//field[starts-with(@name, 'module_') and not(@invisible)]" + ) + for node in nodes: + element = node + setting_box = None + while setting_box is None: + element = element.getparent() + if element is None: + setting_box = node.getparent() + break + if "o_setting_box" in element.attrib.get("class", ""): + setting_box = element + if setting_box.getparent() is not None: + setting_box.getparent().remove(setting_box) + else: + setting_box.clear() + + return arch, view + def execute(self): sudo_self = self if self.env.user.is_restricted_user() and self.env.user.has_group( diff --git a/container_accessibility/security/ir_rule.xml b/container_accessibility/security/ir_rule.xml index 1109fc54..1fe0b7d6 100644 --- a/container_accessibility/security/ir_rule.xml +++ b/container_accessibility/security/ir_rule.xml @@ -56,4 +56,48 @@ + + + rule_restricted_ir_module_module + + + ['|', ('name', 'in', [ + 'account_install', + 'website_install', + 'website_sale_install', + 'website_membership_install', + 'membership_development_install', + 'membership_install', + 'hr_install', + 'helpdesk_install', + 'stock_install', + 'mass_mailing_install', + 'crm_install', + 'project_install', + 'event_install', + 'website_event_install', + 'sale_install' + ]), ('name', '=like', 'theme_%')] + + + + + + + + + + + rule_restricted_ir_module_module_unlink + + + [('id', '=', False)] + + + + + + + + diff --git a/container_accessibility/views/ir_module_module_view.xml b/container_accessibility/views/ir_module_module_view.xml index 5eeb9de7..9cefdb54 100644 --- a/container_accessibility/views/ir_module_module_view.xml +++ b/container_accessibility/views/ir_module_module_view.xml @@ -1,27 +1,28 @@ - - ir.module.module - - - - - !container_accessibility.group_restricted - - - - - !container_accessibility.group_restricted - - - - -
-
Installed
-
Professional Only
- Learn More -
-
+ + Apps + ir.module.module + kanban,tree,form + + + [('name', 'in', [ + 'account_install', + 'website_install', + 'website_sale_install', + 'website_membership_install', + 'membership_development_install', + 'membership_install', + 'hr_install', + 'helpdesk_install', + 'stock_install', + 'mass_mailing_install', + 'crm_install', + 'project_install', + 'event_install', + 'website_event_install', + 'sale_install' + ])]
diff --git a/community_org_install/__init__.py b/container_install/__init__.py similarity index 100% rename from community_org_install/__init__.py rename to container_install/__init__.py diff --git a/container_install/__manifest__.py b/container_install/__manifest__.py new file mode 100644 index 00000000..324c9d91 --- /dev/null +++ b/container_install/__manifest__.py @@ -0,0 +1,49 @@ +{ + "name": "Essentials Installation", + "summary": "Installs essential modules", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Technical", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "fs_storage", + "fs_attachment", + "fs_storage_backup", + "web_responsive", + "disable_odoo_online", + "base_fontawesome", + "auth_oidc", + "container_accessibility", + "report_qr", + "report_qweb_parameter", + "report_wkhtmltopdf_param", + "report_xlsx", + "report_xlsx_helper", + "date_range", + "base_tier_validation", + "digest_configuration", + "payment_custom", + "payment_demo", + "l10n_nl_bank", + "l10n_nl_postcode", + "partner_firstname", + "web_no_bubble", + "base_customer_company", + "base_customer_user", + "base_onboarding", + "spreadsheet_dashboard_oca", + "spreadsheet_oca_ux", + "partner_country_default_nl", + "remove_odoo_enterprise", + "base_import_debranding", + "digest_disable", + "partner_external_map", + "fetchmail_notify_error_to_sender", + "base_municipality", + "product_category_product_link", + "mail_debrand", + "base_module_bundle", + ], + "bundle": True, +} diff --git a/container_install_basis/__manifest__.py b/container_install_basis/__manifest__.py index 95cbef61..141f52f2 100644 --- a/container_install_basis/__manifest__.py +++ b/container_install_basis/__manifest__.py @@ -10,6 +10,7 @@ "version": "16.0.1.0.0", "license": "AGPL-3", "depends": [ + "container_install", # Backwards compatibility # File storage "fs_storage", "fs_attachment", @@ -127,8 +128,5 @@ "l10n_nl_hr_recruitment", "l10n_nl_hr_expense", ], - "data": [ - # "data/res.users.role.csv", # TODO disabled for now - ], "application": True, } diff --git a/container_install_basis/data/res.users.role.csv b/container_install_basis/data/res.users.role.csv deleted file mode 100644 index 6997d2bc..00000000 --- a/container_install_basis/data/res.users.role.csv +++ /dev/null @@ -1,3 +0,0 @@ -"name","implied_ids/id" -"Finance Manager","account.group_account_manager,account_payment_order.group_account_payment" -"Finance Mederwerker","account_payment_order.group_account_payment,account.group_account_user" diff --git a/container_install_standard/README.rst b/container_install_standard/README.rst deleted file mode 100644 index 200fdf6e..00000000 --- a/container_install_standard/README.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -===================== -Curq - Install Medium -===================== - -The Medium flavor of Curq. - -- Website -- CRM -- Sales -- Accounting + -- Projects -- Timesheets -- Expenses diff --git a/container_install_standard/__init__.py b/container_install_standard/__init__.py deleted file mode 100644 index ef5ae358..00000000 --- a/container_install_standard/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). diff --git a/container_install_standard/__manifest__.py b/container_install_standard/__manifest__.py deleted file mode 100644 index b41cf883..00000000 --- a/container_install_standard/__manifest__.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2017-2023 Onestein () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -{ - "name": "Container - Install Medium", - "summary": "Medium flavored modules required for Containers", - "author": "Onestein", - "website": "https://www.onestein.eu", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "license": "AGPL-3", - "depends": ["container_install_basis"], - "data": [], - "application": True, - "installable": False, # This module has to be removed -} diff --git a/services_org_install/__init__.py b/crm_install/__init__.py similarity index 100% rename from services_org_install/__init__.py rename to crm_install/__init__.py diff --git a/crm_install/__manifest__.py b/crm_install/__manifest__.py new file mode 100644 index 00000000..a0612ab2 --- /dev/null +++ b/crm_install/__manifest__.py @@ -0,0 +1,13 @@ +{ + "name": "CRM", + "summary": "Track leads and close opportunities", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "CRM", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "crm", + ], + "bundle": True, +} diff --git a/crm_install/static/description/icon.png b/crm_install/static/description/icon.png new file mode 100644 index 00000000..28b1b0ca Binary files /dev/null and b/crm_install/static/description/icon.png differ diff --git a/crm_install/static/description/icon.svg b/crm_install/static/description/icon.svg new file mode 100644 index 00000000..4dc59c77 --- /dev/null +++ b/crm_install/static/description/icon.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trade_org_install/__init__.py b/event_install/__init__.py similarity index 100% rename from trade_org_install/__init__.py rename to event_install/__init__.py diff --git a/event_install/__manifest__.py b/event_install/__manifest__.py new file mode 100644 index 00000000..20687428 --- /dev/null +++ b/event_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Events Organizer", + "summary": "Efficiently organize events and all related tasks: planning, registration tracking, attendances, etc", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Marketing/Events", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["event"], + "bundle": True, +} diff --git a/event_install/static/description/icon.png b/event_install/static/description/icon.png new file mode 100644 index 00000000..37f1441d Binary files /dev/null and b/event_install/static/description/icon.png differ diff --git a/event_install/static/description/icon.svg b/event_install/static/description/icon.svg new file mode 100644 index 00000000..35dc50c8 --- /dev/null +++ b/event_install/static/description/icon.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/university_org_install/__init__.py b/helpdesk_install/__init__.py similarity index 100% rename from university_org_install/__init__.py rename to helpdesk_install/__init__.py diff --git a/helpdesk_install/__manifest__.py b/helpdesk_install/__manifest__.py new file mode 100644 index 00000000..dccd65870 --- /dev/null +++ b/helpdesk_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Helpdesk", + "summary": "Streamline customer support and ensure quick and efficient issue resolution", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "After-Sales", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["helpdesk_mgmt", "helpdesk_mgmt_merge", "helpdesk_mgmt_rating"], + "bundle": True, +} diff --git a/helpdesk_install/static/description/icon.png b/helpdesk_install/static/description/icon.png new file mode 100644 index 00000000..fc05066a Binary files /dev/null and b/helpdesk_install/static/description/icon.png differ diff --git a/helpdesk_install/static/description/icon.svg b/helpdesk_install/static/description/icon.svg new file mode 100644 index 00000000..bc0d2daf --- /dev/null +++ b/helpdesk_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/hr_accessibility/__init__.py b/hr_accessibility/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/hr_accessibility/__manifest__.py b/hr_accessibility/__manifest__.py new file mode 100644 index 00000000..137aa5f5 --- /dev/null +++ b/hr_accessibility/__manifest__.py @@ -0,0 +1,15 @@ +{ + "name": "HR Accessibility", + "category": "Human Resources", + "version": "16.0.1.0.0", + "author": "Onestein", + "website": "https://onestein.nl", + "depends": [ + "container_accessibility", + "hr", + ], + "data": [ + "data/auditlog_rule_data.xml", + ], + "license": "LGPL-3", +} diff --git a/hr_accessibility/data/auditlog_rule_data.xml b/hr_accessibility/data/auditlog_rule_data.xml new file mode 100644 index 00000000..d78d92e4 --- /dev/null +++ b/hr_accessibility/data/auditlog_rule_data.xml @@ -0,0 +1,16 @@ + + + + Employees + + full + + + + + + + diff --git a/hr_install/__init__.py b/hr_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/hr_install/__manifest__.py b/hr_install/__manifest__.py new file mode 100644 index 00000000..1ebca3ff --- /dev/null +++ b/hr_install/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2017-2023 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Human Resources", + "summary": "Centralize employee information", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Human Resources", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "hr", + "hr_accessibility", + "hr_expense", + "hr_expense_remove_mobile_link", + "hr_employee_firstname", + "hr_timesheet_sheet", + "l10n_nl_bsn", + "l10n_nl_hr_recruitment", + "l10n_nl_hr_expense", + ], + "bundle": True, +} diff --git a/hr_install/static/description/icon.png b/hr_install/static/description/icon.png new file mode 100644 index 00000000..7664263e Binary files /dev/null and b/hr_install/static/description/icon.png differ diff --git a/hr_install/static/description/icon.svg b/hr_install/static/description/icon.svg new file mode 100644 index 00000000..753554b0 --- /dev/null +++ b/hr_install/static/description/icon.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mass_mailing_install/__init__.py b/mass_mailing_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/mass_mailing_install/__manifest__.py b/mass_mailing_install/__manifest__.py new file mode 100644 index 00000000..adc327c2 --- /dev/null +++ b/mass_mailing_install/__manifest__.py @@ -0,0 +1,15 @@ +{ + "name": "Email Marketing", + "summary": "Design, send and track emails", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Email Marketing", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "mass_mailing", + "mass_mailing_force_dedicated_server", + "mass_mailing_partner", + ], + "bundle": True, +} diff --git a/mass_mailing_install/static/description/icon.png b/mass_mailing_install/static/description/icon.png new file mode 100644 index 00000000..98685d0a Binary files /dev/null and b/mass_mailing_install/static/description/icon.png differ diff --git a/mass_mailing_install/static/description/icon.svg b/mass_mailing_install/static/description/icon.svg new file mode 100644 index 00000000..b48aed5a --- /dev/null +++ b/mass_mailing_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/membership_development_install/__init__.py b/membership_development_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/membership_development_install/__manifest__.py b/membership_development_install/__manifest__.py new file mode 100644 index 00000000..af4e26e0 --- /dev/null +++ b/membership_development_install/__manifest__.py @@ -0,0 +1,17 @@ +{ + "name": "Development Community", + "summary": "Integrates GitLab and GitHub to track repository activity and contributions in your community", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Membership", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "partner_cde", + "membership_activity", + "membership_activity_cde", + "membership_activity_gitlab", + "membership_activity_github", + ], + "bundle": True, +} diff --git a/membership_development_install/static/description/icon.png b/membership_development_install/static/description/icon.png new file mode 100644 index 00000000..ee065346 Binary files /dev/null and b/membership_development_install/static/description/icon.png differ diff --git a/membership_install/__init__.py b/membership_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/membership_install/__manifest__.py b/membership_install/__manifest__.py new file mode 100644 index 00000000..e3b944ac --- /dev/null +++ b/membership_install/__manifest__.py @@ -0,0 +1,19 @@ +{ + "name": "Community Builder", + "summary": "Tools to build your community", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Membership", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "membership", + "membership_contribution", + "membership_extension", + "membership_prorate", + "membership_subscription", + "membership_variable_period", + "membership_group", + ], + "bundle": True, +} diff --git a/membership_install/static/description/icon.png b/membership_install/static/description/icon.png new file mode 100644 index 00000000..d1d9740a Binary files /dev/null and b/membership_install/static/description/icon.png differ diff --git a/membership_install/static/description/icon.svg b/membership_install/static/description/icon.svg new file mode 100644 index 00000000..e8d664f6 --- /dev/null +++ b/membership_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.txt b/package.txt index b56993a6..56f0dd1f 100644 --- a/package.txt +++ b/package.txt @@ -1,10 +1,48 @@ ProjectManagement/* account_configuration +base_module_bundle account_financial_consolidation_report account_statement_import_online_ponto_log account_statement_import_online_ponto_statement_creation_mode account_statement_import_sheet_file_sheet_mappings -accountancy_install +base_customer_company +base_customer_user +base_mail_security +base_onboarding +website_onboarding +base_partner_security +consolidation_account +container_accessibility +container_hr_recruitment +container_install_basis +container_s3 +digest_configuration +digest_disable +hr_accessibility +l10n_nl_hr_expense +l10n_nl_hr_recruitment +l10n_nl_rgs_usability +mass_mailing_force_dedicated_server +membership_accessibility +membership_accessibility_mass_mailing_membership_group +membership_accessibility_website_project_role_members +multi_company_disable +spreadsheet_oca_ux +container_install +crm_install +event_install +hr_install +mass_mailing_install +membership_install +helpdesk_install +project_install +sale_install +stock_install +website_event_install +website_install +website_sale_install +website_membership_install +membership_development_install addons-generic/account_asset_management_template addons-generic/account_journal_subtype addons-generic/account_period_auto_create @@ -98,18 +136,6 @@ addons-generic/website_two_steps_share_technical addons-third-party/mollie_account_sync addons-third-party/mollie_subscription_ept addons-third-party/payment_mollie_official -base_customer_company -base_customer_user -base_mail_security -base_onboarding -base_partner_security -community_org_install -consolidation_account -container_accessibility -container_hr_recruitment -container_install_basis -container_install_standard -container_s3 design-themes/theme_anelusia design-themes/theme_artists design-themes/theme_avantgarde @@ -138,16 +164,6 @@ design-themes/theme_treehouse design-themes/theme_vehicle design-themes/theme_yes design-themes/theme_zap -digest_configuration -digest_disable -l10n_nl_hr_expense -l10n_nl_hr_recruitment -l10n_nl_rgs_usability -mass_mailing_force_dedicated_server -membership_accessibility -membership_accessibility_mass_mailing_membership_group -membership_accessibility_website_project_role_members -multi_company_disable oca/account_asset_management oca/account_banking_mandate oca/account_banking_mandate_contact @@ -224,6 +240,7 @@ oca/fs_storage oca/fs_storage_backup oca/helpdesk_mgmt oca/helpdesk_mgmt_merge +oca/helpdesk_mgmt_rating oca/helpdesk_mgmt_project oca/helpdesk_mgmt_timesheet oca/hr_employee_firstname @@ -300,7 +317,3 @@ oca/website_local_font oca/website_odoo_debranding oca/website_snippet_dynamic_link oca/website_snippet_openstreetmap -services_org_install -spreadsheet_oca_ux -trade_org_install -university_org_install diff --git a/project_install/__init__.py b/project_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/project_install/__manifest__.py b/project_install/__manifest__.py new file mode 100644 index 00000000..ac198e88 --- /dev/null +++ b/project_install/__manifest__.py @@ -0,0 +1,20 @@ +{ + "name": "Project Management", + "summary": "Organize and plan your projects", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Project", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "project", + "project_parent", + "project_timeline", + "project_task_add_very_high", + "project_scrum", + "project_merge", + "project_task_link", + "project_task_default_stage", + ], + "bundle": True, +} diff --git a/project_install/static/description/icon.png b/project_install/static/description/icon.png new file mode 100644 index 00000000..03b587e6 Binary files /dev/null and b/project_install/static/description/icon.png differ diff --git a/project_install/static/description/icon.svg b/project_install/static/description/icon.svg new file mode 100644 index 00000000..7fd6ba94 --- /dev/null +++ b/project_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project_org_install/README.rst b/project_org_install/README.rst deleted file mode 100644 index b255cbd4..00000000 --- a/project_org_install/README.rst +++ /dev/null @@ -1 +0,0 @@ -# dit diff --git a/project_org_install/__init__.py b/project_org_install/__init__.py deleted file mode 100644 index d7422205..00000000 --- a/project_org_install/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# this diff --git a/project_org_install/__manifest__.py b/project_org_install/__manifest__.py deleted file mode 100644 index a27d9283..00000000 --- a/project_org_install/__manifest__.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -{ - "name": "Project Managment Based Organization - Install", - "description": "Project Managment Based Organization - Install", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "author": "Onestein", - "website": "https://www.onestein.eu", - "license": "AGPL-3", - "depends": [ - "container_install_standard", - # Base - "project", - # Community - # 'web_widget_dropdown_dynamic', - "web_responsive", - "website_odoo_debranding", - # Onestein - # 'base_municipality', - # 'mass_mailing_membership_committee', - # 3rd-Party - # 'nextcloud_odoo_sync', - # 'nextcloud_calendar_instance_per_user', - ], - "data": [], - "installable": False, -} diff --git a/sale_install/__init__.py b/sale_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sale_install/__manifest__.py b/sale_install/__manifest__.py new file mode 100644 index 00000000..a77b513e --- /dev/null +++ b/sale_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Sales Management", + "summary": "From quotations to invoices", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Sales", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["sale_management", "sale_order_amount_to_invoice"], + "bundle": True, +} diff --git a/sale_install/static/description/icon.png b/sale_install/static/description/icon.png new file mode 100644 index 00000000..99a498c2 Binary files /dev/null and b/sale_install/static/description/icon.png differ diff --git a/sale_install/static/description/icon.svg b/sale_install/static/description/icon.svg new file mode 100644 index 00000000..97a19c02 --- /dev/null +++ b/sale_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/scripts/apply_modules.py b/scripts/apply_modules.py index 1dcb715f..c27142d4 100644 --- a/scripts/apply_modules.py +++ b/scripts/apply_modules.py @@ -2,43 +2,31 @@ import click_odoo -def _recurse_dependencies(env, modules): - all_modules = modules - for module in modules: - all_modules += _recurse_dependencies( - env, module.dependencies_id.mapped("depend_id") - ) - return all_modules - - @click.command() @click_odoo.env_options(default_log_level="error") -@click.option("--modules") @click.option("--do-uninstall", is_flag=True, default=False) -def main(env, modules, do_uninstall): - modules = list(map(lambda m: m.strip(), modules.split(","))) - click.echo("Applying modules...") - modules = env["ir.module.module"].search([("name", "in", modules)]) - installed_modules = env["ir.module.module"].search( - [("state", "=", "installed"), ("auto_install", "=", False)] - ) - desired_modules = _recurse_dependencies(env, modules) - to_uninstall = installed_modules - desired_modules - # Filter themes - to_uninstall = to_uninstall.filtered(lambda l: not l.name.startswith("theme_")) +def main(env, do_uninstall): + click.echo("Upgrading bundles...") + base_module_bundle = env.ref("base.module_base_module_bundle") + if base_module_bundle.state != "installed": + return click.echo( + "`base_module_bundle` is not installed", + err=True, + ) - click.echo("Install modules...") - modules.button_immediate_install() + modules = env["ir.module.module"].search([("state", "=", "installed")]) + bundles = modules.filtered(lambda m: m.is_bundle) + bundles.button_immediate_upgrade() - click.echo( - "Found %s modules to uninstall: %s" - % (len(to_uninstall), ", ".join(to_uninstall.mapped("name"))) - ) if do_uninstall: - click.echo("Uninstalling...") - to_uninstall.button_immediate_uninstall() - else: - click.echo("Not uninstalling") + current_modules = modules.filtered(lambda m: not m.auto_install) + target_modules = bundles + bundles.upstream_dependencies( + exclude_states=("uninstallable",) + ) + retired_modules = current_modules - target_modules + if retired_modules: + click.echo("Uninstalling %s..." % ", ".join(retired_modules.mapped("name"))) + retired_modules.button_immediate_uninstall() if __name__ == "__main__": diff --git a/scripts/prepare_install_request_mail.py b/scripts/prepare_install_request_mail.py deleted file mode 100644 index 9d59c63d..00000000 --- a/scripts/prepare_install_request_mail.py +++ /dev/null @@ -1,15 +0,0 @@ -import click -import click_odoo - - -@click.command() -@click_odoo.env_options(default_log_level="error") -@click.option("--email") -def main(env, email): - click.echo("Change `Install request` email") - mail_template = env.ref("base_install_request.mail_template_base_install_request") - mail_template.email_to = email - - -if __name__ == "__main__": - main() diff --git a/scripts/run.sh b/scripts/run.sh index 86b70d8a..5a0a8846 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -29,12 +29,10 @@ if [[ "$UPDATE_COMPANY" == "true" ]]; then python /odoo/scripts/update_company.py -c $ODOO_RC -d $DB_NAME --log-level=error --name "$COMPANY_NAME" --email "$COMPANY_EMAIL" --coc "$COMPANY_COC" --city "$COMPANY_CITY" --zip "$COMPANY_ZIP" --street "$COMPANY_STREET" fi -# python /odoo/scripts/prepare_install_request_mail.py -c $ODOO_RC -d $DB_NAME --log-level=error --email "ict@onestein.nl" - if [[ -n "$UNINSTALL_MODULES" && "$UNINSTALL_MODULES" == "True" ]]; then - python /odoo/scripts/apply_modules.py -c $ODOO_RC -d $DB_NAME --log-level=error --modules "$MODULES" --do-uninstall + python /odoo/scripts/apply_modules.py -c $ODOO_RC -d $DB_NAME --log-level=error --do-uninstall else - python /odoo/scripts/apply_modules.py -c $ODOO_RC -d $DB_NAME --log-level=error --modules "$MODULES" + python /odoo/scripts/apply_modules.py -c $ODOO_RC -d $DB_NAME --log-level=error fi python /odoo/scripts/uninstall_auto_install_modules.py -c $ODOO_RC -d $DB_NAME --log-level=error diff --git a/services_org_install/README.rst b/services_org_install/README.rst deleted file mode 100644 index 69b5a229..00000000 --- a/services_org_install/README.rst +++ /dev/null @@ -1,5 +0,0 @@ -====================================== -Services Based Organization - Install -====================================== - -Services Based Organization - Install diff --git a/services_org_install/__manifest__.py b/services_org_install/__manifest__.py deleted file mode 100644 index 9da7721d..00000000 --- a/services_org_install/__manifest__.py +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 2023 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -{ - "name": "Services Based Organization - Install", - "description": "Services Based Organization - Install", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "author": "Onestein", - "website": "https://www.onestein.eu", - "license": "AGPL-3", - "depends": [ - "account_configuration", - "container_install_standard", - # Base - "account", - "account_edi", - "account_edi_ubl_cii", - "account_payment", - # 'sale_timesheet', - "account_qr_code_sepa", - "analytic", - "attachment_indexation", - "auth_signup", - "auth_totp", - "auth_totp_mail", - "auth_totp_portal", - "barcodes", - "base_address_extended", - "base_automation", - "base_fontawesome", - "base_geolocalize", - "base_iban", - "base_import", - "base_setup", - "base_vat", - "board", - "calendar", - "calendar_sms", - "contacts", - "contract", - "contract_payment_mode", - "crm", - "crm_sms", - "google_recaptcha", - "helpdesk_mgmt", - "helpdesk_mgmt_project", - "hr", - "hr_contract", - "hr_expense", - "hr_holidays", - "hr_org_chart", - "hr_timesheet", - "http_routing", - "l10n_multilang", - "l10n_nl", - "link_tracker", - "mail", - "mail_bot", - "mail_bot_hr", - "mass_mailing", - "mass_mailing_crm", - "mass_mailing_sale", - "mis_builder", - "mis_builder_budget", - "payment", - "payment_custom", - "phone_validation", - "portal", - "portal_rating", - "product", - "product_margin", - "project", - "project_timesheet_holidays", - "project_hr_expense", - "project_purchase", - "purchase", - "purchase_stock", - "rating", - # 'report_xlsx', - "resource", - "sale", - "sale_loyalty", - "sale_crm", - "sale_expense", - "sale_management", - "sale_project", - "sale_purchase", - "sale_purchase_stock", - "sale_sms", - "sale_stock", - "sales_team", - "sale_timesheet", - "sms", - "snailmail", - "snailmail_account", - "social_media", - "stock", - "stock_sms", - "uom", - "utm", - "web_editor", - "web_kanban_gauge", - "web_tour", - "web_unsplash", - "website", - "website_blog", - "website_crm", - "website_crm_partner_assign", - "website_crm_sms", - "website_customer", - "website_google_map", - "website_mail", - "website_mass_mailing", - "website_partner", - "website_payment", - "website_sale", - "website_sale_loyalty", - "website_sale_stock", - "website_sms", - # Community - "account_invoice_overdue_reminder", - "account_reconcile_oca", - "account_usability", - "account_financial_report", - "account_asset_management", - "account_spread_cost_revenue", - "account_banking_sepa_credit_transfer", - "account_banking_sepa_direct_debit", - "account_fiscal_position_vat_check", - "account_invoice_constraint_chronology", - "account_journal_lock_date", - "account_lock_date_update", - "account_move_line_purchase_info", - "account_move_line_sale_info", - "account_move_line_tax_editable", - "account_move_print", - "base_vat_optional_vies", - "account_move_tier_validation", - "account_statement_import_online_paypal", - "website_analytics_matomo", - "account_statement_import_file_reconcile_oca", - "account_statement_import_camt", - "account_statement_import_online", - "account_statement_import_online_ponto", - "account_statement_import_sheet_file", - "auditlog", - "project_role", - "currency_rate_update", - "date_range", - "disable_odoo_online", - "hr_timesheet_sheet", - "l10n_nl_bank", - "l10n_nl_bsn", - "l10n_nl_postcode", - "l10n_nl_tax_statement", - "l10n_nl_tax_statement_date_range", - "l10n_nl_tax_statement_icp", - "l10n_nl_xaf_auditfile_export", - "mail_tracking", - "mass_mailing_partner", - "partner_external_map", - "project_timeline", - "report_qr", - "report_qweb_parameter", - "report_wkhtmltopdf_param", - "report_xlsx", - "report_xlsx_helper", - "remove_odoo_enterprise", - "web_responsive", - "web_no_bubble", - "web_search_with_and", - "web_widget_x2many_2d_matrix", - "web_timeline", - "website_odoo_debranding", - "hr_expense_remove_mobile_link", - # Onestein - "mass_mailing_help", - # 3rd-Party - "mollie_account_sync", - "mollie_subscription_ept", - "payment_mollie_official", - "l10n_nl_rgs", - "l10n_nl_rgs_account_financial_report", - "l10n_nl_rgs_asset", - "l10n_nl_rgs_mis_report", - # 'nextcloud_odoo_sync', - ], - "data": [], - "installable": False, -} diff --git a/stock_install/__init__.py b/stock_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/stock_install/__manifest__.py b/stock_install/__manifest__.py new file mode 100644 index 00000000..0c6809fa --- /dev/null +++ b/stock_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Inventory", + "summary": "Manage your stock and logistics activities", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Inventory", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["stock", "stock_dropshipping"], + "bundle": True, +} diff --git a/stock_install/static/description/icon.png b/stock_install/static/description/icon.png new file mode 100644 index 00000000..a004d506 Binary files /dev/null and b/stock_install/static/description/icon.png differ diff --git a/stock_install/static/description/icon.svg b/stock_install/static/description/icon.svg new file mode 100644 index 00000000..834a8e1f --- /dev/null +++ b/stock_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/trade_org_install/README.rst b/trade_org_install/README.rst deleted file mode 100644 index 7595757e..00000000 --- a/trade_org_install/README.rst +++ /dev/null @@ -1,5 +0,0 @@ -====================================== -Community Based Organization - Install -====================================== - -Community Based Organization - Install diff --git a/trade_org_install/__manifest__.py b/trade_org_install/__manifest__.py deleted file mode 100644 index 82ee0340..00000000 --- a/trade_org_install/__manifest__.py +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright 2023 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -{ - "name": "Trade Based Organization - Install", - "description": "Trade Based Organization - Install", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "author": "Onestein", - "website": "https://www.onestein.eu", - "license": "AGPL-3", - "depends": [ - "container_install_standard", - # Base - "account", - "account_edi", - "account_edi_ubl_cii", - "account_payment", - "account_qr_code_sepa", - "analytic", - "association", - "attachment_indexation", - "auth_signup", - "auth_totp", - "auth_totp_mail", - "auth_totp_portal", - "barcodes", - "base_address_extended", - "base_automation", - "base_fontawesome", - "base_geolocalize", - "base_iban", - "base_import", - "base_setup", - "base_vat", - "board", - "calendar", - "calendar_sms", - "contacts", - "loyalty", - "crm", - "crm_sms", - "event", - "event_crm", - "event_crm_sale", - "event_sale", - "event_sms", - "google_recaptcha", - "hr", - "hr_contract", - "hr_expense", - "hr_org_chart", - "hr_recruitment", - "hr_timesheet", - "http_routing", - "l10n_nl", - "link_tracker", - "mail", - "mail_bot", - "mail_bot_hr", - "mass_mailing", - "mass_mailing_crm", - "mass_mailing_event", - "mass_mailing_event_track", - "mass_mailing_sale", - "payment", - "payment_demo", - "payment_custom", - "phone_validation", - "portal", - "portal_rating", - "product", - "product_margin", - "project", - "project_hr_expense", - "project_purchase", - "purchase", - "purchase_stock", - "rating", - "resource", - "sale", - "sale_loyalty", - "sale_crm", - "sale_expense", - "sale_management", - "sale_project", - "sale_purchase", - "sale_purchase_stock", - "sale_sms", - "sale_stock", - "sales_team", - "sms", - "snailmail", - "snailmail_account", - "social_media", - "stock", - "stock_sms", - "uom", - "utm", - "web_editor", - "web_kanban_gauge", - "web_tour", - "web_unsplash", - "website", - "website_blog", - "website_crm", - "website_crm_partner_assign", - "website_crm_sms", - "website_customer", - "website_event", - "website_event_crm", - "website_event_sale", - "website_event_track", - "website_form_project", - "website_google_map", - "website_hr_recruitment", - "website_links", - "website_mail", - "website_mass_mailing", - "website_partner", - "website_payment", - "website_sale", - "website_sale_loyalty", - "website_sale_stock", - "website_sms", - # Community - "account_reconcile_oca", - "website_analytics_matomo", - "account_statement_import_file_reconcile_oca", - "account_statement_import_camt", - "account_statement_import_online", - "account_statement_import_online_ponto", - "account_statement_import_sheet_file", - "partner_external_map", - "project_role", - # 'web_widget_dropdown_dynamic', - "web_responsive", - "website_odoo_debranding", - "hr_expense_remove_mobile_link", - # Onestein - "base_municipality", - "mass_mailing_help", - "website_event_share_filter_option", - "website_hide_navbar_technical", - "website_project", - "website_sale_share_filter_option", - "website_share_blogger", - "website_share_diaspora", - "website_share_filter_option_blogger", - "website_share_filter_option_diaspora", - "website_share_filter_option_friendica", - "website_share_filter_option_mastodon", - "website_share_filter_option_pleroma", - "website_share_filter_option_reddit", - "website_share_filter_option_skype", - "website_share_filter_option_snapchat", - "website_share_filter_option_technical", - "website_share_filter_option_telegram", - "website_share_filter_option_tumblr", - "website_share_filter_option_wordpress", - "website_share_friendica", - "website_share_mastodon", - "website_share_pleroma", - "website_share_reddit", - "website_share_skype", - "website_share_snapchat", - "website_share_telegram", - "website_share_tumblr", - "website_share_wordpress", - "website_snippet_dynamic_link", - "website_snippet_openstreetmap", - "website_two_steps_share_technical", - ], - "data": [], - "installable": False, -} diff --git a/university_org_install/README.rst b/university_org_install/README.rst deleted file mode 100644 index 9de1204e..00000000 --- a/university_org_install/README.rst +++ /dev/null @@ -1,5 +0,0 @@ -======================================= -University Based Organization - Install -======================================= - -University Based Organization - Install diff --git a/university_org_install/__manifest__.py b/university_org_install/__manifest__.py deleted file mode 100644 index b579c8be..00000000 --- a/university_org_install/__manifest__.py +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 2023 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -{ - "name": "University Based Organization - Install", - "description": "University Based Organization - Install", - "category": "Technical Settings", - "version": "16.0.1.0.0", - "author": "Onestein", - "website": "https://www.onestein.eu", - "license": "AGPL-3", - "depends": [ - "container_install_standard", - # Base - "account", - "account_edi", - "account_edi_ubl_cii", - "account_payment", - "account_qr_code_sepa", - "analytic", - "association", - "attachment_indexation", - "auth_signup", - "auth_totp", - "auth_totp_mail", - "auth_totp_portal", - "barcodes", - "base_address_extended", - "base_automation", - "base_fontawesome", - "base_geolocalize", - "base_iban", - "base_import", - "base_setup", - "base_vat", - "board", - "calendar", - "calendar_sms", - "contacts", - "loyalty", - "crm", - "crm_sms", - "event", - "event_crm", - "event_crm_sale", - "event_sale", - "event_sms", - "google_recaptcha", - "hr", - "hr_contract", - "hr_expense", - "hr_org_chart", - "hr_recruitment", - "hr_timesheet", - "http_routing", - "l10n_nl", - "link_tracker", - "mail", - "mail_bot", - "mail_bot_hr", - "mass_mailing", - "mass_mailing_crm", - "mass_mailing_event", - "mass_mailing_event_track", - "mass_mailing_sale", - "membership", - "payment", - "payment_demo", - "payment_custom", - "phone_validation", - "portal", - "portal_rating", - "product", - "product_margin", - "project", - "project_hr_expense", - "project_purchase", - "purchase", - "purchase_stock", - "rating", - "resource", - "sale", - "sale_loyalty", - "sale_crm", - "sale_expense", - "sale_management", - "sale_project", - "sale_purchase", - "sale_purchase_stock", - "sale_sms", - "sale_stock", - "sales_team", - "sms", - "snailmail", - "snailmail_account", - "social_media", - "stock", - "stock_sms", - "uom", - "utm", - "web_editor", - "web_kanban_gauge", - "web_tour", - "web_unsplash", - "website", - "website_blog", - "website_crm", - "website_crm_partner_assign", - "website_crm_sms", - "website_customer", - "website_event", - "website_event_crm", - "website_event_sale", - "website_event_track", - "website_form_project", - "website_google_map", - "website_hr_recruitment", - "website_links", - "website_mail", - "website_mass_mailing", - "website_membership", - "website_partner", - "website_payment", - "website_sale", - "website_sale_loyalty", - "website_sale_stock", - "website_sms", - # Community - "account_reconcile_oca", - "website_analytics_matomo", - "account_statement_import_file_reconcile_oca", - "account_statement_import_sheet_file", - "account_statement_import_camt", - "account_statement_import_online", - "account_statement_import_online_ponto", - "partner_external_map", - "project_role", - # 'web_widget_dropdown_dynamic', - "web_responsive", - "website_odoo_debranding", - "hr_expense_remove_mobile_link", - # Onestein - "base_municipality", - "mass_mailing_membership_committee", - "mass_mailing_membership_section", - "mass_mailing_help", - "membership_committee", - "membership_hr", - "membership_hr_recruitment", - "membership_section", - "project_role_members", - "website_event_share_filter_option", - "website_hide_navbar_technical", - "website_mass_mailing_membership_section", - "website_membership_registration", - "website_membership_section", - "website_project", - "website_project_role_members", - "website_sale_share_filter_option", - "website_share_blogger", - "website_share_diaspora", - "website_share_filter_option_blogger", - "website_share_filter_option_diaspora", - "website_share_filter_option_friendica", - "website_share_filter_option_mastodon", - "website_share_filter_option_pleroma", - "website_share_filter_option_reddit", - "website_share_filter_option_skype", - "website_share_filter_option_snapchat", - "website_share_filter_option_technical", - "website_share_filter_option_telegram", - "website_share_filter_option_tumblr", - "website_share_filter_option_wordpress", - "website_share_friendica", - "website_share_mastodon", - "website_share_pleroma", - "website_share_reddit", - "website_share_skype", - "website_share_snapchat", - "website_share_telegram", - "website_share_tumblr", - "website_share_wordpress", - "website_snippet_dynamic_link", - "website_snippet_openstreetmap", - "website_two_steps_share_technical", - # 3rd-Party - ], - "data": [], - "installable": False, -} diff --git a/website_event_install/__init__.py b/website_event_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/website_event_install/__manifest__.py b/website_event_install/__manifest__.py new file mode 100644 index 00000000..edd62b22 --- /dev/null +++ b/website_event_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Publish Events", + "summary": "Publish events, sell tickets on your website", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Website", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["website_event", "website_event_track"], + "bundle": True, +} diff --git a/website_event_install/static/description/icon.png b/website_event_install/static/description/icon.png new file mode 100644 index 00000000..92866264 Binary files /dev/null and b/website_event_install/static/description/icon.png differ diff --git a/website_event_install/static/description/icon.svg b/website_event_install/static/description/icon.svg new file mode 100644 index 00000000..b3f72c43 --- /dev/null +++ b/website_event_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website_install/__init__.py b/website_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/website_install/__manifest__.py b/website_install/__manifest__.py new file mode 100644 index 00000000..16e74560 --- /dev/null +++ b/website_install/__manifest__.py @@ -0,0 +1,42 @@ +{ + "name": "Website & Blog", + "summary": "Build a website", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Website", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "website", + "website_blog", + "website_odoo_debranding", + "website_onboarding", + "website_share_blogger", + "website_share_diaspora", + "website_share_filter_option_blogger", + "website_share_filter_option_diaspora", + "website_share_filter_option_friendica", + "website_share_filter_option_mastodon", + "website_share_filter_option_pleroma", + "website_share_filter_option_reddit", + "website_share_filter_option_skype", + "website_share_filter_option_snapchat", + "website_share_filter_option_technical", + "website_share_filter_option_telegram", + "website_share_filter_option_tumblr", + "website_share_filter_option_wordpress", + "website_share_friendica", + "website_share_mastodon", + "website_share_pleroma", + "website_share_reddit", + "website_share_skype", + "website_share_snapchat", + "website_share_telegram", + "website_share_tumblr", + "website_share_wordpress", + "website_two_steps_share_technical", + "website_snippet_dynamic_link", + "website_snippet_openstreetmap", + ], + "bundle": True, +} diff --git a/website_install/static/description/icon.png b/website_install/static/description/icon.png new file mode 100644 index 00000000..432fe05e Binary files /dev/null and b/website_install/static/description/icon.png differ diff --git a/website_install/static/description/icon.svg b/website_install/static/description/icon.svg new file mode 100644 index 00000000..ef945983 --- /dev/null +++ b/website_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website_membership_install/__init__.py b/website_membership_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/website_membership_install/__manifest__.py b/website_membership_install/__manifest__.py new file mode 100644 index 00000000..8d9d751f --- /dev/null +++ b/website_membership_install/__manifest__.py @@ -0,0 +1,18 @@ +{ + "name": "Online Community", + "summary": "Empower your community with tools " + "to improve member engagement, content sharing, and more", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Membership", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": [ + "website_membership", + "website_membership_group", + "website_membership_registration", + "website_membership_registration_social" + "website_membership_registration_partner_contact_birthdate", + ], + "bundle": True, +} diff --git a/website_membership_install/static/description/icon.png b/website_membership_install/static/description/icon.png new file mode 100644 index 00000000..bc5a393c Binary files /dev/null and b/website_membership_install/static/description/icon.png differ diff --git a/website_membership_install/static/description/icon.svg b/website_membership_install/static/description/icon.svg new file mode 100644 index 00000000..a6f0c4fa --- /dev/null +++ b/website_membership_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website_onboarding/__init__.py b/website_onboarding/__init__.py new file mode 100644 index 00000000..976591c9 --- /dev/null +++ b/website_onboarding/__init__.py @@ -0,0 +1,2 @@ +from . import wizards +from . import models diff --git a/website_onboarding/__manifest__.py b/website_onboarding/__manifest__.py new file mode 100644 index 00000000..6b04613a --- /dev/null +++ b/website_onboarding/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2017-2023 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Website Onboarding", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Website", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["website", "base_onboarding"], + "data": [ + "wizards/onboarding_wizard_view.xml", + ], +} diff --git a/website_onboarding/models/__init__.py b/website_onboarding/models/__init__.py new file mode 100644 index 00000000..8e2d2d1b --- /dev/null +++ b/website_onboarding/models/__init__.py @@ -0,0 +1 @@ +from . import ir_module_module diff --git a/website_onboarding/models/ir_module_module.py b/website_onboarding/models/ir_module_module.py new file mode 100644 index 00000000..1157d739 --- /dev/null +++ b/website_onboarding/models/ir_module_module.py @@ -0,0 +1,29 @@ +from odoo import api, models + + +class IrModuleModule(models.Model): + _inherit = "ir.module.module" + + @api.model + def _fields_view_get( + self, view_id=None, view_type="form", toolbar=False, submenu=False + ): + if ( + view_type == "kanban" + and self.env.context.get("active_model") == "base.onboarding.wizard" + ): + view_id = self.env.ref("website.theme_view_kanban").id + return super()._fields_view_get( + view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu + ) + + def button_choose_theme(self): + res = super().button_choose_theme() + if self.env.context.get("active_model") == "base.onboarding.wizard": + wizard = self.env["base.onboarding.wizard"].search( + [("id", "=", self.env.context.get("active_id"))] + ) + if wizard.state == "theme": + wizard.open_next() + res = wizard._reopen_self() + return res diff --git a/website_onboarding/wizards/__init__.py b/website_onboarding/wizards/__init__.py new file mode 100644 index 00000000..9f9c4a47 --- /dev/null +++ b/website_onboarding/wizards/__init__.py @@ -0,0 +1 @@ +from . import onboarding_wizard diff --git a/website_onboarding/wizards/onboarding_wizard.py b/website_onboarding/wizards/onboarding_wizard.py new file mode 100644 index 00000000..dc6dc641 --- /dev/null +++ b/website_onboarding/wizards/onboarding_wizard.py @@ -0,0 +1,71 @@ +from odoo import api, fields, models + + +class OnboardingWizard(models.TransientModel): + _inherit = "base.onboarding.wizard" + + def _default_website(self): + website = self.env["website"].search( + [("company_id", "=", self.env.company.id)], limit=1 + ) + if ( + not website + ): # Get the first available website if there's no website found for the current active company + website = self.env["website"].search([], limit=1) + return website + + website_id = fields.Many2one(comodel_name="website", default=_default_website) + website_name = fields.Char(related="website_id.name", readonly=False) + + social_twitter = fields.Char(related="website_id.social_twitter", readonly=False) + social_facebook = fields.Char(related="website_id.social_facebook", readonly=False) + social_linkedin = fields.Char(related="website_id.social_linkedin", readonly=False) + social_youtube = fields.Char(related="website_id.social_youtube", readonly=False) + social_instagram = fields.Char( + related="website_id.social_instagram", readonly=False + ) + theme_module_ids = fields.Many2many( + comodel_name="ir.module.module", compute="_compute_theme_module_ids" + ) + + def _compute_theme_module_ids(self): + for wizard in self: + wizard.theme_module_ids = self.env["ir.module.module"].search( + [ + ("state", "!=", "uninstallable"), + ( + "category_id", + "not in", + [ + self.env["ir.model.data"]._xmlid_to_res_id( + "base.module_category_hidden" + ), + self.env["ir.model.data"]._xmlid_to_res_id( + "base.module_category_theme_hidden" + ), + ], + ), + "|", + ( + "category_id", + "=", + self.env["ir.model.data"]._xmlid_to_res_id( + "base.module_category_theme" + ), + ), + ( + "category_id.parent_id", + "=", + self.env["ir.model.data"]._xmlid_to_res_id( + "base.module_category_theme" + ), + ), + ] + ) + + @api.model + def _selection_state(self): + selection = super()._selection_state() + selection.insert(2, ("theme", "Theme")) + selection.insert(2, ("website", "Website")) + return selection diff --git a/website_onboarding/wizards/onboarding_wizard_view.xml b/website_onboarding/wizards/onboarding_wizard_view.xml new file mode 100644 index 00000000..3b4b4478 --- /dev/null +++ b/website_onboarding/wizards/onboarding_wizard_view.xml @@ -0,0 +1,79 @@ + + + + base.onboarding.wizard + + + + + + +
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + +
+
+
+ +
+ +
+
+ +
+ + Live Preview + +
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + diff --git a/website_sale_install/__init__.py b/website_sale_install/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/website_sale_install/__manifest__.py b/website_sale_install/__manifest__.py new file mode 100644 index 00000000..c3f3214a --- /dev/null +++ b/website_sale_install/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "eCommerce", + "summary": "Sell your products online", + "author": "Onestein", + "website": "https://onestein.nl", + "category": "Website", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["website_sale"], + "bundle": True, +} diff --git a/website_sale_install/static/description/icon.png b/website_sale_install/static/description/icon.png new file mode 100644 index 00000000..32a04e33 Binary files /dev/null and b/website_sale_install/static/description/icon.png differ diff --git a/website_sale_install/static/description/icon.svg b/website_sale_install/static/description/icon.svg new file mode 100644 index 00000000..6c362b44 --- /dev/null +++ b/website_sale_install/static/description/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file