Merge pull request #1308 from expsa/dev_base_ahidev
[➕] new modules for themes (odex_themecraft + web_widget_colorpicker)
|
|
@ -0,0 +1,2 @@
|
|||
from . import models
|
||||
from .hooks import test_pre_init_hook
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': 'Odex ThemeCraft',
|
||||
'category': 'Tools',
|
||||
'version': '0.4',
|
||||
'summary': 'Odex ThemeCraft empowers Odoo users to unleash their creativity and design stunning odoo system that reflect their brand identity and vision. With its intuitive interface and powerful customization features, Odex ThemeCraft revolutionizes the way users approach odoo backend theming in Odoo.',
|
||||
'description': 'Odex ThemeCraft is a comprehensive theme customization module for Odoo, designed to empower users with the ability to tailor their Odoo backend themes according to their unique brand identity and preferences. With Odex ThemeCraft, users can effortlessly personalize the look and feel of their odoo system, ensuring it aligns perfectly with their brand image and style.',
|
||||
'author': "Expert Co. Ltd.",
|
||||
'website': "http://www.exp-sa.com",
|
||||
'license': '',
|
||||
'depends': ['web','odex25_web','web_widget_colorpicker'],
|
||||
'data': [
|
||||
'views/webclient.xml',
|
||||
'views/ir_settings.xml',
|
||||
],
|
||||
'pre_init_hook': 'test_pre_init_hook',
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': True,
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
import base64
|
||||
|
||||
from odoo import api, SUPERUSER_ID, _
|
||||
from odoo.modules import get_module_resource
|
||||
from odoo.exceptions import UserError
|
||||
import os
|
||||
|
||||
backend_theme_attrs = {
|
||||
'$navbar_bg_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_toggle': 'rgba(0,0,0,1)',
|
||||
'$selection_app_color': 'rgba(255,255,255,1)',
|
||||
'$selection_app_bg_hover': 'rgba(31,91,87,1)',
|
||||
'$navbar_ul_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_bg_color_hover': 'rgba(31,91,87,1)',
|
||||
'$navbar_ul_dropdown_bg_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_ul_dropdown_item_bg_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_color_hover': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_hover_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_badge_color': 'rgba(0,0,0,1)',
|
||||
|
||||
'$apps_bg_img': 'url(../img/odex_bg.jpg)',
|
||||
'$app_name_color': 'rgba(255,255,255,1)',
|
||||
'$app_hover_bg_color': 'rgba(31,91,87,1)',
|
||||
|
||||
'$apps_more_info': 'rgba(31,91,117,1)',
|
||||
'$apps_install_color': 'rgba(255,255,255,1)',
|
||||
'$apps_install_bg_color': 'rgba(38,133,127,1)',
|
||||
'$apps_upgrade_color': 'rgba(255,255,255,1)',
|
||||
'$apps_upgrade_bg_color': 'rgba(31,91,117,1)',
|
||||
|
||||
'$sections_titles_color': 'rgba(255,255,255,1)',
|
||||
'$sections_titles_bg': 'rgba(31,91,117,1)',
|
||||
|
||||
'$filter_icon_bg_color': 'rgba(31,91,117,1)',
|
||||
'$sidebar_categories_icon_color': 'rgba(31,91,117,1)',
|
||||
'$sidebar_categories_item_color': 'rgba(0,0,0,1)',
|
||||
'$sidebar_categories_item_bg_color': 'rgba(0,0,0,1)',
|
||||
'$sidebar_categories_item_hover_active_color': 'rgba(255,255,255,1)',
|
||||
'$sidebar_categories_item_bg_hover_active_color': 'rgba(38,133,127,1)',
|
||||
|
||||
'$english_default_font' : '"Roboto", "Odoo Unicode Support Noto", sans-serif',
|
||||
'$arabic_default_font' : '"Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
}
|
||||
|
||||
def replace_file(file_path, static_dict):
|
||||
try:
|
||||
with open(file_path, 'w+') as new_file:
|
||||
for key, value in static_dict.items():
|
||||
line = ''.join([key, ': ', value, ';\n'])
|
||||
new_file.write(line)
|
||||
new_file.close()
|
||||
except Exception as e:
|
||||
raise UserError(_("Please follow the readme file. Contact to Administrator.""\n %s") % e)
|
||||
|
||||
def test_pre_init_hook(cr):
|
||||
"""Hooks for Changing Menu Web_icon"""
|
||||
|
||||
try:
|
||||
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
theme_path = path + "/odex_themecraft/static/src/scss/variables.scss"
|
||||
except Exception as e:
|
||||
raise UserError(_("Please Contact to Administrator. \n %s") % e)
|
||||
|
||||
replace_file(theme_path, backend_theme_attrs)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# from . import ir_web_theme
|
||||
from . import model
|
||||
from . import ir_icons_settings
|
||||
|
|
@ -0,0 +1,391 @@
|
|||
import base64
|
||||
from odoo import api, fields, models, _, SUPERUSER_ID
|
||||
from odoo import modules
|
||||
from odoo.exceptions import UserError
|
||||
import os
|
||||
|
||||
def get_default_img():
|
||||
with open(modules.get_module_resource('odex_themecraft', 'static/src/img', 'app_drawer.jpeg'),'rb') as f:
|
||||
return base64.b64encode(f.read())
|
||||
|
||||
class ResIconsConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
#Icons settings
|
||||
setting_icon = fields.Binary(string="Settings Icon", attachment=True)
|
||||
apps_icon = fields.Binary(string="Apps Icon", attachment=True)
|
||||
discuss_icon = fields.Binary(string="Discuss Icon", attachment=True)
|
||||
website_icon = fields.Binary(string="Website Icon", attachment=True)
|
||||
sales_icon = fields.Binary(string="Sales Icon", attachment=True)
|
||||
invoicing_icon = fields.Binary(string="Invoicing Icon", attachment=True)
|
||||
crm_icon = fields.Binary(string="CRM Icon", attachment=True)
|
||||
mrp_icon = fields.Binary(string="MRP II Icon", attachment=True)
|
||||
inventory_icon = fields.Binary(string="Inventory Icon", attachment=True)
|
||||
accounting_icon = fields.Binary(string="Accounting Icon", attachment=True)
|
||||
purchase_icon = fields.Binary(string="Purchase Icon", attachment=True)
|
||||
pos_icon = fields.Binary(string="Point of Sale Icon", attachment=True)
|
||||
project_icon = fields.Binary(string="Project Icon", attachment=True)
|
||||
ecommerce_icon = fields.Binary(string="eCommerce Icon", attachment=True)
|
||||
manufacturing_icon = fields.Binary(string="Manufacturing Icon", attachment=True)
|
||||
email_marketing_icon = fields.Binary(string="Email Marketing Icon", attachment=True)
|
||||
timesheet_icon = fields.Binary(string="Timesheets Icon", attachment=True)
|
||||
expenses_icon = fields.Binary(string="Expenses Icon", attachment=True)
|
||||
studio_icon = fields.Binary(string="Studio Icon", attachment=True)
|
||||
time_off_icon = fields.Binary(string="Time Off Icon", attachment=True)
|
||||
recruitment_icon = fields.Binary(string="Recruitment Icon", attachment=True)
|
||||
employee_icon = fields.Binary(string="Employees Icon", attachment=True)
|
||||
maintenance_icon = fields.Binary(string="Maintenance Icon", attachment=True)
|
||||
sign_icon = fields.Binary(string="Sign Icon", attachment=True)
|
||||
helpdesk_icon = fields.Binary(string="Helpdesk Icon", attachment=True)
|
||||
subscriptions_icon = fields.Binary(string="Subscriptions Icon", attachment=True)
|
||||
quality_icon = fields.Binary(string="Quality Icon", attachment=True)
|
||||
elearning_icon = fields.Binary(string="eLearning Icon", attachment=True)
|
||||
planning_icon = fields.Binary(string="Planning Icon", attachment=True)
|
||||
data_cleaning_icon = fields.Binary(string="Data Cleaning Icon", attachment=True)
|
||||
events_icon = fields.Binary(string="Events Icon", attachment=True)
|
||||
contacts_icon = fields.Binary(string="Contacts Icon", attachment=True)
|
||||
mrp_icon = fields.Binary(string="Product Lifecycle Management (PLM) Icon", attachment=True)
|
||||
calendar_icon = fields.Binary(string="Calendar Icon", attachment=True)
|
||||
appraisal_icon = fields.Binary(string="Appraisal Icon", attachment=True)
|
||||
fleet_icon = fields.Binary(string="Fleet Icon", attachment=True)
|
||||
marketing_automation_icon = fields.Binary(string="Marketing Automation Icon", attachment=True)
|
||||
blogs_icon = fields.Binary(string="Blogs Icon", attachment=True)
|
||||
live_chat_icon = fields.Binary(string="Live Chat Icon", attachment=True)
|
||||
appointments_icon = fields.Binary(string="Appointments Icon", attachment=True)
|
||||
surveys_icon = fields.Binary(string="Surveys Icon", attachment=True)
|
||||
android_iphone_icon = fields.Binary(string="Android & iPhone Icon", attachment=True)
|
||||
dashboards_icon = fields.Binary(string="Dashboards Icon", attachment=True)
|
||||
repairs_icon = fields.Binary(string="Repairs Icon", attachment=True)
|
||||
attendance_icon = fields.Binary(string="Attendances Icon", attachment=True)
|
||||
sms_marketing_icon = fields.Binary(string="SMS Marketing Icon", attachment=True)
|
||||
barcode_icon = fields.Binary(string="Barcode Icon", attachment=True)
|
||||
notes_icon = fields.Binary(string="Notes Icon", attachment=True)
|
||||
forum_icon = fields.Binary(string="Forum Icon", attachment=True)
|
||||
skills_management_icon = fields.Binary(string="Skills Management Icon", attachment=True)
|
||||
voip_icon = fields.Binary(string="VoIP Icon", attachment=True)
|
||||
lunch_icon = fields.Binary(string="Lunch Icon", attachment=True)
|
||||
online_jobs_icon = fields.Binary(string="Online Jobs Icon", attachment=True)
|
||||
members_icon = fields.Binary(string="Members Icon", attachment=True)
|
||||
products_icon = fields.Binary(string="Products & Pricelists Icon", attachment=True)
|
||||
|
||||
def replace_file(self, file_path, static_dict):
|
||||
try:
|
||||
with open(file_path, 'w+') as new_file:
|
||||
for key, value in static_dict.items():
|
||||
line = ''.join([key, ': ', value, ';\n'])
|
||||
new_file.write(line)
|
||||
new_file.close()
|
||||
except Exception as e:
|
||||
raise UserError(_("Please follow the readme file. Contact to Administrator.""\n %s") % e)
|
||||
|
||||
@api.model
|
||||
def get_values(self):
|
||||
res = super(ResIconsConfigSettings, self).get_values()
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
#Icons settings
|
||||
setting_icon = ir_config.get_param('setting_icon')
|
||||
apps_icon = ir_config.get_param('apps_icon')
|
||||
discuss_icon = ir_config.get_param('discuss_icon')
|
||||
website_icon = ir_config.get_param('website_icon')
|
||||
sales_icon = ir_config.get_param('sales_icon')
|
||||
invoicing_icon = ir_config.get_param('invoicing_icon')
|
||||
crm_icon = ir_config.get_param('crm_icon')
|
||||
mrp_icon = ir_config.get_param('mrp_icon')
|
||||
inventory_icon = ir_config.get_param('inventory_icon')
|
||||
accounting_icon = ir_config.get_param('accounting_icon')
|
||||
purchase_icon = ir_config.get_param('purchase_icon')
|
||||
pos_icon = ir_config.get_param('pos_icon')
|
||||
project_icon = ir_config.get_param('project_icon')
|
||||
ecommerce_icon = ir_config.get_param('ecommerce_icon')
|
||||
manufacturing_icon = ir_config.get_param('manufacturing_icon')
|
||||
email_marketing_icon = ir_config.get_param('email_marketing_icon')
|
||||
timesheet_icon = ir_config.get_param('timesheet_icon')
|
||||
expenses_icon = ir_config.get_param('expenses_icon')
|
||||
studio_icon = ir_config.get_param('studio_icon')
|
||||
time_off_icon = ir_config.get_param('time_off_icon')
|
||||
recruitment_icon = ir_config.get_param('recruitment_icon')
|
||||
employee_icon = ir_config.get_param('employee_icon')
|
||||
maintenance_icon = ir_config.get_param('maintenance_icon')
|
||||
sign_icon = ir_config.get_param('sign_icon')
|
||||
helpdesk_icon = ir_config.get_param('helpdesk_icon')
|
||||
subscriptions_icon = ir_config.get_param('subscriptions_icon')
|
||||
quality_icon = ir_config.get_param('quality_icon')
|
||||
elearning_icon = ir_config.get_param('elearning_icon')
|
||||
planning_icon = ir_config.get_param('planning_icon')
|
||||
data_cleaning_icon = ir_config.get_param('data_cleaning_icon')
|
||||
events_icon = ir_config.get_param('events_icon')
|
||||
contacts_icon = ir_config.get_param('contacts_icon')
|
||||
mrp_icon = ir_config.get_param('mrp_icon')
|
||||
calendar_icon = ir_config.get_param('calendar_icon')
|
||||
appraisal_icon = ir_config.get_param('appraisal_icon')
|
||||
fleet_icon = ir_config.get_param('fleet_icon')
|
||||
marketing_automation_icon = ir_config.get_param('marketing_automation_icon')
|
||||
blogs_icon = ir_config.get_param('blogs_icon')
|
||||
live_chat_icon = ir_config.get_param('live_chat_icon')
|
||||
appointments_icon = ir_config.get_param('appointments_icon')
|
||||
surveys_icon = ir_config.get_param('surveys_icon')
|
||||
android_iphone_icon = ir_config.get_param('android_iphone_icon')
|
||||
dashboards_icon = ir_config.get_param('dashboards_icon')
|
||||
repairs_icon = ir_config.get_param('repairs_icon')
|
||||
attendance_icon = ir_config.get_param('attendance_icon')
|
||||
sms_marketing_icon = ir_config.get_param('sms_marketing_icon')
|
||||
barcode_icon = ir_config.get_param('barcode_icon')
|
||||
notes_icon = ir_config.get_param('notes_icon')
|
||||
forum_icon = ir_config.get_param('forum_icon')
|
||||
skills_management_icon = ir_config.get_param('skills_management_icon')
|
||||
voip_icon = ir_config.get_param('voip_icon')
|
||||
lunch_icon = ir_config.get_param('lunch_icon')
|
||||
online_jobs_icon = ir_config.get_param('online_jobs_icon')
|
||||
members_icon = ir_config.get_param('members_icon')
|
||||
products_icon = ir_config.get_param('products_icon')
|
||||
|
||||
# update resourcess
|
||||
res.update(setting_icon=setting_icon,apps_icon=apps_icon,discuss_icon=discuss_icon,website_icon=website_icon,
|
||||
sales_icon=sales_icon,invoicing_icon=invoicing_icon,crm_icon=crm_icon,mrp_icon=mrp_icon,
|
||||
inventory_icon=inventory_icon,accounting_icon=accounting_icon,purchase_icon=purchase_icon,
|
||||
pos_icon=pos_icon,project_icon=project_icon,ecommerce_icon=ecommerce_icon,manufacturing_icon=manufacturing_icon,
|
||||
email_marketing_icon=email_marketing_icon,timesheet_icon=timesheet_icon,expenses_icon=expenses_icon,
|
||||
studio_icon=studio_icon,time_off_icon=time_off_icon,recruitment_icon=recruitment_icon,employee_icon=employee_icon,
|
||||
maintenance_icon=maintenance_icon,sign_icon=sign_icon,helpdesk_icon=helpdesk_icon,subscriptions_icon=subscriptions_icon,
|
||||
quality_icon=quality_icon,elearning_icon=elearning_icon,planning_icon=planning_icon,data_cleaning_icon=data_cleaning_icon,
|
||||
events_icon=events_icon,contacts_icon=contacts_icon,calendar_icon=calendar_icon,appraisal_icon=appraisal_icon,
|
||||
fleet_icon=fleet_icon,marketing_automation_icon=marketing_automation_icon,blogs_icon=blogs_icon,
|
||||
live_chat_icon=live_chat_icon,appointments_icon=appointments_icon,surveys_icon=surveys_icon,android_iphone_icon=android_iphone_icon,
|
||||
dashboards_icon=dashboards_icon,repairs_icon=repairs_icon,attendance_icon=attendance_icon,sms_marketing_icon=sms_marketing_icon,
|
||||
barcode_icon=barcode_icon,notes_icon=notes_icon,forum_icon=forum_icon,skills_management_icon=skills_management_icon,
|
||||
voip_icon=voip_icon,lunch_icon=lunch_icon,online_jobs_icon=online_jobs_icon,members_icon=members_icon,
|
||||
products_icon=products_icon)
|
||||
|
||||
return res
|
||||
|
||||
def set_values(self):
|
||||
super(ResIconsConfigSettings, self).set_values()
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
#Icons Settings
|
||||
if self.setting_icon:
|
||||
menu_item = self.env['ir.ui.menu'].search([('parent_id', '=', False)])
|
||||
for menu in menu_item:
|
||||
print("***************************",menu.read())
|
||||
if menu.name == 'Settings':
|
||||
if self.setting_icon:
|
||||
ir_config.set_param("setting_icon",self.setting_icon)
|
||||
menu.write({'web_icon_data': self.setting_icon})
|
||||
elif menu.name == 'Apps':
|
||||
if self.apps_icon:
|
||||
ir_config.set_param("apps_icon",self.apps_icon)
|
||||
menu.write({'web_icon_data': self.apps_icon})
|
||||
elif menu.name == 'Discuss':
|
||||
if self.discuss_icon:
|
||||
ir_config.set_param("discuss_icon",self.discuss_icon)
|
||||
menu.write({'web_icon_data': self.discuss_icon})
|
||||
elif menu.name == 'Website':
|
||||
if self.website_icon:
|
||||
ir_config.set_param("website_icon",self.website_icon)
|
||||
menu.write({'web_icon_data': self.website_icon})
|
||||
elif menu.name == 'Sales':
|
||||
if self.sales_icon:
|
||||
ir_config.set_param("sales_icon",self.sales_icon)
|
||||
menu.write({'web_icon_data': self.sales_icon})
|
||||
elif menu.name == 'Invoicing':
|
||||
if self.invoicing_icon:
|
||||
ir_config.set_param("invoicing_icon",self.invoicing_icon)
|
||||
menu.write({'web_icon_data': self.invoicing_icon})
|
||||
elif menu.name == 'CRM':
|
||||
if self.crm_icon:
|
||||
ir_config.set_param("crm_icon",self.crm_icon)
|
||||
menu.write({'web_icon_data': self.crm_icon})
|
||||
elif menu.name == 'MRP II':
|
||||
if self.mrp_icon:
|
||||
ir_config.set_param("mrp_icon",self.mrp_icon)
|
||||
menu.write({'web_icon_data': self.mrp_icon})
|
||||
elif menu.name == 'Inventory':
|
||||
if self.inventory_icon:
|
||||
ir_config.set_param("inventory_icon",self.inventory_icon)
|
||||
menu.write({'web_icon_data': self.inventory_icon})
|
||||
elif menu.name == 'Accounting':
|
||||
if self.accounting_icon:
|
||||
ir_config.set_param("accounting_icon",self.accounting_icon)
|
||||
menu.write({'web_icon_data': self.accounting_icon})
|
||||
elif menu.name == 'Purchase':
|
||||
if self.purchase_icon:
|
||||
ir_config.set_param("purchase_icon",self.purchase_icon)
|
||||
menu.write({'web_icon_data': self.purchase_icon})
|
||||
elif menu.name == 'Point of Sale':
|
||||
if self.pos_icon:
|
||||
ir_config.set_param("pos_icon",self.pos_icon)
|
||||
menu.write({'web_icon_data': self.pos_icon})
|
||||
elif menu.name == 'Project':
|
||||
if self.project_icon:
|
||||
ir_config.set_param("project_icon",self.project_icon)
|
||||
menu.write({'web_icon_data': self.project_icon})
|
||||
elif menu.name == 'eCommerce':
|
||||
if self.ecommerce_icon:
|
||||
ir_config.set_param("ecommerce_icon",self.ecommerce_icon)
|
||||
menu.write({'web_icon_data': self.ecommerce_icon})
|
||||
elif menu.name == 'Manufacturing':
|
||||
if self.manufacturing_icon:
|
||||
ir_config.set_param("manufacturing_icon",self.manufacturing_icon)
|
||||
menu.write({'web_icon_data': self.manufacturing_icon})
|
||||
elif menu.name == 'Email Marketing':
|
||||
if self.email_marketing_icon:
|
||||
ir_config.set_param("email_marketing_icon",self.email_marketing_icon)
|
||||
menu.write({'web_icon_data': self.email_marketing_icon})
|
||||
elif menu.name == 'Timesheets':
|
||||
if self.timesheet_icon:
|
||||
ir_config.set_param("timesheet_icon",self.timesheet_icon)
|
||||
menu.write({'web_icon_data': self.timesheet_icon})
|
||||
elif menu.name == 'Expenses':
|
||||
if self.expenses_icon:
|
||||
ir_config.set_param("expenses_icon",self.expenses_icon)
|
||||
menu.write({'web_icon_data': self.expenses_icon})
|
||||
elif menu.name == 'Studio':
|
||||
if self.studio_icon:
|
||||
ir_config.set_param("studio_icon",self.studio_icon)
|
||||
menu.write({'web_icon_data': self.studio_icon})
|
||||
elif menu.name == 'Time Off':
|
||||
if self.time_off_icon:
|
||||
ir_config.set_param("time_off_icon",self.time_off_icon)
|
||||
menu.write({'web_icon_data': self.time_off_icon})
|
||||
elif menu.name == 'Recruitment':
|
||||
if self.recruitment_icon:
|
||||
ir_config.set_param("recruitment_icon",self.recruitment_icon)
|
||||
menu.write({'web_icon_data': self.recruitment_icon})
|
||||
elif menu.name == 'Employees':
|
||||
if self.employee_icon:
|
||||
ir_config.set_param("employee_icon",self.employee_icon)
|
||||
menu.write({'web_icon_data': self.employee_icon})
|
||||
elif menu.name == 'Maintenance':
|
||||
if self.maintenance_icon:
|
||||
ir_config.set_param("maintenance_icon",self.maintenance_icon)
|
||||
menu.write({'web_icon_data': self.maintenance_icon})
|
||||
elif menu.name == 'Sign':
|
||||
if self.sign_icon:
|
||||
ir_config.set_param("sign_icon",self.sign_icon)
|
||||
menu.write({'web_icon_data': self.sign_icon})
|
||||
elif menu.name == 'Helpdesk':
|
||||
if self.helpdesk_icon:
|
||||
ir_config.set_param("helpdesk_icon",self.helpdesk_icon)
|
||||
menu.write({'web_icon_data': self.helpdesk_icon})
|
||||
elif menu.name == 'Subscriptions':
|
||||
if self.subscriptions_icon:
|
||||
ir_config.set_param("subscriptions_icon",self.subscriptions_icon)
|
||||
menu.write({'web_icon_data': self.subscriptions_icon})
|
||||
elif menu.name == 'Quality':
|
||||
if self.quality_icon:
|
||||
ir_config.set_param("quality_icon",self.quality_icon)
|
||||
menu.write({'web_icon_data': self.quality_icon})
|
||||
elif menu.name == 'eLearning':
|
||||
if self.elearning_icon:
|
||||
ir_config.set_param("elearning_icon",self.elearning_icon)
|
||||
menu.write({'web_icon_data': self.elearning_icon})
|
||||
elif menu.name == 'Planning':
|
||||
if self.planning_iconss:
|
||||
ir_config.set_param("planning_icon",self.planning_icon)
|
||||
menu.write({'web_icon_data': self.planning_icon})
|
||||
elif menu.name == 'Data Cleaning':
|
||||
if self.data_cleaning_icon:
|
||||
ir_config.set_param("data_cleaning_icon",self.data_cleaning_icon)
|
||||
menu.write({'web_icon_data': self.data_cleaning_icon})
|
||||
elif menu.name == 'Events':
|
||||
if self.events_icon:
|
||||
ir_config.set_param("events_icon",self.events_icon)
|
||||
menu.write({'web_icon_data': self.events_icon})
|
||||
elif menu.name == 'Contacts':
|
||||
if self.contacts_icon:
|
||||
ir_config.set_param("contacts_icon",self.contacts_icon)
|
||||
menu.write({'web_icon_data': self.contacts_icon})
|
||||
elif menu.name == 'Product Lifecycle Management (PLM)':
|
||||
if self.mrp_icon:
|
||||
ir_config.set_param("mrp_icon",self.mrp_icon)
|
||||
menu.write({'web_icon_data': self.mrp_icon})
|
||||
elif menu.name == 'Calendar':
|
||||
if self.calendar_icon:
|
||||
ir_config.set_param("calendar_icon",self.calendar_icon)
|
||||
menu.write({'web_icon_data': self.calendar_icon})
|
||||
elif menu.name == 'Appraisal':
|
||||
if self.appraisal_icon:
|
||||
ir_config.set_param("appraisal_icon",self.appraisal_icon)
|
||||
menu.write({'web_icon_data': self.appraisal_icon})
|
||||
elif menu.name == 'Fleet':
|
||||
if self.fleet_icon:
|
||||
ir_config.set_param("fleet_icon",self.fleet_icon)
|
||||
menu.write({'web_icon_data': self.fleet_icon})
|
||||
elif menu.name == 'Marketing Automation':
|
||||
if self.marketing_automation_icon:
|
||||
ir_config.set_param("marketing_automation_icon",self.marketing_automation_icon)
|
||||
menu.write({'web_icon_data': self.marketing_automation_icon})
|
||||
elif menu.name == 'Blogs':
|
||||
if self.blogs_icon:
|
||||
ir_config.set_param("blogs_icon",self.blogs_icon)
|
||||
menu.write({'web_icon_data': self.blogs_icon})
|
||||
elif menu.name == 'Live Chat':
|
||||
if self.live_chat_icon:
|
||||
ir_config.set_param("live_chat_icon",self.live_chat_icon)
|
||||
menu.write({'web_icon_data': self.live_chat_icon})
|
||||
elif menu.name == 'Appointments':
|
||||
if self.appointments_icon:
|
||||
ir_config.set_param("appointments_icon",self.appointments_icon)
|
||||
menu.write({'web_icon_data': self.appointments_icon})
|
||||
elif menu.name == 'Surveys':
|
||||
if self.surveys_icon:
|
||||
ir_config.set_param("surveys_icon",self.surveys_icon)
|
||||
menu.write({'web_icon_data': self.surveys_icon})
|
||||
elif menu.name == 'Android & iPhone':
|
||||
if self.android_iphone_icon:
|
||||
ir_config.set_param("android_iphone_icon",self.android_iphone_icon)
|
||||
menu.write({'web_icon_data': self.android_iphone_icon})
|
||||
elif menu.name == 'Dashboards':
|
||||
if self.dashboards_icon:
|
||||
ir_config.set_param("dashboards_icon",self.dashboards_icon)
|
||||
menu.write({'web_icon_data': self.dashboards_icon})
|
||||
elif menu.name == 'Repairs':
|
||||
if self.repairs_icon:
|
||||
ir_config.set_param("repairs_icon",self.repairs_icon)
|
||||
menu.write({'web_icon_data': self.repairs_icon})
|
||||
elif menu.name == 'Attendances':
|
||||
if self.attendance_icon:
|
||||
ir_config.set_param("attendance_icon",self.attendance_icon)
|
||||
menu.write({'web_icon_data': self.attendance_icon})
|
||||
elif menu.name == 'SMS Marketing':
|
||||
if self.sms_marketing_icon:
|
||||
ir_config.set_param("sms_marketing_icon",self.sms_marketing_icon)
|
||||
menu.write({'web_icon_data': self.sms_marketing_icon})
|
||||
elif menu.name == 'Barcode':
|
||||
if self.barcode_icon:
|
||||
ir_config.set_param("barcode_icon",self.barcode_icon)
|
||||
menu.write({'web_icon_data': self.barcode_icon})
|
||||
elif menu.name == 'Notes':
|
||||
if self.notes_icon:
|
||||
ir_config.set_param("notes_icon",self.notes_icon)
|
||||
menu.write({'web_icon_data': self.notes_icon})
|
||||
elif menu.name == 'Forum':
|
||||
if self.forum_icon:
|
||||
ir_config.set_param("forum_icon",self.forum_icon)
|
||||
menu.write({'web_icon_data': self.forum_icon})
|
||||
elif menu.name == 'Skills Management':
|
||||
if self.skills_management_icon:
|
||||
ir_config.set_param("skills_management_icon",self.skills_management_icon)
|
||||
menu.write({'web_icon_data': self.skills_management_icon})
|
||||
elif menu.name == 'VoIP':
|
||||
if self.voip_icon:
|
||||
ir_config.set_param("voip_icon",self.voip_icon)
|
||||
menu.write({'web_icon_data': self.voip_icon})
|
||||
elif menu.name == 'Lunch':
|
||||
if self.lunch_icon:
|
||||
ir_config.set_param("lunch_icon",self.lunch_icon)
|
||||
menu.write({'web_icon_data': self.lunch_icon})
|
||||
elif menu.name == 'Online Jobs':
|
||||
if self.online_jobs_icon:
|
||||
ir_config.set_param("online_jobs_icon",self.online_jobs_icon)
|
||||
menu.write({'web_icon_data': self.online_jobs_icon})
|
||||
elif menu.name == 'Members':
|
||||
if self.members_icon:
|
||||
ir_config.set_param("members_icon",self.members_icon)
|
||||
menu.write({'web_icon_data': self.members_icon})
|
||||
elif menu.name == 'Products & Pricelists':
|
||||
if self.products_icon:
|
||||
ir_config.set_param("products_icon",self.products_icon)
|
||||
menu.write({'web_icon_data': self.products_icon})
|
||||
|
||||
|
|
@ -0,0 +1,296 @@
|
|||
import base64
|
||||
from odoo import api, fields, models, _, SUPERUSER_ID
|
||||
from odoo import modules
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.modules import get_module_resource
|
||||
import os
|
||||
|
||||
backend_theme_attrs = {
|
||||
'$navbar_bg_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_toggle': 'rgba(0,0,0,1)',
|
||||
'$selection_app_color': 'rgba(255,255,255,1)',
|
||||
'$selection_app_bg_hover': 'rgba(31,91,87,1)',
|
||||
'$navbar_ul_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_bg_color_hover': 'rgba(31,91,87,1)',
|
||||
'$navbar_ul_dropdown_bg_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_ul_dropdown_item_bg_color': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_color_hover': 'rgba(255,255,255,1)',
|
||||
'$navbar_ul_dropdown_item_hover_color': 'rgba(31,91,117,1)',
|
||||
'$navbar_badge_color': 'rgba(0,0,0,1)',
|
||||
|
||||
'$apps_bg_img': 'url(../img/odex_bg.jpg)',
|
||||
'$app_name_color': 'rgba(255,255,255,1)',
|
||||
'$app_hover_bg_color': 'rgba(31,91,87,1)',
|
||||
|
||||
'$apps_more_info': 'rgba(31,91,117,1)',
|
||||
'$apps_install_color': 'rgba(255,255,255,1)',
|
||||
'$apps_install_bg_color': 'rgba(38,133,127,1)',
|
||||
'$apps_upgrade_color': 'rgba(255,255,255,1)',
|
||||
'$apps_upgrade_bg_color': 'rgba(31,91,117,1)',
|
||||
|
||||
'$sections_titles_color': 'rgba(255,255,255,1)',
|
||||
'$sections_titles_bg': 'rgba(31,91,117,1)',
|
||||
|
||||
'$filter_icon_bg_color': 'rgba(31,91,117,1)',
|
||||
'$sidebar_categories_icon_color': 'rgba(31,91,117,1)',
|
||||
'$sidebar_categories_item_color': 'rgba(0,0,0,1)',
|
||||
'$sidebar_categories_item_bg_color': 'rgba(0,0,0,1)',
|
||||
'$sidebar_categories_item_hover_active_color': 'rgba(255,255,255,1)',
|
||||
'$sidebar_categories_item_bg_hover_active_color': 'rgba(38,133,127,1)',
|
||||
|
||||
'$english_default_font' : '"Roboto", "Odoo Unicode Support Noto", sans-serif',
|
||||
'$arabic_default_font' : '"Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
}
|
||||
|
||||
def get_default_img():
|
||||
with open(modules.get_module_resource('odex_themecraft', 'static/src/img', 'app_drawer.jpeg'),'rb') as f:
|
||||
return base64.b64encode(f.read())
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
# Navigation Bar
|
||||
navbar_bg_color = fields.Char(string='Navbar Background',default="rgba(31,91,117,1)")
|
||||
navbar_toggle = fields.Char(string='Navbar Background (Hover)',default="rgba(0,0,0,1)")
|
||||
selection_app_color = fields.Char(string='Main Menu Title Background',default="rgba(255,255,255,1)")
|
||||
selection_app_bg_hover = fields.Char(string='Main Menu Title Background (Hover)',default="rgba(31,91,87,1)")
|
||||
navbar_ul_color = fields.Char(string='Navbar Item Color',default="rgba(255,255,255,1)")
|
||||
navbar_ul_bg_color_hover = fields.Char(string='Navbar Item Background (Hover)',default="rgba(31,91,87,1)")
|
||||
navbar_ul_dropdown_bg_color = fields.Char(string='Navbar Dropdown Background',default="rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_item_color = fields.Char(string='Navbar Dropdown Item Color',default="rgba(31,91,117,1)")
|
||||
navbar_ul_dropdown_item_color_hover = fields.Char(string='Navbar Dropdown Color (Hover)',default="rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_item_bg_color = fields.Char(string='Navbar Dropdown Item Background',default="rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_item_hover_color = fields.Char(string='Navbar Dropdown Item Background (Hover)',default="rgba(31,91,117,1)")
|
||||
navbar_badge_color = fields.Char(string='Navbar Counter Badge Background',default="rgba(0,0,0,1)")
|
||||
# App Drawer (home)
|
||||
apps_bg_img = fields.Binary(string="App Drawer Background", attachment=True,default=get_default_img())
|
||||
app_name_color = fields.Char(string='Navbar Counter Badge Background',default="rgba(255,255,255,1)")
|
||||
app_hover_bg_color = fields.Char(string='App Background (Hover)',default="rgba(31,91,87,1)")
|
||||
# Apps Module
|
||||
apps_more_info = fields.Char(string='Apps More Info Button Background',default="rgba(31,91,117,1)")
|
||||
apps_install_color = fields.Char(string='Apps Install Button Color',default="rgba(255,255,255,1)")
|
||||
apps_install_bg_color = fields.Char(string='Apps Install Button Background',default="rgba(31,91,117,1)")
|
||||
apps_upgrade_color = fields.Char(string='Apps Upgrade Button Color',default="rgba(255,255,255,1)")
|
||||
apps_upgrade_bg_color = fields.Char(string='Apps Upgrade Button Background',default="rgba(31,91,117,1)")
|
||||
# Setting Module
|
||||
sections_titles_color = fields.Char(string='Section Titles Color',default="rgba(255,255,255,1)")
|
||||
sections_titles_bg = fields.Char(string='Section Titles Background',default="rgba(31,91,117,1)")
|
||||
# Font Settings
|
||||
english_default_font = fields.Selection([
|
||||
('default','Default'),
|
||||
('font_1','Helvetica'),
|
||||
('font_2','Futura'),
|
||||
('font_3','Garamond'),
|
||||
('font_4','Times'),
|
||||
('font_5','Arial'),
|
||||
('font_6','Verdana'),
|
||||
('font_7','Comic Sans'),
|
||||
('font_8','Trebuchet'),
|
||||
('font_9','Gill Sans'),
|
||||
('font_10','Georgia'),
|
||||
], string='English Default Font', config_parameter='odex_themecraft.english_default_font', default='default')
|
||||
arabic_default_font = fields.Selection([
|
||||
('default','Default'),
|
||||
('font_1','Arial'),
|
||||
('font_2','Droid Kufi'),
|
||||
('font_3','Aniri'),
|
||||
('font_4','Droid Naskh'),
|
||||
('font_5','Frutiger LT Arabic'),
|
||||
], string='Arabic Default Font', config_parameter='odex_themecraft.arabic_default_font', default='default')
|
||||
#Icons settings
|
||||
setting_icon = fields.Binary(string="Settings Icon", attachment=True)
|
||||
|
||||
def replace_file(self, file_path, static_dict):
|
||||
try:
|
||||
with open(file_path, 'w+') as new_file:
|
||||
for key, value in static_dict.items():
|
||||
line = ''.join([key, ': ', value, ';\n'])
|
||||
new_file.write(line)
|
||||
new_file.close()
|
||||
except Exception as e:
|
||||
raise UserError(_("Please follow the readme file. Contact to Administrator.""\n %s") % e)
|
||||
|
||||
@api.model
|
||||
def get_values(self):
|
||||
res = super(ResConfigSettings, self).get_values()
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
# Navigation Bar
|
||||
navbar_bg_color = ir_config.get_param('navbar_bg_color',"rgba(31,91,117,1)")
|
||||
navbar_toggle = ir_config.get_param('navbar_toggle',"rgba(0,0,0,1)")
|
||||
selection_app_color = ir_config.get_param('selection_app_color',"rgba(255,255,255,1)")
|
||||
selection_app_bg_hover = ir_config.get_param('selection_app_bg_hover',"rgba(31,91,87,1)")
|
||||
navbar_ul_color = ir_config.get_param('navbar_ul_color',"rgba(31,91,87,1)")
|
||||
navbar_ul_bg_color_hover = ir_config.get_param('navbar_ul_bg_color_hover',"rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_bg_color = ir_config.get_param('navbar_ul_dropdown_bg_color',"rgba(31,91,117,1)")
|
||||
navbar_ul_dropdown_item_color = ir_config.get_param('navbar_ul_dropdown_item_color',"rgba(31,91,117,1)")
|
||||
navbar_ul_dropdown_item_color_hover = ir_config.get_param('navbar_ul_dropdown_item_color_hover',"rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_item_bg_color = ir_config.get_param('navbar_ul_dropdown_item_bg_color',"rgba(255,255,255,1)")
|
||||
navbar_ul_dropdown_item_hover_color = ir_config.get_param('navbar_ul_dropdown_item_hover_color',"rgba(31,91,117,1)")
|
||||
navbar_badge_color = ir_config.get_param('navbar_badge_color',"rgba(0,0,0,1)")
|
||||
# App Drawer (home)
|
||||
apps_bg_img = ir_config.get_param('apps_bg_img')
|
||||
app_name_color = ir_config.get_param('app_name_color',"rgba(255,255,255,1)")
|
||||
app_hover_bg_color = ir_config.get_param('app_hover_bg_color',"rgba(31,91,87,1)")
|
||||
# Apps Module
|
||||
apps_more_info = ir_config.get_param('apps_more_info',"rgba(31,91,117,1)")
|
||||
apps_install_color = ir_config.get_param('apps_install_color',"rgba(255,255,255,1)")
|
||||
apps_install_bg_color = ir_config.get_param('apps_install_bg_color',"rgba(31,91,117,1)")
|
||||
apps_upgrade_color = ir_config.get_param('apps_upgrade_color',"rgba(255,255,255,1)")
|
||||
apps_upgrade_bg_color = ir_config.get_param('apps_upgrade_bg_color',"rgba(31,91,117,1)")
|
||||
# Setting Module
|
||||
sections_titles_color = ir_config.get_param('sections_titles_color',"rgba(255,255,255,1)")
|
||||
sections_titles_bg = ir_config.get_param('sections_titles_bg',"rgba(31,91,117,1)")
|
||||
# Fonts Settings
|
||||
english_default_font = ir_config.get_param('english_default_font','default')
|
||||
arabic_default_font = ir_config.get_param('arabic_default_font','default')
|
||||
|
||||
# update resourcess
|
||||
res.update(navbar_bg_color=navbar_bg_color,navbar_toggle=navbar_toggle,selection_app_color=selection_app_color,
|
||||
selection_app_bg_hover=selection_app_bg_hover,navbar_ul_color=navbar_ul_color,navbar_ul_bg_color_hover=navbar_ul_bg_color_hover,
|
||||
navbar_ul_dropdown_bg_color=navbar_ul_dropdown_bg_color,navbar_ul_dropdown_item_color=navbar_ul_dropdown_item_color,
|
||||
navbar_ul_dropdown_item_color_hover=navbar_ul_dropdown_item_color_hover,navbar_ul_dropdown_item_bg_color=navbar_ul_dropdown_item_bg_color,
|
||||
navbar_ul_dropdown_item_hover_color=navbar_ul_dropdown_item_hover_color,navbar_badge_color=navbar_badge_color,
|
||||
apps_bg_img=apps_bg_img,app_name_color=app_name_color,app_hover_bg_color=app_hover_bg_color,apps_more_info=apps_more_info,
|
||||
apps_install_color=apps_install_color,apps_install_bg_color=apps_install_bg_color,apps_upgrade_color=apps_upgrade_color,
|
||||
apps_upgrade_bg_color=apps_upgrade_bg_color,sections_titles_color=sections_titles_color,sections_titles_bg=sections_titles_bg,
|
||||
english_default_font=english_default_font,arabic_default_font=arabic_default_font)
|
||||
return res
|
||||
|
||||
def set_values(self):
|
||||
super(ResConfigSettings, self).set_values()
|
||||
ir_config = self.env['ir.config_parameter'].sudo()
|
||||
|
||||
# Navigation Bar
|
||||
ir_config.set_param("navbar_bg_color",self.navbar_bg_color)
|
||||
ir_config.set_param("navbar_toggle",self.navbar_toggle)
|
||||
ir_config.set_param("selection_app_color",self.selection_app_color)
|
||||
ir_config.set_param("selection_app_bg_hover",self.selection_app_bg_hover)
|
||||
ir_config.set_param("navbar_ul_color",self.navbar_ul_color)
|
||||
ir_config.set_param("navbar_ul_bg_color_hover",self.navbar_ul_bg_color_hover)
|
||||
ir_config.set_param("navbar_ul_dropdown_bg_color",self.navbar_ul_dropdown_bg_color)
|
||||
ir_config.set_param("navbar_ul_dropdown_item_color",self.navbar_ul_dropdown_item_color)
|
||||
ir_config.set_param("navbar_ul_dropdown_item_color_hover",self.navbar_ul_dropdown_item_color_hover)
|
||||
ir_config.set_param("navbar_ul_dropdown_item_bg_color",self.navbar_ul_dropdown_item_bg_color)
|
||||
ir_config.set_param("navbar_ul_dropdown_item_hover_color",self.navbar_ul_dropdown_item_hover_color)
|
||||
ir_config.set_param("navbar_badge_color",self.navbar_badge_color)
|
||||
# App Drawer (home)
|
||||
ir_config.set_param("apps_bg_img",self.apps_bg_img)
|
||||
ir_config.set_param("app_name_color",self.app_name_color)
|
||||
ir_config.set_param("app_hover_bg_color",self.app_hover_bg_color)
|
||||
# Apps Module
|
||||
ir_config.set_param("apps_more_info",self.apps_more_info)
|
||||
ir_config.set_param("apps_install_color",self.apps_install_color)
|
||||
ir_config.set_param("apps_install_bg_color",self.apps_install_bg_color)
|
||||
ir_config.set_param("apps_upgrade_color",self.apps_upgrade_color)
|
||||
ir_config.set_param("apps_upgrade_bg_color",self.apps_upgrade_bg_color)
|
||||
# Setting Module
|
||||
ir_config.set_param("sections_titles_color",self.sections_titles_color)
|
||||
ir_config.set_param("sections_titles_bg",self.sections_titles_bg)
|
||||
#Font Settings
|
||||
ir_config.set_param("english_default_font",self.english_default_font)
|
||||
ir_config.set_param("arabic_default_font",self.arabic_default_font)
|
||||
#Icons settings
|
||||
ir_config.set_param("setting_icon",self.setting_icon)
|
||||
|
||||
try:
|
||||
path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
theme_path = path + "/odex_themecraft/static/src/scss/variables.scss"
|
||||
except Exception as e:
|
||||
raise UserError(_("Please Contact to Administrator. \n %s") % e)
|
||||
|
||||
# Navigation Bar
|
||||
if self.navbar_bg_color:
|
||||
backend_theme_attrs.update({'$navbar_bg_color': self.navbar_bg_color})
|
||||
if self.navbar_toggle:
|
||||
backend_theme_attrs.update({'$navbar_toggle': self.navbar_toggle})
|
||||
if self.selection_app_color:
|
||||
backend_theme_attrs.update({'$selection_app_color': self.selection_app_color})
|
||||
if self.selection_app_bg_hover:
|
||||
backend_theme_attrs.update({'$selection_app_bg_hover': self.selection_app_bg_hover})
|
||||
if self.navbar_ul_color:
|
||||
backend_theme_attrs.update({'$navbar_ul_color': self.navbar_ul_color})
|
||||
if self.navbar_ul_bg_color_hover:
|
||||
backend_theme_attrs.update({'$navbar_ul_bg_color_hover': self.navbar_ul_bg_color_hover})
|
||||
if self.navbar_ul_dropdown_bg_color:
|
||||
backend_theme_attrs.update({'$navbar_ul_dropdown_bg_color': self.navbar_ul_dropdown_bg_color})
|
||||
if self.navbar_ul_dropdown_item_color:
|
||||
backend_theme_attrs.update({'$navbar_ul_dropdown_item_color': self.navbar_ul_dropdown_item_color})
|
||||
if self.navbar_ul_dropdown_item_color_hover:
|
||||
backend_theme_attrs.update({'$navbar_ul_dropdown_item_color_hover': self.navbar_ul_dropdown_item_color_hover})
|
||||
if self.navbar_ul_dropdown_item_bg_color:
|
||||
backend_theme_attrs.update({'$navbar_ul_dropdown_item_bg_color': self.navbar_ul_dropdown_item_bg_color})
|
||||
if self.navbar_badge_color:
|
||||
backend_theme_attrs.update({'$navbar_badge_color': self.navbar_badge_color})
|
||||
|
||||
# App Drawer (home)
|
||||
if self.apps_bg_img:
|
||||
backend_theme_attrs.update({'$apps_bg_img': "url('" + ("/web/image/res.config.settings/%s/apps_bg_img" % self.id) + "')"})
|
||||
if self.app_name_color:
|
||||
backend_theme_attrs.update({'$app_name_color': self.app_name_color})
|
||||
if self.app_hover_bg_color:
|
||||
backend_theme_attrs.update({'$app_hover_bg_color': self.app_hover_bg_color})
|
||||
|
||||
# Apps Module
|
||||
if self.apps_more_info:
|
||||
backend_theme_attrs.update({'$apps_more_info': self.apps_more_info})
|
||||
if self.apps_install_color:
|
||||
backend_theme_attrs.update({'$apps_install_color': self.apps_install_color})
|
||||
if self.apps_install_bg_color:
|
||||
backend_theme_attrs.update({'$apps_install_bg_color': self.apps_install_bg_color})
|
||||
if self.apps_upgrade_color:
|
||||
backend_theme_attrs.update({'$apps_upgrade_color': self.apps_upgrade_color})
|
||||
if self.apps_upgrade_bg_color:
|
||||
backend_theme_attrs.update({'$apps_upgrade_bg_color': self.apps_upgrade_bg_color})
|
||||
|
||||
# Setting Module
|
||||
if self.sections_titles_color:
|
||||
backend_theme_attrs.update({'$sections_titles_color': self.sections_titles_color})
|
||||
if self.sections_titles_bg:
|
||||
backend_theme_attrs.update({'$sections_titles_bg': self.sections_titles_bg})
|
||||
|
||||
# Font Settings
|
||||
# English Font
|
||||
if self.english_default_font:
|
||||
english_font = '"Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.english_default_font == 'font_1':
|
||||
english_font = 'Helvetica, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_2':
|
||||
english_font = 'Futura, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_3':
|
||||
english_font = 'Garamond, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_4':
|
||||
english_font = 'Times, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_5':
|
||||
english_font = 'Arial, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_6':
|
||||
english_font = 'Verdana, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_7':
|
||||
english_font = 'Comic Sans, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_8':
|
||||
english_font = 'Trebuchet, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_9':
|
||||
english_font = 'Gill Sans, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
elif self.english_default_font == 'font_10':
|
||||
english_font = 'Georgia, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
# Update english default font
|
||||
backend_theme_attrs.update({'$english_default_font': english_font})
|
||||
# Arabic Font
|
||||
if self.arabic_default_font:
|
||||
arabic_font = '"Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.arabic_default_font == 'font_1':
|
||||
arabic_font = 'Arial, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.arabic_default_font == 'font_2':
|
||||
arabic_font = '"Droid Arabic Kufi", "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.arabic_default_font == 'font_3':
|
||||
arabic_font = 'Amiri, "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.arabic_default_font == 'font_4':
|
||||
arabic_font = '"Droid Arabic Naskh", "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
if self.arabic_default_font == 'font_5':
|
||||
arabic_font = '"Frutiger LT Arabic", "Roboto", "Odoo Unicode Support Noto", sans-serif'
|
||||
# Update arabic default font
|
||||
backend_theme_attrs.update({'$arabic_default_font': arabic_font})
|
||||
|
||||
self.replace_file(theme_path, backend_theme_attrs)
|
||||
|
||||
|
After Width: | Height: | Size: 9.9 KiB |
|
|
@ -0,0 +1,83 @@
|
|||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan"
|
||||
style="text-align: center;font-size: 25px;font-weight: 600;margin: 0px !important;color:#145374;">
|
||||
ONE OF ODEX MODULES</h2>
|
||||
<h6 class="oe_slogan" style="text-align: center;font-size: 18px;">
|
||||
ODEX system is over than 200+ modules developed by love of Expert Company, based on ODOO system
|
||||
<br/>
|
||||
.to effectively suite's Saudi and Arabic market needs.It is the first Arabic open source ERP and all-in-one
|
||||
solution
|
||||
</h6>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan"
|
||||
style="text-align: center;font-size: 25px;font-weight: 600;margin: 0px !important;color:#145374;">
|
||||
Contact Us
|
||||
</h2>
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="display:flex;padding-top: 20px;justify-content: space-between;">
|
||||
<div style="flex-basis: 18%;"></div>
|
||||
<div style="flex-basis: 18%;">
|
||||
<div style="width:60px;height:60px;background:#fff; border-radius:100%;margin: auto;">
|
||||
<a href="https://exp-sa.com" target="_blank">
|
||||
<img src="internet.png" style="width: 100%;border-radius: 100%;"/>
|
||||
</a>
|
||||
</div>
|
||||
<h3 class="oe_slogan"
|
||||
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
|
||||
<a href="https://exp-sa.com/" target="_blank">
|
||||
www.exp-sa.com
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div style="flex-basis: 18%;">
|
||||
<div style="width:60px;height:60px;background:#fff; border-radius:100%;margin: auto;">
|
||||
<a href="https://twitter.com/expcosa/" target="_blank">
|
||||
<img src="twitter.png" style="width: 100%;border-radius: 100%;"/>
|
||||
</a>
|
||||
</div>
|
||||
<h3 class="oe_slogan"
|
||||
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
|
||||
<a href="https://twitter.com/expcosa/" target="_blank">
|
||||
exposa
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div style="flex-basis: 18%;">
|
||||
<div style="width:60px;height:60px;background:#fff; border-radius:100%;margin: auto;">
|
||||
<a href="https://www.linkedin.com/in/expert-company-52b5b812b/" target="_blank">
|
||||
<img src="linkedin.png" style="width: 100%;"/>
|
||||
</a>
|
||||
</div>
|
||||
<h3 class="oe_slogan"
|
||||
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
|
||||
<a href="https://www.linkedin.com/in/expert-company-52b5b812b/" target="_blank">
|
||||
exposa
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div style="flex-basis: 18%;">
|
||||
<div style="width:60px;height:60px;background:#fff; border-radius:100%;margin: auto;">
|
||||
<a href="https://erp.exp-sa.com/contactus/" target="_blank">
|
||||
<img src="mail.png" style="width: 100%;"/>
|
||||
</a>
|
||||
</div>
|
||||
<h3 class="oe_slogan"
|
||||
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
|
||||
<a href="https://erp.exp-sa.com/contactus/" target="_blank">
|
||||
Info@exp-sa.com
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div style="flex-basis: 18%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_separator">
|
||||
</section>
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
|
@ -0,0 +1,77 @@
|
|||
.o_main_navbar{
|
||||
border-color: transparent!important;
|
||||
background-color: #3E5D7F!important;
|
||||
}
|
||||
|
||||
.o_main_navbar > ul > li > a:hover,
|
||||
.o_main_navbar > ul > li > a:focus{
|
||||
background-color: #5280b3 !important;
|
||||
}
|
||||
.o_main_navbar > a:hover,
|
||||
.o_main_navbar > button:hover,
|
||||
.o_main_navbar > a:focus,
|
||||
.o_main_navbar > button:focus
|
||||
{
|
||||
background: #5280b3;
|
||||
}
|
||||
.o_main_navbar .show .dropdown-toggle{
|
||||
background-color: #5280b3;
|
||||
}
|
||||
.o_home_menu_background{
|
||||
background: url(/odex_themecraft/static/src/images/app_drawer.jpeg) no-repeat center/cover!important;
|
||||
}
|
||||
|
||||
#about .o_setting_right_pane img{
|
||||
height: 60px;
|
||||
}
|
||||
.o_home_menu_background:not(.o_home_menu_background_custom) .o_main_navbar{
|
||||
background: transparent!important;
|
||||
}
|
||||
|
||||
|
||||
.o_searchview .o_searchview_facet .o_searchview_facet_label{
|
||||
background-color: #5280b3;
|
||||
}
|
||||
|
||||
.o_view_nocontent .o_nocontent_help .o_view_nocontent_smiling_face:before{
|
||||
background: transparent url(/odex_themecraft/static/src/images/smiling_face.svg) no-repeat center;
|
||||
}
|
||||
.o_loading{
|
||||
background-color: #5280b3;
|
||||
}
|
||||
|
||||
.o_tooltip::before{
|
||||
background: radial-gradient(#3d5774, #3e5d7f);
|
||||
}
|
||||
|
||||
.o_tooltip.active{
|
||||
border: 3px solid #5280b3!important;
|
||||
}
|
||||
|
||||
.btn-fill-primary, .btn-primary{
|
||||
background-color: #5280b3;
|
||||
border-color: #3E5D7F;
|
||||
}
|
||||
|
||||
.btn-fill-primary:hover, .btn-primary:hover{
|
||||
background-color: #3E5D7F!important;
|
||||
border-color: #3E5D7F;
|
||||
}
|
||||
|
||||
.o_barcode_client_action .o_barcode_header{
|
||||
background-color: #5280b3;
|
||||
}
|
||||
.o_barcode_client_action .o_barcode_lines_header{
|
||||
background-color: #5280b3;
|
||||
}
|
||||
.o_onboarding.o_onboarding_violet .o_onboarding_wrap{
|
||||
background-color: rgb(39 120 63 / 60%);
|
||||
background-image: linear-gradient(to bottom, rgba(96, 112, 195, 0.5), #5280b3);
|
||||
}
|
||||
.o_onboarding.o_onboarding_orange .o_onboarding_wrap{
|
||||
background-color: rgb(39 120 63 / 60%);
|
||||
background-image: linear-gradient(to bottom, rgba(96, 112, 195, 0.5), #5280b3);
|
||||
}
|
||||
.o_MessagingMenu_counter{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
.btn-fill-secondary, .btn-secondary{
|
||||
background: #5280b3;
|
||||
border-color: #3E5D7F!important;
|
||||
}
|
||||
.btn-fill-primary, .btn-primary{
|
||||
background-color: #5280b3;
|
||||
border-color: #3E5D7F;
|
||||
}
|
||||
.btn-fill-primary:hover, .btn-primary:hover{
|
||||
background-color: #3E5D7F!important;
|
||||
border-color: #3E5D7F;
|
||||
}
|
||||
|
||||
.o_home_menu_background{
|
||||
background: url(/odex_themecraft/static/src/images/login.jpg) no-repeat center/cover!important;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
.pos .pos-topheader{
|
||||
background:#5280b3;
|
||||
}
|
||||
|
||||
.pos .pos-rightheader .header-button{
|
||||
border-right: 1px solid #3E5D7F;
|
||||
}
|
||||
.pos .pos-rightheader .header-button:last-child{
|
||||
border-left: 1px solid #3E5D7F;
|
||||
}
|
||||
.ticket-button:hover,
|
||||
.ticket-button:focus{
|
||||
background-color: #5280b3 !important;
|
||||
}
|
||||
.pos .pos-rightheader > *{
|
||||
border-right: 1px solid #3E5D7F;
|
||||
}
|
||||
BIN
odex25_base/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-BoldSlanted.woff
Executable file
BIN
odex25_base/odex_themecraft/static/src/fonts/arabic/Kufi/DroidKufi-Regular.woff2
Executable file
BIN
odex25_base/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.eot
Executable file
BIN
odex25_base/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.ttf
Executable file
|
After Width: | Height: | Size: 290 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
|
@ -0,0 +1,44 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="120" height="140" viewBox="0 0 120 140">
|
||||
<defs>
|
||||
<linearGradient id="empty_state_file_happy-c" x1="91.284%" x2="25.707%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#3E5D7F"/>
|
||||
<stop offset="100%" stop-color="#3E5D7F"/>
|
||||
</linearGradient>
|
||||
<circle id="empty_state_file_happy-b" cx="56" cy="76.614" r="56"/>
|
||||
<filter id="empty_state_file_happy-a" width="112.5%" height="112.5%" x="-6.2%" y="-4.5%" filterUnits="objectBoundingBox">
|
||||
<feOffset dy="2" in="SourceAlpha" result="shadowOffsetOuter1"/>
|
||||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="2"/>
|
||||
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.106063179 0"/>
|
||||
</filter>
|
||||
<path id="empty_state_file_happy-d" d="M56,122.807018 C86.927946,122.807018 112,97.6721263 112,66.6666667 C112,59.6606665 112,37.4384443 112,0 L0,0 C0,23.774138 0,45.9963602 0,66.6666667 C0,97.6721263 25.072054,122.807018 56,122.807018 Z"/>
|
||||
<path id="empty_state_file_happy-f" d="M22,6.01503759 L84.3146067,6.01503759 L100.5,22.556391 L100.5,114.829574 L100.5,114.829574 C100.5,124.218415 92.8888407,131.829574 83.5,131.829574 L31,131.829574 L31,131.829574 C21.6111593,131.829574 14,124.218415 14,114.829574 L14,14.0150376 L14,14.0150376 C14,9.5967596 17.581722,6.01503759 22,6.01503759 Z"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd" transform="translate(4 2)">
|
||||
<use fill="#000" filter="url(#empty_state_file_happy-a)" xlink:href="#empty_state_file_happy-b"/>
|
||||
<use fill="url(#empty_state_file_happy-c)" xlink:href="#empty_state_file_happy-b"/>
|
||||
<g transform="translate(0 10)">
|
||||
<mask id="empty_state_file_happy-e" fill="#fff">
|
||||
<use xlink:href="#empty_state_file_happy-d"/>
|
||||
</mask>
|
||||
<g mask="url(#empty_state_file_happy-e)">
|
||||
<use fill="#FFF" xlink:href="#empty_state_file_happy-f"/>
|
||||
<path stroke="#A1ACBA" stroke-width="2" d="M99.5,22.9642476 L83.8940075,7.01503759 L22,7.01503759 C18.1340068,7.01503759 15,10.1490443 15,14.0150376 L15,114.829574 C15,123.66613 22.163444,130.829574 31,130.829574 L83.5,130.829574 C92.336556,130.829574 99.5,123.66613 99.5,114.829574 L99.5,22.9642476 Z"/>
|
||||
</g>
|
||||
<path stroke="#A1ACBA" stroke-width="2" d="M84.8002454,27.5045043 C87.4060329,25.0223449 91.4154529,21.2660453 91.7879265,20.6269769 C92.0921888,20.1049414 92.2011803,19.5697888 92.2011803,18.5540391 C92.2011803,17.9213416 92.0599129,17.3140076 91.7659798,16.6778758 C91.2745815,15.6143886 90.3683274,14.4694369 88.765383,12.8381982 C88.2386259,12.302143 86.3189539,10.4445628 84.8002454,8.96835098 L84.8002454,27.5045043 Z" mask="url(#empty_state_file_happy-e)" transform="rotate(135 88.5 18.226)"/>
|
||||
<g fill="#000" mask="url(#empty_state_file_happy-e)" opacity=".07">
|
||||
<g transform="translate(23 81)">
|
||||
<rect width="46.716" height="6.214"/>
|
||||
<rect width="68.812" height="6.214" y="8.7"/>
|
||||
<rect width="42.297" height="6.214" y="20.506"/>
|
||||
<rect width="52.398" height="6.214" y="31.07"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path stroke="#A1ACBA" stroke-linecap="round" stroke-width="2" d="M13 14L4 5M18 9L18 0M1 20L10 20"/>
|
||||
<g transform="translate(28.491 43.21)">
|
||||
<path stroke="#A1ACBA" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.5087719,17.7894737 C28.0087719,26.7894737 44.5087719,17.7894737 44.5087719,17.7894737"/>
|
||||
<circle cx="48.009" cy="5.289" r="3.5" fill="#A1ACBA"/>
|
||||
<circle cx="8.009" cy="5.289" r="3.5" fill="#A1ACBA"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -0,0 +1,168 @@
|
|||
odoo.define('odex_themecraft.UserMenu', function (require) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* This widget is appended by the webclient to the right of the navbar.
|
||||
* It displays the avatar and the name of the logged user (and optionally the
|
||||
* db name, in debug mode).
|
||||
* If clicked, it opens a dropdown allowing the user to perform actions like
|
||||
* editing its preferences, accessing the documentation, logging out...
|
||||
*/
|
||||
|
||||
var UserMenu = require('web.UserMenu');
|
||||
//避免错误,要再定义
|
||||
var documentation_url = 'https://www.odooai.cn';
|
||||
var documentation_dev_url = 'https://www.odooai.cn';
|
||||
var support_url = 'https://www.odooai.cn';
|
||||
var account_title = 'My Account';
|
||||
var account_url = 'https://www.odooai.cn';
|
||||
|
||||
UserMenu.include({
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
var session = this.getSession();
|
||||
var lang_list = '';
|
||||
|
||||
self._rpc({
|
||||
model: 'res.lang',
|
||||
method: 'search_read',
|
||||
domain: [],
|
||||
fields: ['name', 'code'],
|
||||
lazy: false,
|
||||
}).then(function (res) {
|
||||
_.each(res, function (lang) {
|
||||
var a = '';
|
||||
if (lang['code'] === session.user_context.lang) {
|
||||
a = '<i class="fa fa-check"></i>';
|
||||
} else {
|
||||
a = '';
|
||||
}
|
||||
lang_list += '<a role="menuitem" href="#" class="dropdown-item" data-lang-menu="lang" data-lang-id="' + lang['code']
|
||||
+ '"><img class="flag" src="app_odoo_customize/static/src/img/flags/' + lang['code'] + '.png"/>' + lang['name'] + a + '</a>';
|
||||
});
|
||||
lang_list += '<div role="separator" class="dropdown-divider"/>';
|
||||
setTimeout( function() {
|
||||
$('switch-lang').replaceWith(lang_list);
|
||||
}, 1000);
|
||||
})
|
||||
|
||||
//取参数
|
||||
self._rpc({
|
||||
model: 'ir.config_parameter',
|
||||
method: 'search_read',
|
||||
domain: [['key', '=like', 'app_%']],
|
||||
fields: ['key', 'value'],
|
||||
lazy: false,
|
||||
}).then(function (res) {
|
||||
$.each(res, function (key, val) {
|
||||
if (val.key == 'app_documentation_url')
|
||||
documentation_url = val.value;
|
||||
if (val.key == 'app_documentation_dev_url')
|
||||
documentation_dev_url = val.value;
|
||||
if (val.key == 'app_support_url')
|
||||
support_url = val.value;
|
||||
if (val.key == 'app_account_title')
|
||||
account_title = val.value;
|
||||
if (val.key == 'app_account_url')
|
||||
account_url = val.value;
|
||||
// 控制显示
|
||||
if (val.key == 'app_show_lang' && val.value == "False") {
|
||||
$('switch-lang').hide();
|
||||
}
|
||||
//注意, odoo12,主用户id=2, 加了个 __system__
|
||||
if (session.user_context.uid > 2 || (val.key == 'app_show_debug' && val.value == "False")) {
|
||||
$('[data-menu="debug"]').hide();
|
||||
$('[data-menu="debugassets"]').hide();
|
||||
$('[data-menu="quitdebug"]').hide();
|
||||
}
|
||||
if (val.key == 'app_show_documentation' && val.value == "False") {
|
||||
$('[data-menu="documentation"]').hide();
|
||||
}
|
||||
if (val.key == 'app_show_documentation_dev' && val.value == "False") {
|
||||
$('[data-menu="documentation_dev"]').hide();
|
||||
}
|
||||
if (val.key == 'app_show_support' && val.value == "False") {
|
||||
$('[data-menu="support"]').hide();
|
||||
}
|
||||
if (val.key == 'app_show_account' && val.value == "False") {
|
||||
$('[data-menu="account"]').hide();
|
||||
}
|
||||
if (val.key == 'app_account_title' && val.value) {
|
||||
$('[data-menu="account"]').html(account_title);
|
||||
}
|
||||
if (val.key == 'app_show_poweredby' && val.value == "False") {
|
||||
$('.o_sub_menu_footer').hide();
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @override
|
||||
* 由于odoo11 没传ev到事件,所以要重载
|
||||
*/
|
||||
start: function () {
|
||||
var self = this;
|
||||
return this._super.apply(this, arguments).then(function () {
|
||||
//语言切换特殊处理
|
||||
self.$el.on('click', 'a[data-lang-menu]', function (ev) {
|
||||
ev.preventDefault();
|
||||
var f = self['_onMenuLang']
|
||||
f.call(self, $(this));
|
||||
});
|
||||
//控制debug显示
|
||||
var mMode = 'normal';
|
||||
if (window.location.href.indexOf('debug=1') != -1)
|
||||
mMode = 'debug';
|
||||
if (window.location.href.indexOf('debug=assets') != -1)
|
||||
mMode = 'assets';
|
||||
if (mMode == 'normal')
|
||||
$('[data-menu="quitdebug"]').hide();
|
||||
if (mMode == 'debug')
|
||||
$('[data-menu="debug"]').hide();
|
||||
if (mMode == 'assets')
|
||||
$('[data-menu="debugassets"]').hide();
|
||||
});
|
||||
},
|
||||
_onMenuAccount: function () {
|
||||
window.open(account_url, '_blank');
|
||||
},
|
||||
_onMenuDocumentation: function () {
|
||||
window.open(documentation_url, '_blank');
|
||||
},
|
||||
_onMenuSupport: function () {
|
||||
window.open(support_url, '_blank');
|
||||
},
|
||||
//增加的方法
|
||||
_onMenuDebug: function () {
|
||||
window.location = $.param.querystring(window.location.href, 'debug=1');
|
||||
},
|
||||
_onMenuDebugassets: function () {
|
||||
window.location = $.param.querystring(window.location.href, 'debug=assets');
|
||||
},
|
||||
_onMenuQuitdebug: function () {
|
||||
window.location = $.param.querystring(window.location.href, 'debug=0');
|
||||
},
|
||||
_onMenuDocumentation_dev: function () {
|
||||
window.open(documentation_dev_url, '_blank');
|
||||
},
|
||||
_onMenuLang: function (ev) {
|
||||
var self = this;
|
||||
var lang = ($(ev).data("lang-id"));
|
||||
var session = this.getSession();
|
||||
return this._rpc({
|
||||
model: 'res.users',
|
||||
method: 'write',
|
||||
args: [session.uid, {'lang': lang}],
|
||||
}).then(function (result) {
|
||||
self.do_action({
|
||||
type: 'ir.actions.client',
|
||||
res_model: 'res.users',
|
||||
tag: 'reload_context',
|
||||
target: 'current',
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
// web/login
|
||||
//////////////
|
||||
|
||||
$form_bg_color: white;
|
||||
$label_color: black;
|
||||
$span_label_color: white;
|
||||
$inputs_font_color: black;
|
||||
$inputs_outline: rgb(155, 155, 155);
|
||||
$inputs_outline_hover: #1F5B75;
|
||||
$login_buttons_bg: #1F5B75;
|
||||
$login_buttons_bg_hover: #1F5B75;
|
||||
$buttons_font_color: white;
|
||||
$buttons_font_color_hover: white;
|
||||
$login_bg_img: url(../img/odex_bg.jpg);
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
.o_web_client{
|
||||
.o_action_manager{
|
||||
.o_action{
|
||||
.o_control_panel{
|
||||
.o_cp_bottom{
|
||||
.o_cp_bottom_right{
|
||||
.o_search_options{
|
||||
.o_filter_menu{
|
||||
ul.o_dropdown_menu{
|
||||
li{
|
||||
a{
|
||||
padding-top: 8px!important;
|
||||
padding-bottom: 8px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
// ENGLISH FONTS
|
||||
|
||||
// ARABIC FONTS
|
||||
|
||||
// ARABIC - Droid Kufi
|
||||
@font-face {
|
||||
font-family: 'Droid Arabic Kufi';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Regular.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Regular.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Regular.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Droid Arabic Kufi';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Bold.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Bold.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Bold.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/DroidKufi-Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
// ARABIC - Amiri
|
||||
@font-face {
|
||||
font-family: 'Amiri';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Regular.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Regular.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Regular.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Amiri';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Bold.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Bold.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Bold.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Amiri/Amiri-Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
// ARABIC - Droid Naskh
|
||||
@font-face {
|
||||
font-family: 'Droid Arabic Naskh';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Droid Arabic Naskh';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Bold.eot);
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Bold.woff2) format('woff2'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/Naskh/DroidNaskh-Bold.woff) format('woff'),
|
||||
url(/odex_themecraft/static/src/fonts/arabic/DroidNaskh-Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
// ARABIC - Frutiger LT Arabic
|
||||
@font-face {
|
||||
font-family: 'Frutiger LT Arabic';
|
||||
font-style: normal;
|
||||
font-weight: 200;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Frutiger/Light.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Frutiger LT Arabic';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Frutiger/Roman.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Frutiger LT Arabic';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Frutiger/Bold.ttf) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Frutiger LT Arabic';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url(/odex_themecraft/static/src/fonts/arabic/Frutiger/Black.ttf) format('truetype');
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
.o_rtl{
|
||||
*:not(.fa) {
|
||||
font-family: $arabic_default_font !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rtl{
|
||||
*:not(.fa) {
|
||||
font-family: $english_default_font !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
$navbar_bg_color: rgba(31,91,117,1);
|
||||
$navbar_toggle: rgba(0,0,0,1);
|
||||
$selection_app_color: rgba(255,255,255,1);
|
||||
$selection_app_bg_hover: rgba(31,91,87,1);
|
||||
$navbar_ul_color: rgba(255,255,255,1);
|
||||
$navbar_ul_bg_color_hover: rgba(255,255,255,1);
|
||||
$navbar_ul_dropdown_bg_color: rgba(31,91,117,1);
|
||||
$navbar_ul_dropdown_item_color: rgba(31,91,117,1);
|
||||
$navbar_ul_dropdown_item_bg_color: rgba(255,255,255,1);
|
||||
$navbar_ul_dropdown_item_color_hover: rgba(255,255,255,1);
|
||||
$navbar_ul_dropdown_item_hover_color: rgba(31,91,117,1);
|
||||
$navbar_badge_color: rgba(0,0,0,1);
|
||||
$apps_bg_img: url('/web/image/res.config.settings/3/apps_bg_img');
|
||||
$app_name_color: rgba(255,255,255,1);
|
||||
$app_hover_bg_color: rgba(31,91,87,1);
|
||||
$apps_more_info: rgba(31,91,117,1);
|
||||
$apps_install_color: rgba(255,255,255,1);
|
||||
$apps_install_bg_color: rgba(31,91,117,1);
|
||||
$apps_upgrade_color: rgba(255,255,255,1);
|
||||
$apps_upgrade_bg_color: rgba(31,91,117,1);
|
||||
$sections_titles_color: rgba(255,255,255,1);
|
||||
$sections_titles_bg: rgba(31,91,117,1);
|
||||
$filter_icon_bg_color: rgba(31,91,117,1);
|
||||
$sidebar_categories_icon_color: rgba(31,91,117,1);
|
||||
$sidebar_categories_item_color: rgba(0,0,0,1);
|
||||
$sidebar_categories_item_bg_color: rgba(0,0,0,1);
|
||||
$sidebar_categories_item_hover_active_color: rgba(255,255,255,1);
|
||||
$sidebar_categories_item_bg_hover_active_color: rgba(38,133,127,1);
|
||||
$english_default_font: "Roboto", "Odoo Unicode Support Noto", sans-serif;
|
||||
$arabic_default_font: "Roboto", "Odoo Unicode Support Noto", sans-serif;
|
||||
|
|
@ -0,0 +1,623 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="res_config_settings_form_inherit" model="ir.ui.view">
|
||||
<field name="name">res_config_settings_form_inhert</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//div[@id='about']" position="replace">
|
||||
<div id="about">
|
||||
<h2>About</h2>
|
||||
<div class="row mt16 o_settings_container"
|
||||
name="about_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="appstore">
|
||||
<div class="d-flex">
|
||||
<div class="o_setting_right_pane"> FIXME Those links are
|
||||
defined directly in the template which means that we
|
||||
will have to update the template code is the link ever
|
||||
changes <a class="d-block mx-auto"
|
||||
href="https://exp-sa.com" target="blank">
|
||||
<img alt="Odex Product"
|
||||
class="d-block mx-auto img img-fluid"
|
||||
src="/custom_theme_14/static/description/odex.png" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_widget">
|
||||
<div class="col-12 o_setting_box" id="edition">
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="user-heading">
|
||||
<h3>
|
||||
Odex V.25
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" id="settings"
|
||||
class="tab-pane active text-muted o_web_settings_compact_subtitle">
|
||||
<small>Copyright © 2018 <a target="_blank"
|
||||
href="https://www.exp-sa.com"
|
||||
style="text-decoration: underline;">Expert
|
||||
Company</a></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
|
||||
<div class="app_settings_block o_backend_theme" data-string="Odex Theme Settings"
|
||||
string="Odex Theme Settings" data-key="odex_themecraft">
|
||||
|
||||
<h2>Home Menu</h2>
|
||||
<div class="row mt16 o_settings_container" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Background</p>
|
||||
<field name="apps_bg_img" widget="image" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Apps Item Background (Hover)</p>
|
||||
<field name="app_hover_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Navigation Bar</h2>
|
||||
<div class="row mt16 o_settings_container" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Background</p>
|
||||
<field name="navbar_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Background (Hover)</p>
|
||||
<field name="navbar_toggle" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Main Menu Title Background</p>
|
||||
<field name="selection_app_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Main Menu Title Background (Hover)</p>
|
||||
<field name="selection_app_bg_hover" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Item Color</p>
|
||||
<field name="navbar_ul_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Item Background (Hover)</p>
|
||||
<field name="navbar_ul_bg_color_hover" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Counter Badge Background</p>
|
||||
<field name="navbar_badge_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Counter Badge Background</p>
|
||||
<field name="app_name_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Dropdown Background</p>
|
||||
<field name="navbar_ul_dropdown_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Dropdown Item Color</p>
|
||||
<field name="navbar_ul_dropdown_item_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Dropdown Color (Hover)</p>
|
||||
<field name="navbar_ul_dropdown_item_color_hover" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Dropdown Item Background</p>
|
||||
<field name="navbar_ul_dropdown_item_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Navbar Dropdown Item Background (Hover)</p>
|
||||
<field name="navbar_ul_dropdown_item_hover_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>General Settings</h2>
|
||||
<div class="row mt16 o_settings_container" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Section Titles Color</p>
|
||||
<field name="sections_titles_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Section Titles Background</p>
|
||||
<field name="sections_titles_bg" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Apps Screen</h2>
|
||||
<div class="row mt16 o_settings_container" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Apps More Info Button Background</p>
|
||||
<field name="apps_more_info" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Apps Install Button Color</p>
|
||||
<field name="apps_install_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Apps Install Button Background</p>
|
||||
<field name="apps_install_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row">
|
||||
<p class="col-12 o_form_label mb-2">Apps Upgrade Button Color</p>
|
||||
<field name="apps_upgrade_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 30px;">
|
||||
<p class="col-12 o_form_label mb-2">Apps Upgrade Button Background</p>
|
||||
<field name="apps_upgrade_bg_color" widget="colorpicker" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Fonts</h2>
|
||||
<div class="row mt16 o_settings_container" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="col-12 d-flex">
|
||||
<p class="o_form_label col-6 col-lg-6 mb-2">English Default Font</p>
|
||||
<field name="english_default_font"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="col-12 d-flex">
|
||||
<p class="o_form_label col-5 col-lg-5 mb-2">Arabic Default Font</p>
|
||||
<field name="arabic_default_font"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
|
||||
<div class="app_settings_block o_backend_theme_icons" data-string="Odex Theme Icons Settings"
|
||||
string="Odex Theme Icons Settings" data-key="odex_themecraft_icons">
|
||||
|
||||
<h2>Icons Settings</h2>
|
||||
|
||||
<div class="col-12 mt16" name="default_taxes_setting_container">
|
||||
<div class="col-12 col-lg-12 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Settings Icon</p>
|
||||
<field widget="image" name="setting_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Apps Icon</p>
|
||||
<field widget="image" name="apps_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Discuss Icon</p>
|
||||
<field widget="image" name="discuss_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Website Icon</p>
|
||||
<field widget="image" name="website_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Sales Icon</p>
|
||||
<field widget="image" name="sales_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Invoicing Icon</p>
|
||||
<field widget="image" name="invoicing_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">CRM Icon</p>
|
||||
<field widget="image" name="crm_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">MRP II Icon</p>
|
||||
<field widget="image" name="mrp_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Inventory Icon</p>
|
||||
<field widget="image" name="inventory_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Accounting Icon</p>
|
||||
<field widget="image" name="accounting_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Purchase Icon</p>
|
||||
<field widget="image" name="purchase_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Point of Sale Icon</p>
|
||||
<field widget="image" name="pos_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Project Icon</p>
|
||||
<field widget="image" name="project_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">eCommerce Icon</p>
|
||||
<field widget="image" name="ecommerce_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Manufacturing Icon</p>
|
||||
<field widget="image" name="manufacturing_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Email Marketing Icon</p>
|
||||
<field widget="image" name="email_marketing_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Timesheets Icon</p>
|
||||
<field widget="image" name="timesheet_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Expenses Icon</p>
|
||||
<field widget="image" name="expenses_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Studio Icon</p>
|
||||
<field widget="image" name="studio_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Time Off Icon</p>
|
||||
<field widget="image" name="time_off_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Recruitment Icon</p>
|
||||
<field widget="image" name="recruitment_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Employees Icon</p>
|
||||
<field widget="image" name="employee_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Maintenance Icon</p>
|
||||
<field widget="image" name="maintenance_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Sign Icon</p>
|
||||
<field widget="image" name="sign_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Helpdesk Icon</p>
|
||||
<field widget="image" name="helpdesk_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Subscriptions Icon</p>
|
||||
<field widget="image" name="subscriptions_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Quality Icon</p>
|
||||
<field widget="image" name="quality_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">eLearning Icon</p>
|
||||
<field widget="image" name="elearning_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Planning Icon</p>
|
||||
<field widget="image" name="planning_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Data Cleaning Icon</p>
|
||||
<field widget="image" name="data_cleaning_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Events Icon</p>
|
||||
<field widget="image" name="events_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Contacts Icon</p>
|
||||
<field widget="image" name="contacts_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Product Lifecycle Management (PLM) Icon</p>
|
||||
<field widget="image" name="mrp_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Calendar Icon</p>
|
||||
<field widget="image" name="calendar_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Appraisal Icon</p>
|
||||
<field widget="image" name="appraisal_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Products and Pricelists Icon</p>
|
||||
<field widget="image" name="products_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Fleet Icon</p>
|
||||
<field widget="image" name="fleet_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Marketing Automation Icon</p>
|
||||
<field widget="image" name="marketing_automation_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Live Chat Icon</p>
|
||||
<field widget="image" name="blogs_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Live Chatx Icon</p>
|
||||
<field widget="image" name="live_chat_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Appointments Icon</p>
|
||||
<field widget="image" name="appointments_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Surveys Icon</p>
|
||||
<field widget="image" name="surveys_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2"> Android and iPhone Icon</p>
|
||||
<field widget="image" name="android_iphone_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Dashboards Icon</p>
|
||||
<field widget="image" name="dashboards_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Repairs Icon</p>
|
||||
<field widget="image" name="repairs_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Attendances Icon</p>
|
||||
<field widget="image" name="attendance_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">SMS Marketing Icon</p>
|
||||
<field widget="image" name="sms_marketing_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Barcode Icon</p>
|
||||
<field widget="image" name="barcode_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Notes Icon</p>
|
||||
<field widget="image" name="notes_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Forum Icon</p>
|
||||
<field widget="image" name="forum_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Skills Management Icon</p>
|
||||
<field widget="image" name="skills_management_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">VoIP Icon</p>
|
||||
<field widget="image" name="voip_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Lunch Icon</p>
|
||||
<field widget="image" name="lunch_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Online Jobs Icon</p>
|
||||
<field widget="image" name="online_jobs_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-2 app_item">
|
||||
<div class="col-12 app_item_body">
|
||||
<p class="col-12 o_form_label mb-2">Members Icon</p>
|
||||
<field widget="image" name="members_icon" class="col-12"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="assets_backend" name="OODEX BACKEND THEME" inherit_id="web.assets_backend">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link rel="stylesheet" type="text/scss" href="/odex_themecraft/static/src/scss/variables.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/odex_themecraft/static/src/scss/fonts.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/odex_themecraft/static/src/scss/web_theme.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/odex_themecraft/static/src/scss/rtl.scss"/>
|
||||
<link rel="stylesheet" type="text/scss" href="/odex_themecraft/static/src/scss/filter.scss"/>
|
||||
</xpath>
|
||||
<xpath expr="script[last()]" position="after">
|
||||
<script type="text/javascript" src="/odex_themecraft/static/src/js/customize_user_menu.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
Color Picker widget for Odoo web client
|
||||
================================
|
||||
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
Now only in RGBA code.
|
||||
|
||||
|
||||
* Display the color on form view when you are not editing it
|
||||
|
||||
|form_view_no_edit|
|
||||
|
||||
* Display the color on form view when you editing it
|
||||
|
||||
|form_view_edit|
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
You need to declare a char.
|
||||
|
||||
colorpicker = fields.Char(
|
||||
string="Color Picker",
|
||||
)
|
||||
|
||||
|
||||
In the view declaration,
|
||||
|
||||
...
|
||||
<field name="arch" type="xml">
|
||||
<form string="View name">
|
||||
...
|
||||
<field name="colorpicker" widget="colorpicker"/>
|
||||
...
|
||||
</form>
|
||||
</field>
|
||||
...
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"name": """Web Widget Colorpicker""",
|
||||
"summary": """Added Color Picker for From""",
|
||||
"category": "web",
|
||||
"images": ['static/description/icon.png'],
|
||||
"version": "14.21.04.21",
|
||||
"description": """
|
||||
|
||||
For Form View - added = widget="colorpicker"
|
||||
|
||||
...
|
||||
<field name="arch" type="xml">
|
||||
<form string="View name">
|
||||
...
|
||||
<field name="colorpicker" widget="colorpicker"/>
|
||||
...
|
||||
</form>
|
||||
</field>
|
||||
...
|
||||
|
||||
""",
|
||||
|
||||
"author": "Viktor Vorobjov",
|
||||
"license": "LGPL-3",
|
||||
"website": "https://straga.github.io",
|
||||
"support": "vostraga@gmail.com",
|
||||
"price": 0.00,
|
||||
"currency": "EUR",
|
||||
|
||||
"depends": [
|
||||
"web"
|
||||
],
|
||||
"external_dependencies": {"python": [], "bin": []},
|
||||
"data": [
|
||||
'view/web_widget_colorpicker_view.xml'
|
||||
],
|
||||
"qweb": [
|
||||
'static/src/xml/widget.xml',
|
||||
|
||||
],
|
||||
"demo": [],
|
||||
|
||||
"post_load": None,
|
||||
"pre_init_hook": None,
|
||||
"post_init_hook": None,
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
|
@ -0,0 +1,80 @@
|
|||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan" style="color:#875A7B;">Web Widget field</h2>
|
||||
<h3 class="oe_slogan">Bootstrap Color Picker</h3>
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<img src="icon.png">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2>More Info</h2>
|
||||
<p class="oe_mt32">YouTube Video PlayList <a href="https://www.youtube.com/watch?v=oLn3-2C5O2Y">Odoo Gantt Native - web widget color picker</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2>Demo</h2>
|
||||
<p class="oe_mt32">Live:https://demo14.garage12.eu/ </p>
|
||||
<p class="oe_mt32">user: demo Password:demog </p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2>The module is used in: </h2>
|
||||
<p class="oe_mt32"> Gantt Project native. <a href="https://apps.odoo.com/apps/modules/14.0/project_native/">Gantt Native view for Projects </a>
|
||||
<p class="oe_mt32"> Gantt MRP. <a href="https://apps.odoo.com/apps/modules/14.0/project_native/">Gantt Native view for MRP - Manufacture </a>
|
||||
<p class="oe_mt32"> Gantt Web View Framework <a href="https://apps.odoo.com/apps/modules/14.0/web_gantt_native/">Gantt Native view for MRP - Manufacture</a>
|
||||
<p class="oe_mt32"> Gantt Leave <a href="https://apps.odoo.com/apps/modules/14.0/hr_holidays_gantt_native/">Gantt Native view for Leave </a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<h2 class="oe_slogan" style="color:#875A7B;">in Action</h2>
|
||||
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32 oe_mb32 text-justify">
|
||||
Form View
|
||||
</p>
|
||||
<img class="oe_picture oe_screenshot" src="form_view_no_edit.png"/>
|
||||
</div>
|
||||
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32 oe_mb32 text-justify">
|
||||
Edit Form View
|
||||
</p>
|
||||
<img class="oe_picture oe_screenshot" src="form_view_edit.png"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2>Need our service?</h2>
|
||||
<p class="oe_mt32">Contact us by <a href="mailto:vostraga@gmail.com">email</a>
|
||||
<ul>
|
||||
<li><a href="mailto:vostraga@gmail.com">vostraga@gmail.com <i class="fa fa-envelope-o"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="oe_container oe_separator">
|
||||
</section>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
.openerp .oe_form .oe_form_field_time_delta input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.openerp .oe_form .oe_form_field_delta div {
|
||||
border: 1px solid;
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.oe_list_field_time_delta div {
|
||||
border: 1px solid;
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.time_delta_box {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.colorpicker-element .input-group-addon i,
|
||||
.colorpicker-element .add-on i {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
/* height: 16px; */
|
||||
height: 100%;
|
||||
vertical-align: unset;
|
||||
width: 30px;
|
||||
border: 1px solid #c7c7c7;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.o_rtl .colorpicker-element .input-group-addon i,
|
||||
.o_rtl .colorpicker-element .add-on i {
|
||||
border: 1px solid #c7c7c7;
|
||||
border-left: none;
|
||||
}
|
||||
.o_rtl .colorpicker-right:before{
|
||||
left: auto;
|
||||
right: 6px;
|
||||
}
|
||||
.o_rtl .colorpicker-right:after{
|
||||
left: auto;
|
||||
right: 7px;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
odoo.define('web.web_widget_colorpicker', function(require) {
|
||||
"use strict";
|
||||
|
||||
var field_registry = require('web.field_registry');
|
||||
var fields = require('web.basic_fields');
|
||||
|
||||
var FieldColorPicker = fields.FieldChar.extend({
|
||||
|
||||
template: 'FieldColorPicker',
|
||||
widget_class: 'oe_form_field_color',
|
||||
|
||||
_renderReadonly: function () {
|
||||
var show_value = this._formatValue(this.value);
|
||||
console.log("*****************",show_value);
|
||||
this.$el.text(show_value);
|
||||
this.$el.css("background-color", show_value);
|
||||
|
||||
},
|
||||
|
||||
_getValue: function () {
|
||||
var $input = this.$el.find('input');
|
||||
|
||||
var val = $input.val();
|
||||
var isOk = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i.test(val);
|
||||
|
||||
if (!isOk) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $input.val();
|
||||
|
||||
|
||||
},
|
||||
|
||||
_renderEdit: function () {
|
||||
|
||||
var show_value = this.value ;
|
||||
var $input = this.$el.find('input');
|
||||
$input.val(show_value);
|
||||
|
||||
this.$el.colorpicker({format: 'rgba'});
|
||||
this.$input = $input;
|
||||
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
|
||||
field_registry
|
||||
.add('colorpicker', FieldColorPicker);
|
||||
|
||||
|
||||
|
||||
return {
|
||||
FieldColorPicker: FieldColorPicker
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["src/less/colorpicker.less"],"names":[],"mappings":";;;;;;;;AAoBA,wBACE,MAAA,MACA,OAAA,MAXA,iBAAsB,g7KAatB,OAAA,UACA,MAAA,KACA,0BACE,QAAA,MACA,OAAA,IACA,MAAA,IACA,OAAA,IAAA,MAAA,KAfF,sBAAA,IACA,mBAAA,IACA,cAAA,IAeE,SAAA,SACA,IAAA,EACA,KAAA,EACA,OAAA,KAAA,EAAA,EAAA,KACA,4BACE,QAAA,MACA,OAAA,IACA,MAAA,IACA,OAAA,IAAA,MAAA,KAzBJ,sBAAA,IACA,mBAAA,IACA,cAAA,IA8BF,mBADA,iBAEE,MAAA,KACA,OAAA,MACA,MAAA,KACA,OAAA,WACA,YAAA,IACA,cAAA,IAIiB,qBADF,mBAEf,QAAA,MACA,OAAA,IACA,WAAA,KACA,WAAA,IAAA,MAAA,KACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,WAAA,KAGF,iBA1DE,iBAAsB,4rBA8DxB,mBA9DE,iBAAsB,wqBAgEtB,QAAA,KAKF,mBADA,iBADA,wBAGE,gBAAA,QAGF,aACE,QAAA,IACA,UAAA,MACA,WAAA,IAxEA,sBAAA,IACA,mBAAA,IACA,cAAA,IAwEA,QAAA,KAIU,mBADA,oBAEV,QAAA,MACA,QAAA,GACA,YAAA,EAGU,mBACV,MAAA,KAGU,oBACV,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,oBAAA,eACA,SAAA,SACA,IAAA,KACA,KAAA,IAGU,mBACV,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,SAAA,SACA,IAAA,KACA,KAAA,IAGW,iBACX,SAAA,SAGU,oCACV,UAAA,MAGkC,uDAClC,QAAA,MAGF,mBACE,OAAA,KACA,WAAA,IACA,MAAA,KAlIA,iBAAsB,wqBAoItB,oBAAA,EAAA,KAGiB,uBACjB,OAAA,KAGF,uBACE,QAAA,KACA,OAAA,KACA,WAAA,IACA,MAAA,KAGqB,yBACrB,OAAA,QACA,MAAA,KACA,OAAA,KACA,MAAA,KAGuB,2BACvB,YAAA,IAI2B,+BADW,0CAEtC,QAAA,aACA,OAAA,QACA,OAAA,KACA,eAAA,SACA,MAAA,KAGU,gCACV,SAAA,SACA,QAAA,aACA,MAAA,KACA,QAAA,KAGU,oCACV,MAAA,MACA,UAAA,MACA,OAAA,KAGkC,4DAClC,cAAA,IAGkC,uDAClC,MAAA,MAIkC,uDADA,qDAElC,MAAA,MACA,OAAA,KACA,MAAA,KACA,OAAA,WACA,YAAA,EACA,cAAA,IAIqD,yDADF,uDAEnD,QAAA,MACA,OAAA,KACA,WAAA,KACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,IACA,OAAA,KACA,WAAA,EAGkC,qDAlNlC,iBAAsB,4pBAsNY,uDAtNlC,iBAAsB,owBA0NN,0BAChB,KAAA,KACA,MAAA,IAGgB,yBAChB,KAAA,KACA,MAAA,IAGmB,6BACnB,aAAA,EACA,YAAA,EAGmB,4BACnB,aAAA,EACA,YAAA,EAQC,uCAAA,qCAAA,4CAAA,2CAAA,iCACC,QAAA,MASD,sCAAA,oCAAA,2CAAA,0CAAA,gCACC,QAAA,KAIe,wCACjB,QAAA"}
|
||||
|
After Width: | Height: | Size: 557 B |
|
After Width: | Height: | Size: 488 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 504 B |
|
After Width: | Height: | Size: 4.0 KiB |
1325
odex25_base/web_widget_colorpicker/static/src/lib/bootstrap-colorpicker/js/bootstrap-colorpicker.js
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates>
|
||||
<t t-name="FieldColorPicker">
|
||||
|
||||
<span t-if="widget.mode !== 'readonly'">
|
||||
<div class="input-group colorpicker-component">
|
||||
<input type="text"
|
||||
t-att-id="widget.id_for_label"
|
||||
t-att-tabindex="widget.attrs.tabindex"
|
||||
t-att-autofocus="widget.attrs.autofocus"
|
||||
t-att-placeholder="widget.attrs.placeholder"
|
||||
t-att-maxlength="widget.field.size"
|
||||
class="colorpickerg form-control"
|
||||
/>
|
||||
<span class="input-group-addon"><i></i></span>
|
||||
</div>
|
||||
|
||||
</span>
|
||||
<span t-if="widget.mode === 'readonly'"/>
|
||||
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<template id="assets_backend" name="web_widget_time_delta assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<!-- STYLE -->
|
||||
<link rel="stylesheet" href="/web_widget_colorpicker/static/src/lib/bootstrap-colorpicker/css/bootstrap-colorpicker.css"/>
|
||||
<link rel="stylesheet" href="/web_widget_colorpicker/static/src/css/widget.css"/>
|
||||
<!-- SCRIPT -->
|
||||
<script type="text/javascript" src="/web_widget_colorpicker/static/src/js/widget.js"></script>
|
||||
<script type="text/javascript" src="/web_widget_colorpicker/static/src/lib/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||