上传修改后的主题

This commit is contained in:
WEB许何哲\xuhez
2023-07-14 09:21:21 +08:00
parent 1c022711a1
commit a48c8b2baa
209 changed files with 18379 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="backend_config_tree_view" model="ir.ui.view">
<field name="name">backend.config.tree.view</field>
<field name="model">backend.config</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Backend Config">
<field name="light_primary_bg_color"/>
<field name="light_primary_text_color"/>
<field name="light_bg_image"/>
<field name="separator"/>
<field name="tab"/>
<field name="checkbox"/>
<field name="radio"/>
</tree>
</field>
</record>
<record id="backend_config_form_view" model="ir.ui.view">
<field name="name">backend.config.form.view</field>
<field name="model">backend.config</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Backend Config">
<sheet>
<group colspan="4">
<field name="use_custom_colors"/>
<field name="tree_form_split_view"/>
<field name="color_pallet"/>
<field name="use_custom_drawer_color"/>
<field name="drawer_color_pallet"/>
<field name="loader_style"/>
<field name="font_family"/>
<field name="light_primary_bg_color"/>
<field name="appdrawer_custom_bg_color"/>
<field name="appdrawer_custom_text_color"/>
<field name="light_primary_text_color"/>
<field name="light_bg_image"/>
<field name="separator"/>
<field name="tab"/>
<field name="checkbox"/>
<field name="radio"/>
<field name="chatter_position"/>
<field name="top_menu_position"/>
<field name="theme_style"/>
<field name="attachment_in_tree_view"/>
<field name="font_size"/>
<field name="list_view_density"/>
<field name="list_view_sticky_header"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_backend_config" model="ir.actions.act_window">
<field name="name">Backend Config</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">backend.config</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="menu_icon_change_tree_view" model="ir.ui.view">
<field name="name">menu.icon.change.tree.view</field>
<field name="model">ir.ui.menu</field>
<field name="arch" type="xml">
<tree string="Menu" editable="bottom" create="false" delete="false" js_class="button_in_tree">
<field name="complete_name"/>
<field name="web_icon_data" widget="image" class="o_image_64_max" readonly='1'/>
<field name="icon_img" widget="image" class="o_image_64_max"/>
<field name="use_icon"/>
<field name="icon_class_name" attrs="{'invisible': [('use_icon','=',False)]}" placeholder="Enter class name here.. (e.g. ri-class-name)"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="change_menu_icon_action">
<field name="name">Menu icon</field>
<field name="res_model">ir.ui.menu</field>
<field name="view_id" ref="menu_icon_change_tree_view"/>
<field name="domain">[('parent_id', '=', False)]</field>
<field name="view_mode">tree</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="spiffy_login_values_template" name="Spiffy Login Values">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-set="use_custom_colors" t-value="backend_theme_data['config_vals'].use_custom_colors"/>
<t t-set="light_primary_bg_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_bg_color"/>
<t t-set="light_primary_text_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_text_color"/>
<t t-set="login_page_text_color_3_4_style" t-value="company.login_page_text_color if company.login_page_style == 'login_style_3' or company.login_page_style == 'login_style_4' else ''"/>
<t t-set="login_page_text_color_not_2_style" t-value="company.login_page_text_color if company.login_page_style != 'login_style_2' else ''"/>
</template>
<template id="web_login_layout_inherit" name="Web Login Layout Inherit" inherit_id="web.login_layout">
<xpath expr="//t[@t-set='html_data']" position="before">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-if="company.show_bg_image">
<div class="login-page-background" t-attf-style="background-color: #{company.login_page_background_color}; background-image: url(/web/image/res.company/#{company.id}/login_page_background_img);"></div>
</t>
<t t-else="">
<div class="login-page-background" t-attf-style="background-color: #{company.login_page_background_color};"></div>
</t>
</xpath>
<xpath expr="//t[@t-set='body_classname']" position="attributes">
<attribute name="t-value">'bg-100 backend-login-page background-image'</attribute>
</xpath>
<xpath expr="//div[hasclass('card-body')]" position="attributes">
<attribute name="t-attf-class">card-body #{company.login_page_style} #{backend_theme_data['config_vals'].color_pallet if not backend_theme_data['config_vals'].use_custom_colors else ''}</attribute>
</xpath>
<xpath expr="//div[hasclass('card-body')]//div[contains(@t-attf-class, 'text-center pb-3 border-bottom')]/img" position="attributes">
<attribute name="style"></attribute>
<attribute name="class" add="img img-fluid w-50 mx-auto" separator=" "></attribute>
<attribute name="t-attf-src">/web/image/res.company/#{company.id}/logo</attribute>
</xpath>
<xpath expr="//t[@t-if='not disable_database_manager']//a" position="attributes">
<attribute name="t-attf-style">color: #{login_page_text_color_not_2_style};</attribute>
</xpath>
<xpath expr="//div[@t-if='not disable_footer']/a" position="attributes">
<attribute name="t-attf-style">color: #{login_page_text_color_not_2_style};</attribute>
</xpath>
</template>
<template id="web_login_inherit" name="Web Login Inherit" inherit_id="web.login">
<xpath expr="//form[hasclass('oe_login_form')]" position="before">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-set="use_custom_colors" t-value="backend_theme_data['config_vals'].use_custom_colors"/>
<t t-set="light_primary_bg_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_bg_color"/>
<t t-set="light_primary_text_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_text_color"/>
<t t-set="login_page_text_color_3_4_style" t-value="company.login_page_text_color if company.login_page_style == 'login_style_3' or company.login_page_style == 'login_style_4' else ''"/>
<t t-set="login_page_text_color_not_2_style" t-value="company.login_page_text_color if company.login_page_style != 'login_style_2' else ''"/>
</xpath>
<!-- LOGIN FORM BUTTONS CHANGES -->
<xpath expr="//div[contains(@t-attf-class, 'input-group')]//a" position="attributes">
<attribute name="t-att-style">use_custom_colors and 'border-color:'+light_primary_bg_color+'; background-color:'+light_primary_bg_color+'; color:'+light_primary_text_color+';'</attribute>
</xpath>
<!-- FIELD-LOGIN INPUT CHANGES -->
<xpath expr="//div[hasclass('field-login')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-login')]/input" position="before">
<i class="login-icon ms-2 fa fa-envelope fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<!-- FIELD-PASSWORD INPUT CHANGES -->
<xpath expr="//input[@type='password']/.." position="attributes">
<attribute name="class" remove="mb-3" add="form-group field-password d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//input[@type='password']" position="before">
<i class="login-icon ms-2 fa fa-lock fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"></i>
</xpath>
<!-- LOGIN FORM BUTTONS CHANGES -->
<xpath expr="//div[contains(@t-attf-class, 'oe_login_buttons')]" position="attributes">
<attribute name="t-attf-style">color: #{login_page_text_color_3_4_style};</attribute>
</xpath>
<xpath expr="//div[contains(@t-attf-class, 'oe_login_buttons')]//button[hasclass('btn-primary')]" position="attributes">
<attribute name="t-att-style">use_custom_colors and 'background-color:'+light_primary_bg_color+'; color:'+light_primary_text_color+';'</attribute>
<attribute name="class" separator=" " add="border-0"/>
</xpath>
<xpath expr="//t[@t-if='debug']//button[hasclass('btn-link')]" position="attributes">
<attribute name="t-attf-style">color: #{login_page_text_color_3_4_style};</attribute>
</xpath>
</template>
<template id="auth_signup_btn_inherit" name="Auth Signup Buttons Inherit" inherit_id="auth_signup.signup">
<xpath expr="//form[hasclass('oe_signup_form')]" position="before">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-set="use_custom_colors" t-value="backend_theme_data['config_vals'].use_custom_colors"/>
<t t-set="light_primary_bg_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_bg_color"/>
<t t-set="light_primary_text_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_text_color"/>
<t t-set="login_page_text_color_3_4_style" t-value="company.login_page_text_color if company.login_page_style == 'login_style_3' or company.login_page_style == 'login_style_4' else ''"/>
<t t-set="login_page_text_color_not_2_style" t-value="company.login_page_text_color if company.login_page_style != 'login_style_2' else ''"/>
</xpath>
<!-- SIGNUP FORM BUTTONS CHANGES -->
<xpath expr="//div[hasclass('oe_login_buttons')]//button[hasclass('btn-primary')]" position="attributes">
<attribute name="t-att-style">use_custom_colors and 'background-color:'+light_primary_bg_color+'; color:'+light_primary_text_color+';'</attribute>
<attribute name="class" separator=" " add="border-0"/>
</xpath>
<xpath expr="//div[hasclass('oe_login_buttons')]//a[hasclass('btn-link')]" position="attributes">
<attribute name="t-attf-style">color: #{login_page_text_color_3_4_style};</attribute>
</xpath>
</template>
<template id="web_signup_inherit" name="Web Signup Inherit" inherit_id="auth_signup.fields">
<xpath expr="//div[hasclass('field-login')]" position="before">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-set="use_custom_colors" t-value="backend_theme_data['config_vals'].use_custom_colors"/>
<t t-set="light_primary_bg_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_bg_color"/>
<t t-set="light_primary_text_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_text_color"/>
<t t-set="login_page_text_color_3_4_style" t-value="company.login_page_text_color if company.login_page_style == 'login_style_3' or company.login_page_style == 'login_style_4' else ''"/>
<t t-set="login_page_text_color_not_2_style" t-value="company.login_page_text_color if company.login_page_style != 'login_style_2' else ''"/>
</xpath>
<!-- FIELD-LOGIN INPUT CHANGES -->
<xpath expr="//div[hasclass('field-login')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-login')]/input" position="before">
<i class="login-icon ms-2 fa fa-envelope fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<xpath expr="//div[hasclass('field-login')]/input" position="attributes">
<attribute name="placeholder" add="Email" separator=" "></attribute>
</xpath>
<!-- FIELD-NAME INPUT CHANGES -->
<xpath expr="//div[hasclass('field-name')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-name')]/input" position="before">
<i class="login-icon ms-2 fa fa-user fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<!-- FIELD-PASSWORD INPUT CHANGES -->
<xpath expr="//div[hasclass('field-password')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-password')]/input" position="before">
<i class="login-icon ms-2 fa fa-lock fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<xpath expr="//div[hasclass('field-password')]/input" position="attributes">
<attribute name="placeholder" add="Password" separator=" "></attribute>
</xpath>
<!-- FIELD-CONFIRM-PASSWORD INPUT CHANGES -->
<xpath expr="//div[hasclass('field-confirm_password')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-confirm_password')]/input" position="before">
<i class="login-icon ms-2 fa fa-unlock-alt fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<xpath expr="//div[hasclass('field-confirm_password')]/input" position="attributes">
<attribute name="placeholder" add="Confirm Password" separator=" "></attribute>
</xpath>
</template>
<template id="web_reset_inherit" name="Web Reset Inherit" inherit_id="auth_signup.reset_password">
<xpath expr="//form[hasclass('oe_reset_password_form')]" position="before">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="backend_theme_data" t-value="company.get_login_page_data()"/>
<t t-set="use_custom_colors" t-value="backend_theme_data['config_vals'].use_custom_colors"/>
<t t-set="light_primary_bg_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_bg_color"/>
<t t-set="light_primary_text_color" t-value="backend_theme_data['config_vals'].use_custom_colors and backend_theme_data['config_vals'].light_primary_text_color"/>
<t t-set="login_page_text_color_3_4_style" t-value="company.login_page_text_color if company.login_page_style == 'login_style_3' or company.login_page_style == 'login_style_4' else ''"/>
<t t-set="login_page_text_color_not_2_style" t-value="company.login_page_text_color if company.login_page_style != 'login_style_2' else ''"/>
</xpath>
<!-- FIELD-LOGIN INPUT CHANGES -->
<xpath expr="//div[hasclass('field-login')]" position="attributes">
<attribute name="class" remove="mb-3" add="form-group d-flex align-items-center" separator=" "></attribute>
</xpath>
<xpath expr="//div[hasclass('field-login')]/input" position="before">
<i class="login-icon ms-2 fa fa-envelope fa-lg" t-att-style="use_custom_colors and 'color:'+light_primary_bg_color+';'"/>
</xpath>
<xpath expr="//div[hasclass('field-login')]/input" position="attributes">
<attribute name="placeholder" add="Email" separator=" "></attribute>
</xpath>
<!-- RESET FORM BUTTONS CHANGES -->
<xpath expr="//div[hasclass('oe_login_buttons')]" position="attributes">
<attribute name="class" separator=" " remove="mt-3"/>
</xpath>
<xpath expr="//div[hasclass('oe_login_buttons')]//button[hasclass('btn-primary')]" position="attributes">
<attribute name="t-att-style">use_custom_colors and 'background-color:'+light_primary_bg_color+'; color:'+light_primary_text_color+';'</attribute>
<attribute name="class" separator=" " add="border-0"/>
</xpath>
</template>
</odoo>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="service_worker" name="PWA service worker">
'use strict';
var base_cache_ver = 'base-cache-1';
var assets = ['/','/pwa/offline'];
self.addEventListener('install', function(event) {
self.skipWaiting();
event.waitUntil(
caches.open(base_cache_ver).then(cache =>{
cache.addAll(assets);
})
)
});
self.addEventListener('activate', function(event) {
event.waitUntil(
caches.keys().then(function(keys) {
return Promise.all(keys.map(function(key) {
if (key !== base_cache_ver) {
return caches.delete(key);
}
}));
})
);
});
self.addEventListener('fetch', function(event) {
event.respondWith(
fetch(event.request).then(function (response) {
return response;
})
.catch(error => {
return caches.match('/pwa/offline');
}));
});
</template>
<template id="biz_web_layout_inheirt" name="Web Main layout" inherit_id="web.layout">
<xpath expr="//head" position="inside">
<t t-set="company" t-value="request.env.company.sudo()"/>
<t t-set="enable_pwa" t-value="company.enable_pwa"/>
<t t-if="enable_pwa">
<link rel="manifest" t-att-href="'/spiffy_theme_backend/%s/manifest.json' % (company.id) "/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="apple-mobile-web-app-title" content="PWA"/>
<link rel="apple-touch-icon" t-att-href="'/web/image/res.company/%s/image_512_pwa/152x152' % (company.id)"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
</t>
</xpath>
</template>
</odoo>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- <menuitem id="back_config_main" name="Backend Theme" sequence="1"
web_icon="spiffy_theme_backend,static/src/image/backend_theme_icon.png" groups="base.user_admin" />
<menuitem id="menu_backend_config" name="Backend Config"
parent="spiffy_theme_backend.back_config_main" action="action_backend_config" sequence="80" /> -->
<menuitem id="bizople_backend_theme_configuration_mainmenu" name="Spiffy Configuration"
parent="base.menu_administration" sequence="10"/>
<record model='ir.actions.act_url' id='action_spiffy_documentation'>
<field name='name'>Spiffy Documentation</field>
<field name='url'>https://www.bizople.com/spiffy-document</field>
</record>
<menuitem id="spiffy_documentation_menu" parent="bizople_backend_theme_configuration_mainmenu"
name="Spiffy Documentation" sequence="2" action="action_spiffy_documentation"/>
<menuitem action="spiffy_theme_backend.change_menu_icon_action" id="change_menu_icon_menu"
parent="bizople_backend_theme_configuration_mainmenu" sequence="5"/>
<menuitem action="spiffy_theme_backend.act_open_pwa_shortcuts_view" id="pwa_shortcuts_view_tree_menuitem"
parent="bizople_backend_theme_configuration_mainmenu" sequence="5"/>
</data>
</odoo>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="pwa_offline_page" name="pwa offline page">
<t t-call="web.frontend_layout">
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
<t t-set="body_classname" t-value="'bg-100'"/>
<t t-set="no_header" t-value="True"/>
<t t-set="no_footer" t-value="True"/>
<div class="container">
<div class="row mb64 mt64">
<div class="col-md-12 text-center">
<img class="img img-fluid" style="width: 20%;" src="/spiffy_theme_backend/static/src/image/loader_2.gif"/>
</div>
<div class="col-md-12 text-center mt32 mb16">
<h1 class="text-primary">You're Offline</h1>
</div>
<div class="col-md-12 text-center">
<a href="/web" class="btn btn-primary">Refresh</a>
</div>
</div>
</div>
</t>
</template>
</odoo>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="bizople_pwa_shortcuts_tree_view" model="ir.ui.view">
<field name="name">pwa.shortcuts.tree</field>
<field name="model">pwa.shortcuts</field>
<field name="type">tree</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="PWA shortcuts">
<field name="name" />
<field name="url"/>
</tree>
</field>
</record>
<record id="bizople_pwa_shortcuts_form_view" model="ir.ui.view">
<field name="name">pwa.shortcuts.form</field>
<field name="model">pwa.shortcuts</field>
<field name="type">form</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="PWA shortcuts">
<sheet>
<group colspan="4">
<field name="name"/>
<field name="description"/>
<field name="short_name"/>
<field name="url"/>
<field name="image_192_shortcut" widget="image"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_pwa_shortcuts_view">
<field name="name">PWA Shortcuts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pwa.shortcuts</field>
<field name="view_mode">tree,form</field>
</record>
<record model="ir.actions.act_window.view" id="act_open_pwa_shortcuts_view_form">
<field name="act_window_id" ref="act_open_pwa_shortcuts_view" />
<field name="sequence" eval="20" />
<field name="view_mode">form</field>
<field name="view_id" ref="bizople_pwa_shortcuts_form_view" />
</record>
<record model="ir.actions.act_window.view" id="act_open_pwa_shortcuts_view_tree">
<field name="act_window_id" ref="act_open_pwa_shortcuts_view" />
<field name="sequence" eval="10" />
<field name="view_mode">tree</field>
<field name="view_id" ref="bizople_pwa_shortcuts_tree_view" />
</record>
</data>
</odoo>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_config_settings_backend_config" model="ir.ui.view">
<field name="name">res.config.settings.backend.config</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">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Backend Settings" string="Backend Settings" data-key="spiffy_theme_backend" groups="base.group_system">
<div id="backend_config_view">
<h2>Spiffy General Setting</h2>
<div class="row mt16 o_settings_container" name="backend_setting_container">
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_favicon">
<div class="o_setting_right_pane">
<label for="spiffy_favicon"/>
<field name='spiffy_favicon' widget="image" />
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_backend_menubar_logo">
<div class="o_setting_right_pane">
<label for="backend_menubar_logo"/>
<field name='backend_menubar_logo' widget="image" />
</div>
<div class="o_setting_right_pane">
<label for="backend_menubar_logo_icon"/>
<field name='backend_menubar_logo_icon' widget="image" />
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_tab_name">
<div class="o_setting_right_pane">
<p class="o_form_label"><label for="tab_name"/></p>
<field name='tab_name'/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_tab_name">
<div class="o_setting_right_pane">
<p class="o_form_label"><label for="backend_theme_level"/></p>
<field name='backend_theme_level' groups="base.group_system"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_tab_name">
<div class="o_setting_right_pane mb-3">
<p class="o_form_label"><label for="login_page_style"/></p>
<field name='login_page_style' groups="base.group_system"/>
</div>
<div class="o_setting_box">
<div class="o_setting_left_pane">
<field name='show_bg_image' groups="base.group_system"/>
</div>
<div class="o_setting_right_pane">
<label for="show_bg_image"/>
</div>
</div>
<div class="o_setting_right_pane" attrs="{'invisible': [('show_bg_image', '=', False)]}" >
<p class="o_form_label"><label for="login_page_background_img"/></p>
<field name='login_page_background_img' widget="image" groups="base.group_system" attrs="{'required': [('show_bg_image', '=', True)]}"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_tab_name">
<div class="o_setting_right_pane mb-3">
<p class="o_form_label"><label for="login_page_background_color"/></p>
<field name='login_page_background_color' widget="color" groups="base.group_system"/>
</div>
<div class="o_setting_right_pane">
<p class="o_form_label"><label for="login_page_text_color"/></p>
<field name='login_page_text_color' widget="color" groups="base.group_system"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_toolbar_color">
<div class="o_setting_right_pane">
<p class="o_form_label"><label for="spiffy_toobar_color"/></p>
<field name='spiffy_toobar_color' widget="color" groups="base.group_system"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="config_settings_prevent_auto_save">
<div class="o_setting_left_pane">
<field name='prevent_auto_save' groups="base.group_system"/>
</div>
<div class="o_setting_right_pane">
<p class="o_form_label"><label for="prevent_auto_save"/></p>
<field name='prevent_auto_save_warning' attrs="{'invisible': [('prevent_auto_save', '=', False)]}" groups="base.group_system"/>
</div>
</div>
</div>
<h2>Spiffy Progressive Web Application (PWA)</h2>
<div class="row mt16 o_settings_container" id="website_pwa_setting">
<div class="col-xs-12 col-md-6 o_setting_box" id="website PWA">
<div class="">
<div class="col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="enable_pwa"/>
</div>
<div class="o_setting_right_pane">
<label for="enable_pwa"/>
<div class="text-muted">
Enable Backend Progressive Web Application
</div>
<div class="mt16 o_setting_box" attrs="{'invisible': [('enable_pwa', '=', False)]}">
<div class="">
<label class="col-lg-5 o_light_label" string="PWA Name" for="app_name_pwa"/>
<field name="app_name_pwa" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="Short Name" for="app_name_pwa"/>
<field name="short_name_pwa" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="Description" for="description_pwa"/>
<field name="description_pwa" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="Start url" for="start_url_pwa"/>
<field name="start_url_pwa" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="PWA Shortcuts" for="pwa_shortcuts_ids"/>
<field name="pwa_shortcuts_ids" widget="many2many_tags"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="Background Color" for="background_color_pwa"/>
<field name="background_color_pwa" widget="color" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="Theme Color" for="theme_color_pwa"/>
<field name="theme_color_pwa" widget="color" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="PWA Icon (512 x 512)" for="image_512_pwa"/>
<field name="image_512_pwa" widget="image" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
<div class="">
<label class="col-lg-5 o_light_label" string="PWA Icon (192 x 192)" for="image_192_pwa"/>
<field name="image_192_pwa" widget="image" attrs="{'required': [('enable_pwa', '=', True)]}"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
<xpath expr="//div[@name='about_setting_container']//img[@src='/base_setup/static/src/img/google_play.png']/.." position="attributes">
<attribute name="href">https://play.google.com/store/apps/details?id=com.bizople.spiffy</attribute>
</xpath>
<xpath expr="//div[@name='about_setting_container']//img[@src='/base_setup/static/src/img/app_store.png']/.." position="attributes">
<attribute name="href">https://apps.apple.com/in/app/spiffy-odoo-mobile-app/id6449771773</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="spiffy_configuration_res_user_view">
<field name="name">res.users.form.view.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='preferences_page']" position="after">
<page string="Spiffy Configuration" name="spiffy_config">
<group>
<field name="enable_todo_list"/>
</group>
<!-- <group>
<field name="todo_list_ids" invisible="0">
<tree>
<field name="sequence"/>
<field name="name"/>
<field name="description"/>
<field name="note_color_pallet"/>
</tree>
</field>
</group> -->
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="biz_responsive_web_layout_template" inherit_id="web.layout" name="Bizople Responsive Web Layout">
<xpath expr="//meta[last()]" position="after">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="/spiffy_theme_backend/static/lib/RemixIcon/remixicon.css" />
</xpath>
</template>
<template id="biz_webclient_bootstrap_inherit" inherit_id="web.webclient_bootstrap" name="webclient bootstrap inherit">
<xpath expr="//t[@t-set='head_web']" position="replace">
<t t-set="head_web">
<t t-set="company" t-value="request.env.company.sudo()"></t>
<t t-set="color_code" t-value="company.spiffy_toobar_color and company.spiffy_toobar_color or '#0097a7'"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" t-att-content="color_code"/>
<link rel="icon" sizes="192x192" t-attf-href="/web/image/res.company/#{company.id}/favicon"/>
<!-- iOS Safari -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" t-attf-href="/web/image/res.company/#{company.id}/favicon"/>
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" t-att-content="color_code"/>
<meta name="msapplication-TileColor" t-att-content="color_code"/>
<meta name="msapplication-TileImage" t-attf-content="/web/image/res.company/#{company.id}/favicon"/>
<script type="text/javascript">
odoo.__session_info__ = <t t-out="json.dumps(session_info)"/>;
odoo.reloadMenus = () => fetch(`/web/webclient/load_menus/${odoo.__session_info__.cache_hashes.load_menus}`).then(res => res.json());
odoo.loadMenusPromise = odoo.reloadMenus();
// Block to avoid leaking variables in the script scope
{
const { user_context, cache_hashes } = odoo.__session_info__;
// Prefetch translations to speedup webclient. This is done in JS because link rel="prefetch"
// is not yet supported on safari.
fetch(`/web/webclient/translations/${cache_hashes.translations}?lang=${user_context.lang}`);
}
</script>
<t t-if="request.httprequest.cookies.get('color_scheme') == 'dark'">
<t t-call-assets="web.dark_mode_assets_common" t-js="false"/>
<t t-call-assets="web.dark_mode_assets_backend" t-js="false"/>
</t>
<t t-else="">
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
</t>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="web.assets_backend" t-css="false"/>
<t t-call-assets="web.assets_backend_prod_only" t-css="false"/>
<t t-call="web.conditional_assets_tests"/>
</t>
</xpath>
</template>
</odoo>

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="to_do_list_content_template" name="To Do List Content Template">
<t t-set="note_color_pallet" t-value="note.note_color_pallet"/>
<t t-set="note_create_date" t-value="note.write_date + user_tz_offset_time"/>
<section t-attf-class="note_content #{note_color_pallet}" t-att-data-note-id="note.id">
<div class="note_outer_content p-3 position-relative">
<div class="date-and-edit d-flex justify-content-end">
<div class="note-date">
<t t-if="today_date.strftime('%d-%b-%Y') == note_create_date.strftime('%d-%b-%Y')">
<span t-out="note_create_date.strftime('%I:%M %p')"></span>
</t>
<t t-else=" ">
<span t-out="note_create_date.strftime('%d-%b-%Y')"></span>
</t>
</div>
<div class="note-options d-md-none ms-2">
<div class="btn-group">
<button class="btn dropdown-toggle p-0 bg-transparent" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<span class="ri ri-more-fill align-middle"/>
</button>
<ul class="dropdown-menu">
<li class="edit-note-item note-edit">
<a class="nav-item d-flex p-2" href="#" t-att-data-note-id="note.id" t-att-data-note-color="note.note_color_pallet">
<span class="ri ri-pencil-line align-middle"/>
<span class="ps-2 edit-note-text">Edit Note</span>
</a>
</li>
<li class="edit-note-item note-delete">
<a class="nav-item d-flex p-2" href="#" t-att-data-note-id="note.id">
<span class="ri ri-delete-bin-line align-middle"/>
<span class="ps-2 edit-note-text">Delete Note</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="note-details">
<!-- <div t-out="note.sequence"></div> -->
<div class="note-title">
<h2 t-field="note.name"></h2>
</div>
<div class="note-description">
<span class="description-main" t-field="note.description"></span>
</div>
</div>
</div>
</section>
</template>
<template id="to_do_list_template" name="To Do List template">
<div class="row g-0 align-items-start to-do-list-sidebar h-100">
<div class="to-do-sidebar-heading p-3 border-bottom d-flex">
<h4 class="to-do-title d-flex m-0 align-items-center flex-fill">
<span>Notes</span>
<button type="button" id="close_to_do_sidebar" class="bg-transparent ms-auto border-0">
<img src="spiffy_theme_backend/static/src/image/close.png" class="img img-fluid" />
</button>
</h4>
</div>
<div class="to-do-sidebar-body position-relative">
<button type="button" class="add-new-list-btn btn btn-primary rounded-circle">
<span class="ri ri-add-line"></span>
<span class="text d-none">CLOSE</span>
</button>
<div class="add-list d-none p-3 shadow-sm bg-white">
<input t-if="user" type="hidden" name="user_id" t-att-value="user.id"></input>
<input type="hidden" name="note_id" value=""></input>
<div class="mb-3 p-3 shadow-sm add-list-outer">
<div class="note-colors-option d-flex">
<t t-set="pallets" t-value="8"/>
<t t-foreach="range(1, pallets)" t-as="p">
<label t-attf-for="note_pallet_#{p}" t-attf-class="flex-fill pallet_#{p}" t-attf-color-pallet="pallet_#{p}">
<input class="d-none" type="radio" t-attf-id="note_pallet_#{p}" name="noteColorPallet" t-attf-value="pallet_#{p}" t-att-checked="p == 1 and 'checked'"/>
<span class="pallet_detail"></span>
</label>
</t>
</div>
<div class="note-title border-bottom border-primary">
<input class="form-control note-title-input border-0" placeholder="Note Title..." aria-label="Take a Note..." aria-describedby="to-do-button"/>
</div>
<div class="note-description mt-3">
<!-- <span class="description-title">Description</span> -->
<div contenteditable="true" data-text="Note description..." class="form-control note-description-input border-0 border-bottom border-primary rounded-0"></div>
</div>
<div class="note-save-update mt-3 d-flex justify-content-end">
<button class="btn btn-link note-add" type="button" data-update="0" id="note-create">Save</button>
<button class="btn btn-link note-add note-update d-none" type="button" data-update="1" id="note-update">Update</button>
</div>
</div>
</div>
<div class="users-to-do-list">
<t t-if="user.todo_list_ids">
<t t-foreach="user.todo_list_ids" t-as="note">
<t t-call="spiffy_theme_backend.to_do_list_content_template"/>
</t>
</t>
</div>
</div>
</div>
</template>
</odoo>