diff --git a/ext/clarico-addons/theme_clarico/__manifest__.py b/ext/clarico-addons/theme_clarico/__manifest__.py index 80f87e70..d7b361fb 100755 --- a/ext/clarico-addons/theme_clarico/__manifest__.py +++ b/ext/clarico-addons/theme_clarico/__manifest__.py @@ -1,62 +1,58 @@ { # Theme information - 'name' : 'Theme Clarico', - 'category' : 'Theme/eCommerce', - 'version' : '11.0.2.9', + 'name': 'Theme Clarico', + 'category': 'Theme/eCommerce', + 'version': '11.0.2.9', 'summary': 'Fully Responsive Odoo Theme suitable to both Services & eCommerce Businesses', 'description': """.""", - 'license': 'OPL-1', - - - + 'license': 'OPL-1', # Dependencies 'depends': [ - 'website', -# 'clarico_attribute_filter', -# 'clarico_latest_blogs', -# 'clarico_brand', -# 'clarico_category', -# 'clarico_category_attribute', -# 'clarico_customize_color', -# 'clarico_404', -# 'clarico_recently_viewed', -# 'clarico_contact', -# 'clarico_layout2', -# 'clarico_reset_password', -# 'clarico_shop_left_sidebar', -# 'clarico_shop_list', -# 'clarico_shop_right_sidebar', -# 'clarico_signin', -# 'clarico_signup', -# 'clarico_product_carousel_wishlist', -# 'clarico_quick_view_compare', -# 'clarico_quick_view_wishlist', -# 'clarico_quick_view_carousel', -# 'clarico_pricefilter', -# 'customize_theme', -# 'clarico_compare_wishlist', -# 'clarico_rating', -# 'clarico_category_description', -# 'clarico_similar_product', -# 'clarico_business_carousel', + 'website', + 'clarico_attribute_filter', + 'clarico_latest_blogs', + 'clarico_brand', + 'clarico_category', + 'clarico_category_attribute', + 'clarico_customize_color', + 'clarico_404', + 'clarico_recently_viewed', + 'clarico_contact', + 'clarico_layout2', + 'clarico_reset_password', + 'clarico_shop_left_sidebar', + 'clarico_shop_list', + 'clarico_shop_right_sidebar', + 'clarico_signin', + 'clarico_signup', + 'clarico_product_carousel_wishlist', + 'clarico_quick_view_compare', + 'clarico_quick_view_wishlist', + 'clarico_quick_view_carousel', + 'clarico_pricefilter', + 'customize_theme', + 'clarico_compare_wishlist', + 'clarico_rating', + 'clarico_category_description', + 'clarico_similar_product', + 'clarico_business_carousel', ], - # Views 'data': [ - 'data/clarico_data.xml', - # 'data/company_data/company_data.xml', + 'data/clarico_data.xml', + # 'data/company_data/company_data.xml', ], - - #Odoo Store Specific + + # Odoo Store Specific 'live_test_url': 'http://goo.gl/AU577q', 'images': [ 'static/description/main_poster.jpg', 'static/description/main_screenshot.jpg', ], - + # Author 'author': 'Emipro Technologies Pvt. Ltd.', 'website': 'http://www.emiprotechnologies.com', diff --git a/setup/lib/functions.py b/setup/lib/functions.py index 436b7dda..f6a5a1ba 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -261,48 +261,51 @@ class DatenpolFunctions(object): def setup_websites(self): """Setup Websites""" - if not self.odoo.env['ir.model.data'].search([('module', '=', 'website_multi_theme'), ('name', '=', 'clarico_multi')]): - # Create Theme - clarico_theme = self.odoo.env['website.theme'].create({ - 'name': 'Multiwebsite Clarico Theme', - 'converted_theme_addon': 'theme_clarico' - }) + ir_model_obj = self.odoo.env['ir.model.data'] + crm_team_obj = self.odoo.env['crm.team'] - vals = { - 'model': 'website.theme', - 'module': 'website_multi_theme', - 'name': 'clarico_multi', - 'res_id': str(clarico_theme), - 'noupdate': False, - } - self.odoo.env['ir.model.data'].create(vals) - - clarico_theme = self.odoo.env.ref('website_multi_theme.clarico_multi') + # if not ir_model_obj.search([('module', '=', 'website_multi_theme'), ('name', '=', 'clarico_multi')]): + # # Create Theme + # clarico_theme = self.odoo.env['website.theme'].create({ + # 'name': 'Multiwebsite Clarico Theme', + # 'converted_theme_addon': 'theme_clarico' + # }) + # + # vals = { + # 'model': 'website.theme', + # 'module': 'website_multi_theme', + # 'name': 'clarico_multi', + # 'res_id': str(clarico_theme), + # 'noupdate': False, + # } + # ir_model_obj.create(vals) + # + # clarico_theme = self.odoo.env.ref('website_multi_theme.clarico_multi') self.odoo.env.ref('website.default_website').multi_theme_reload() # create Salesteam for all websites - cr_team_ir_heizpaneel = self.odoo.env['crm.team'].search([('name', '=', 'IR Heizpaneele')]) + cr_team_ir_heizpaneel = crm_team_obj.search([('name', '=', 'IR Heizpaneele')]) if not cr_team_ir_heizpaneel: crm_team_vals = { 'name': 'IR Heizpaneele', 'team_type': 'website', 'company_id': self.odoo.env.ref('base.main_company').id, } - cr_team_ir_heizpaneel = self.odoo.env['crm.team'].create(crm_team_vals) + cr_team_ir_heizpaneel = crm_team_obj.browse([crm_team_obj.create(crm_team_vals)]) else: - cr_team_ir_heizpaneel = self.odoo.env['crm.team'].browse(cr_team_ir_heizpaneel) + cr_team_ir_heizpaneel = crm_team_obj.browse(cr_team_ir_heizpaneel) - cr_team_heizpaneel = self.odoo.env['crm.team'].search([('name', '=', 'Heizpaneele')]) + cr_team_heizpaneel = crm_team_obj.search([('name', '=', 'Heizpaneele')]) if not cr_team_heizpaneel: crm_team_vals = { 'name': 'Heizpaneele', 'team_type': 'website', 'company_id': self.odoo.env.ref('base.main_company').id, } - cr_team_heizpaneel = self.odoo.env['crm.team'].create(crm_team_vals) + cr_team_heizpaneel = crm_team_obj.browse([crm_team_obj.create(crm_team_vals)]) else: - cr_team_heizpaneel = self.odoo.env['crm.team'].browse(cr_team_heizpaneel) + cr_team_heizpaneel = crm_team_obj.browse(cr_team_heizpaneel) # Create and configure Websites default_website = self.odoo.env.ref('website.default_website') @@ -311,7 +314,7 @@ class DatenpolFunctions(object): 'domain': 'www.irheizpaneele.at', 'company_id': self.odoo.env.ref('base.main_company').id, 'salesteam_id': cr_team_ir_heizpaneel.id, - 'multi_theme_id': clarico_theme.id + 'multi_theme_id': self.odoo.env.ref('website_multi_theme.theme_default').id }) @@ -320,9 +323,9 @@ class DatenpolFunctions(object): 'domain': 'www.heizpaneele.at', 'company_id': self.odoo.env.ref('base.main_company').id, 'salesteam_id': cr_team_heizpaneel.id, - 'multi_theme_id': clarico_theme.id + 'multi_theme_id': self.odoo.env.ref('website_multi_theme.theme_default').id } - if not self.odoo.env['ir.model.data'].search([('module', '=', 'dp_website'), ('name', '=', 'tz_heizpaneele')]): + if not ir_model_obj.search([('module', '=', 'dp_website'), ('name', '=', 'tz_heizpaneele')]): heizpaneele = self.odoo.env['website'].create(heizpaneele_vals) vals = { 'model': 'website', @@ -331,7 +334,7 @@ class DatenpolFunctions(object): 'res_id': str(heizpaneele), 'noupdate': False, } - self.odoo.env['ir.model.data'].create(vals) + ir_model_obj.create(vals) else: heizpaneele = self.odoo.env.ref('dp_website.tz_heizpaneele') heizpaneele.write(heizpaneele_vals) @@ -360,6 +363,14 @@ class DatenpolFunctions(object): 'parent_id': self.odoo.env.ref('website.main_menu').id, }) + # remove unnecessary menus + if ir_model_obj.search([('module', '=', 'clarico_layout'), ('name', '=', 'clarico_categories')]): + self.odoo.env.ref('clarico_layout.clarico_categories').unlink() + if ir_model_obj.search([('module', '=', 'clarico_layout'), ('name', '=', 'clarico_diningroom')]): + self.odoo.env.ref('clarico_layout.clarico_diningroom').unlink() + if ir_model_obj.search([('module', '=', 'clarico_layout'), ('name', '=', 'clarico_livingroom')]): + self.odoo.env.ref('clarico_layout.clarico_livingroom').unlink() + return True def configure_payment_providers(self):