master-sf1.0

This commit is contained in:
qihao.gong@jikimo.com
2023-05-06 16:03:00 +08:00
parent fcf0354a1e
commit 0077d97cfa
307 changed files with 20636 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,44 @@
odoo.define('vista_backend_theme.SideBar', function (require) {
"use strict";
var Widget = require('web.Widget');
var SideBar = Widget.extend({
events: _.extend({}, Widget.prototype.events, {
'click .nav-link': '_onAppsMenuItemClicked',
}),
template: "vista_backend_theme.Sidebar",
init: function (parent, menuData) {
this._super.apply(this, arguments);
this._apps = _.map(menuData.children, function (appMenuData) {
return {
actionID: parseInt(appMenuData.action.split(',')[1]),
menuID: appMenuData.id,
name: appMenuData.name,
xmlID: appMenuData.xmlid,
web_icon_data: appMenuData.web_icon_data,
};
});
},
getApps: function () {
return this._apps;
},
_openApp: function (app) {
this.trigger_up('app_clicked', {
action_id: app.actionID,
menu_id: app.menuID,
});
},
_onAppsMenuItemClicked: function (ev) {
var $target = $(ev.currentTarget);
var actionID = $target.data('action-id');
var menuID = $target.data('menu-id');
var app = _.findWhere(this._apps, { actionID: actionID, menuID: menuID });
this._openApp(app);
},
});
return SideBar;
});

View File

@@ -0,0 +1,107 @@
odoo.define('code_backend_theme.SidebarMenu', function (require) {
"use strict";
//sidebar toggle effect
$(document).on("click", "#closeSidebar", function(event){
$("#closeSidebar").hide();
$("#openSidebar").show();
});
$(document).on("click", "#openSidebar", function(event){
$("#openSidebar").hide();
$("#closeSidebar").show();
});
$(document).on("click", "#openSidebar", function(event){
$("#sidebar_panel").css({'display':'block'});
$(".o_action_manager").css({'margin-left': '90px','transition':'all .1s linear'});
$(".top_heading").css({'margin-left': '70px','transition':'all .1s linear'});
//add class in navbar
var navbar = $(".o_main_navbar");
var navbar_id = navbar.data("id");
$("nav").addClass(navbar_id);
navbar.addClass("small_nav");
//add class in action-manager
var action_manager = $(".o_action_manager");
var action_manager_id = action_manager.data("id");
$("div").addClass(action_manager_id);
action_manager.addClass("sidebar_margin");
//add class in top_heading
var top_head = $(".top_heading");
var top_head_id = top_head.data("id");
$("div").addClass(top_head_id);
top_head.addClass("sidebar_margin");
});
$(document).on("click", "#closeSidebar", function(event){
$("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'});
//remove class in navbar
var navbar = $(".o_main_navbar");
var navbar_id = navbar.data("id");
$("nav").removeClass(navbar_id);
navbar.removeClass("small_nav");
//remove class in action-manager
var action_manager = $(".o_action_manager");
var action_manager_id = action_manager.data("id");
$("div").removeClass(action_manager_id);
action_manager.removeClass("sidebar_margin");
//remove class in top_heading
var top_head = $(".top_heading");
var top_head_id = top_head.data("id");
$("div").removeClass(top_head_id);
top_head.removeClass("sidebar_margin");
});
$(document).on("click", ".sidebar a", function(event){
var menu = $(".sidebar a");
var $this = $(this);
var id = $this.data("id");
$("header").removeClass().addClass(id);
menu.removeClass("active");
$this.addClass("active");
//sidebar close on menu-item click
$("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'});
$("#closeSidebar").hide();
$("#openSidebar").show();
//remove class in navbar
var navbar = $(".o_main_navbar");
var navbar_id = navbar.data("id");
$("nav").removeClass(navbar_id);
navbar.removeClass("small_nav");
//remove class in action-manager
var action_manager = $(".o_action_manager");
var action_manager_id = action_manager.data("id");
$("div").removeClass(action_manager_id);
action_manager.removeClass("sidebar_margin");
//remove class in top_heading
var top_head = $(".top_heading");
var top_head_id = top_head.data("id");
$("div").removeClass(top_head_id);
top_head.removeClass("sidebar_margin");
});
// //Custom
// var showBar = false;
//
// $(document).on("click", "#triggerSidebar", function(event){
//
// if(showBar){
// hideSidebar();
// }else{
// showSidebar();
// }
// $("#triggerSidebar").toggleClass('c_sidebar_active c_sidebar_passive');
// $('#dotsMenuContainer').toggleClass('c_dots_menu c_dots_menu_toggled');
// showBar = !showBar;
// });
});

View File

@@ -0,0 +1,14 @@
odoo.define('vista_backend_theme.Load', function (require) {
"use strict";
var rpc = require('web.rpc');
var session = require('web.session');
$(document).ready(function () {
rpc.query({
model: 'theme.data',
method: 'action_apply',
args: [this]
});
});
});

View File

@@ -0,0 +1,30 @@
/** @odoo-module **/
import SystrayMenu from 'web.SystrayMenu';
import Widget from 'web.Widget';
import Session from 'web.session';
var ThemeWidget = Widget.extend({
template: 'theme_systray',
events: {
'click #theme_vista': '_onClick',
},
is_admin: false,
willStart: function () {
this.is_admin = Session.is_admin;
return this._super.apply(this, arguments);
},
_onClick: function(){
this.do_action({
type: 'ir.actions.act_window',
name: 'theme data',
res_model: 'theme.data',
view_mode: 'form',
views: [[false, 'form']],
target: 'new'
});
},
});
SystrayMenu.Items.push(ThemeWidget);
export default ThemeWidget;

View File

@@ -0,0 +1,12 @@
/** @odoo-module alias=web.window.title **/
import { WebClient } from "@web/webclient/webclient";
import {patch} from "@web/core/utils/patch";
patch(WebClient.prototype, "Web Window Title", {
setup() {
const title = document.title;
this._super();
this.title.setParts({ zopenerp: title });
}
});

View File

@@ -0,0 +1,72 @@
$one__light: #FFF !default;
$one__primary: #00005A !default;
$one__primary-dark: #274aa5 !important;
$one__border-light: #d4d4d4 !important;
$transition-normal: all 0.4s linear !default;
.c_login_container{
background: $one__light !important;
width: 100% !important;
.card-body{
background-color: transparent !important;
}
}
.input-group-prepend{
.input-group-text{
border-radius: 0px !important;
border-right: 0px !important;
background: transparent !important;
}
}
.form-control{
border-radius: 0px !important;
border-color: $one__border-light;
background-color: none;
&:focus{
box-shadow: none !important;
}
}
//Buttons
.btn{
border-radius: 0px;
&:hover{
filter: brightness(90%) !important;
box-shadow: none;
transition: $transition-normal;
}
}
.btn-primary{
background-color: $one__primary !important;
border-color: $one__primary !important;
color: $one__light !important;
&:hover{
background-color: $one__primary-dark !important;
}
&:focus{
box-shadow: 0 0 0 0.2rem rgba(235,240,253, 0.8);
}
}
//Links
a, .btn-link {
color: $one__primary;
text-decoration: none;
background-color: transparent;
&:hover{
color: $one__primary-dark;
text-decoration: none !important;
transition: $transition-normal;
}
}

View File

@@ -0,0 +1,72 @@
$one__light: #fff !default;
$one__primary: #1F2631 !default;
$one__primary-dark: #1c222c !important;
$one__border-light: #d4d4d4 !important;
$transition-normal: all 0.4s linear !default;
.c_login_container{
background: $one__light !important;
width: 100% !important;
.card-body{
background-color: transparent !important;
}
}
.input-group-prepend{
.input-group-text{
border-radius: 0px !important;
border-right: 0px !important;
background: transparent !important;
}
}
.form-control{
border-radius: 0px !important;
border-color: $one__border-light;
background-color: none;
&:focus{
box-shadow: none !important;
}
}
//Buttons
.btn{
border-radius: 0px;
&:hover{
filter: brightness(90%) !important;
box-shadow: none;
transition: $transition-normal;
}
}
.btn-primary{
background-color: $one__primary !important;
border-color: $one__primary !important;
color: $one__light !important;
&:hover{
background-color: $one__primary-dark !important;
}
&:focus{
box-shadow: 0 0 0 0.2rem rgba(235,240,253, 0.8);
}
}
//Links
a, .btn-link {
color: $one__primary;
text-decoration: none;
background-color: transparent;
&:hover{
color: $one__primary-dark;
text-decoration: none !important;
transition: $transition-normal;
}
}

View File

@@ -0,0 +1,71 @@
$one__light: #fff !default;
$one__primary: #00A97F !default;
$one__primary-dark: #009872 !important;
$one__border-light: #d4d4d4 !important;
$transition-normal: all 0.4s linear !default;
.c_login_container{
background: $one__light !important;
width: 100% !important;
.card-body{
background-color: transparent !important;
}
}
.input-group-prepend{
.input-group-text{
border-radius: 0px !important;
border-right: 0px !important;
background: transparent !important;
}
}
.form-control{
border-radius: 0px !important;
border-color: $one__border-light;
background-color: none;
&:focus{
box-shadow: none !important;
}
}
//Buttons
.btn{
border-radius: 0px;
&:hover{
filter: brightness(90%) !important;
box-shadow: none;
transition: $transition-normal;
}
}
.btn-primary{
background-color: $one__primary !important;
border-color: $one__primary !important;
color: $one__light !important;
&:hover{
background-color: $one__primary-dark !important;
}
&:focus{
box-shadow: 0 0 0 0.2rem rgba(235,240,253, 0.8);
}
}
//Links
a, .btn-link {
color: $one__primary;
text-decoration: none;
background-color: transparent;
&:hover{
color: $one__primary-dark;
text-decoration: none !important;
transition: $transition-normal;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="theme_systray">
<li class="new_icon">
<label class="theme_vista" style="margin-bottom:0px;" title="Change backend theme">
<t t-if="widget.is_admin">
<div class="icon_div">
<div class="toggle-icon" role="button">
<i id='theme_vista' class="fa fa-paint-brush" role="img" aria-label="Theme" width="22" height="22"/>
</div>
</div>
</t>
</label>
</li>
</t>
</templates>

View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-inherit="web.NavBar" t-inherit-mode="extension" owl="1">
<xpath expr="//nav[hasclass('o_main_navbar')]" position="replace">
<nav class="o_main_navbar d-flex justify-content-between"
t-on-dropdown-item-selected="onNavBarDropdownItemSelection"
data-command-category="navbar">
<div class="d-flex">
<div class="top_heading">
<!-- Apps Menu -->
<t t-call="web.NavBar.AppsMenu">
<t t-set="apps" t-value="menuService.getApps()"/>
</t>
<!-- App Brand -->
<DropdownItem
t-if="currentApp"
href="getMenuItemHref(currentApp)"
t-esc="currentApp.name"
class="'o_menu_brand d-none d-md-block'"
dataset="{ menuXmlid: currentApp.xmlid, section: currentApp.id }"
onSelected="() => this.onNavBarDropdownItemSelection(currentApp)"
/>
</div>
<!-- Current App Sections -->
<div class="d-none d-md-block">
<t t-if="currentAppSections.length"
t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections"/>
</t>
</div>
<div class="d-xs-block d-sm-block d-md-none">
<t t-call="web.NavBar.SectionsMenu.MoreDropdown">
<t t-set="sections" t-value="currentAppSections"/>
</t>
</div>
</div>
<!-- Systray -->
<div class="o_menu_systray d-flex flex-shrink-0 ms-auto" role="menu">
<t t-foreach="systrayItems" t-as="item" t-key="item.key">
<!-- This ensures the correct order of the systray items -->
<div t-att-data-index="item.index"/>
<ErrorHandler onError="error => this.handleItemError(error, item)">
<t t-component="item.Component" t-props="item.props"/>
</ErrorHandler>
</t>
</div>
</nav>
<div class="sidebar_panel" id="sidebar_panel">
<div class="sidebar">
<div class="sidebar_close">
<a id="closeSidebar" style="cursor: pointer;">
<img src="/code_backend_theme/static/src/img/icons/close.png"/>
</a>
</div>
<h6 class="sidebar_head">MENU</h6>
<ul class="sidebar_menu">
<t t-foreach="menuService.getApps()" t-as="app" t-key="app.id">
<li data-toggle="tooltip" data-placement="right" t-att-title="app.name">
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="nav-link">
<img class="sidebar_img"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<span class="sidebar_app_name">
<t t-esc="app.name"/>
</span>
</a>
</li>
</t>
</ul>
</div>
</div>
</xpath>
</t>
<t t-inherit="web.NavBar.AppsMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//Dropdown[1]"
position="replace">
<li class="dropdown">
<a id="openSidebar"
style="display: block; cursor: pointer;">
<div class="c_sidebar_active">
<div class="c_dots_menu"/>
</div>
</a>
<a id="closeSidebar"
style="display: none; cursor: pointer;">
<div class="c_sidebar_passive">
<div class="c_dots_menu_toggled "/>
</div>
</a>
</li>
</xpath>
</t>
<t t-inherit="mail.MessagingMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//i[hasclass('o_MessagingMenu_icon')]" position="replace">
<img src="/vista_backend_theme/static/src/img/icons/speech-bubble.png" width="22" height="22"
aria-label="Messages"/>
</xpath>
</t>
<t t-inherit="mail.ActivityMenuView" t-inherit-mode="extension" owl="1">
<xpath expr="//i[hasclass('fa-clock-o')]" position="replace">
<img src="/vista_backend_theme/static/src/img/icons/bell.png" width="22" height="22"
aria-label="Activities"/>
</xpath>
</t>
</templates>