update setup and fixed clarico_them
parent
17ee7c8126
commit
a7e3d2d779
|
|
@ -1,62 +1,58 @@
|
||||||
{
|
{
|
||||||
# Theme information
|
# Theme information
|
||||||
'name' : 'Theme Clarico',
|
'name': 'Theme Clarico',
|
||||||
'category' : 'Theme/eCommerce',
|
'category': 'Theme/eCommerce',
|
||||||
'version' : '11.0.2.9',
|
'version': '11.0.2.9',
|
||||||
'summary': 'Fully Responsive Odoo Theme suitable to both Services & eCommerce Businesses',
|
'summary': 'Fully Responsive Odoo Theme suitable to both Services & eCommerce Businesses',
|
||||||
'description': """.""",
|
'description': """.""",
|
||||||
'license': 'OPL-1',
|
'license': 'OPL-1',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
'depends': [
|
'depends': [
|
||||||
'website',
|
'website',
|
||||||
# 'clarico_attribute_filter',
|
'clarico_attribute_filter',
|
||||||
# 'clarico_latest_blogs',
|
'clarico_latest_blogs',
|
||||||
# 'clarico_brand',
|
'clarico_brand',
|
||||||
# 'clarico_category',
|
'clarico_category',
|
||||||
# 'clarico_category_attribute',
|
'clarico_category_attribute',
|
||||||
# 'clarico_customize_color',
|
'clarico_customize_color',
|
||||||
# 'clarico_404',
|
'clarico_404',
|
||||||
# 'clarico_recently_viewed',
|
'clarico_recently_viewed',
|
||||||
# 'clarico_contact',
|
'clarico_contact',
|
||||||
# 'clarico_layout2',
|
'clarico_layout2',
|
||||||
# 'clarico_reset_password',
|
'clarico_reset_password',
|
||||||
# 'clarico_shop_left_sidebar',
|
'clarico_shop_left_sidebar',
|
||||||
# 'clarico_shop_list',
|
'clarico_shop_list',
|
||||||
# 'clarico_shop_right_sidebar',
|
'clarico_shop_right_sidebar',
|
||||||
# 'clarico_signin',
|
'clarico_signin',
|
||||||
# 'clarico_signup',
|
'clarico_signup',
|
||||||
# 'clarico_product_carousel_wishlist',
|
'clarico_product_carousel_wishlist',
|
||||||
# 'clarico_quick_view_compare',
|
'clarico_quick_view_compare',
|
||||||
# 'clarico_quick_view_wishlist',
|
'clarico_quick_view_wishlist',
|
||||||
# 'clarico_quick_view_carousel',
|
'clarico_quick_view_carousel',
|
||||||
# 'clarico_pricefilter',
|
'clarico_pricefilter',
|
||||||
# 'customize_theme',
|
'customize_theme',
|
||||||
# 'clarico_compare_wishlist',
|
'clarico_compare_wishlist',
|
||||||
# 'clarico_rating',
|
'clarico_rating',
|
||||||
# 'clarico_category_description',
|
'clarico_category_description',
|
||||||
# 'clarico_similar_product',
|
'clarico_similar_product',
|
||||||
# 'clarico_business_carousel',
|
'clarico_business_carousel',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
# Views
|
# Views
|
||||||
'data': [
|
'data': [
|
||||||
'data/clarico_data.xml',
|
'data/clarico_data.xml',
|
||||||
# 'data/company_data/company_data.xml',
|
# 'data/company_data/company_data.xml',
|
||||||
],
|
],
|
||||||
|
|
||||||
#Odoo Store Specific
|
# Odoo Store Specific
|
||||||
'live_test_url': 'http://goo.gl/AU577q',
|
'live_test_url': 'http://goo.gl/AU577q',
|
||||||
'images': [
|
'images': [
|
||||||
'static/description/main_poster.jpg',
|
'static/description/main_poster.jpg',
|
||||||
'static/description/main_screenshot.jpg',
|
'static/description/main_screenshot.jpg',
|
||||||
],
|
],
|
||||||
|
|
||||||
# Author
|
# Author
|
||||||
'author': 'Emipro Technologies Pvt. Ltd.',
|
'author': 'Emipro Technologies Pvt. Ltd.',
|
||||||
'website': 'http://www.emiprotechnologies.com',
|
'website': 'http://www.emiprotechnologies.com',
|
||||||
|
|
|
||||||
|
|
@ -261,48 +261,51 @@ class DatenpolFunctions(object):
|
||||||
def setup_websites(self):
|
def setup_websites(self):
|
||||||
"""Setup Websites"""
|
"""Setup Websites"""
|
||||||
|
|
||||||
if not self.odoo.env['ir.model.data'].search([('module', '=', 'website_multi_theme'), ('name', '=', 'clarico_multi')]):
|
ir_model_obj = self.odoo.env['ir.model.data']
|
||||||
# Create Theme
|
crm_team_obj = self.odoo.env['crm.team']
|
||||||
clarico_theme = self.odoo.env['website.theme'].create({
|
|
||||||
'name': 'Multiwebsite Clarico Theme',
|
|
||||||
'converted_theme_addon': 'theme_clarico'
|
|
||||||
})
|
|
||||||
|
|
||||||
vals = {
|
# if not ir_model_obj.search([('module', '=', 'website_multi_theme'), ('name', '=', 'clarico_multi')]):
|
||||||
'model': 'website.theme',
|
# # Create Theme
|
||||||
'module': 'website_multi_theme',
|
# clarico_theme = self.odoo.env['website.theme'].create({
|
||||||
'name': 'clarico_multi',
|
# 'name': 'Multiwebsite Clarico Theme',
|
||||||
'res_id': str(clarico_theme),
|
# 'converted_theme_addon': 'theme_clarico'
|
||||||
'noupdate': False,
|
# })
|
||||||
}
|
#
|
||||||
self.odoo.env['ir.model.data'].create(vals)
|
# vals = {
|
||||||
|
# 'model': 'website.theme',
|
||||||
clarico_theme = self.odoo.env.ref('website_multi_theme.clarico_multi')
|
# '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()
|
self.odoo.env.ref('website.default_website').multi_theme_reload()
|
||||||
|
|
||||||
# create Salesteam for all websites
|
# 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:
|
if not cr_team_ir_heizpaneel:
|
||||||
crm_team_vals = {
|
crm_team_vals = {
|
||||||
'name': 'IR Heizpaneele',
|
'name': 'IR Heizpaneele',
|
||||||
'team_type': 'website',
|
'team_type': 'website',
|
||||||
'company_id': self.odoo.env.ref('base.main_company').id,
|
'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:
|
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:
|
if not cr_team_heizpaneel:
|
||||||
crm_team_vals = {
|
crm_team_vals = {
|
||||||
'name': 'Heizpaneele',
|
'name': 'Heizpaneele',
|
||||||
'team_type': 'website',
|
'team_type': 'website',
|
||||||
'company_id': self.odoo.env.ref('base.main_company').id,
|
'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:
|
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
|
# Create and configure Websites
|
||||||
default_website = self.odoo.env.ref('website.default_website')
|
default_website = self.odoo.env.ref('website.default_website')
|
||||||
|
|
@ -311,7 +314,7 @@ class DatenpolFunctions(object):
|
||||||
'domain': 'www.irheizpaneele.at',
|
'domain': 'www.irheizpaneele.at',
|
||||||
'company_id': self.odoo.env.ref('base.main_company').id,
|
'company_id': self.odoo.env.ref('base.main_company').id,
|
||||||
'salesteam_id': cr_team_ir_heizpaneel.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',
|
'domain': 'www.heizpaneele.at',
|
||||||
'company_id': self.odoo.env.ref('base.main_company').id,
|
'company_id': self.odoo.env.ref('base.main_company').id,
|
||||||
'salesteam_id': cr_team_heizpaneel.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)
|
heizpaneele = self.odoo.env['website'].create(heizpaneele_vals)
|
||||||
vals = {
|
vals = {
|
||||||
'model': 'website',
|
'model': 'website',
|
||||||
|
|
@ -331,7 +334,7 @@ class DatenpolFunctions(object):
|
||||||
'res_id': str(heizpaneele),
|
'res_id': str(heizpaneele),
|
||||||
'noupdate': False,
|
'noupdate': False,
|
||||||
}
|
}
|
||||||
self.odoo.env['ir.model.data'].create(vals)
|
ir_model_obj.create(vals)
|
||||||
else:
|
else:
|
||||||
heizpaneele = self.odoo.env.ref('dp_website.tz_heizpaneele')
|
heizpaneele = self.odoo.env.ref('dp_website.tz_heizpaneele')
|
||||||
heizpaneele.write(heizpaneele_vals)
|
heizpaneele.write(heizpaneele_vals)
|
||||||
|
|
@ -360,6 +363,14 @@ class DatenpolFunctions(object):
|
||||||
'parent_id': self.odoo.env.ref('website.main_menu').id,
|
'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
|
return True
|
||||||
|
|
||||||
def configure_payment_providers(self):
|
def configure_payment_providers(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue