Commit 50e19232 by aa.gusti
2 parents a4a7b322 f16146ea
Showing 170 changed files with 930 additions and 5 deletions
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- Top menu item --> <!-- Top menu item -->
<menuitem id="id_gov_menu_root" <menuitem id="id_gov_menu_root"
name="Referensi" name="Referensi"
web_icon="id_gov_icon,static/description/icon.png" web_icon="id_gov,static/description/icon.png"
active="True" active="True"
sequence="400"/> sequence="400"/>
<menuitem id="wilayah_id_gov_menu" <menuitem id="wilayah_id_gov_menu"
......
from odoo import models, api
from datetime import datetime
class PadDashboard(models.Model):
_inherit = ''
\ No newline at end of file \ No newline at end of file

8.9 KB | W: | H:

8.95 KB | W: | H:

idg_board/static/description/icon.png
idg_board/static/description/icon.png
idg_board/static/description/icon.png
idg_board/static/description/icon.png
  • 2-up
  • Swipe
  • Onion skin
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="70" height="70" viewBox="0 0 70 70">
<defs>
<path id="icon-a" d="M4,5.35309892e-14 C36.4160122,9.87060235e-15 58.0836068,-3.97961823e-14 65,5.07020818e-14 C69,6.733808e-14 70,1 70,5 C70,43.0488877 70,62.4235458 70,65 C70,69 69,70 65,70 C61,70 9,70 4,70 C1,70 7.10542736e-15,69 7.10542736e-15,65 C7.25721566e-15,62.4676575 3.83358709e-14,41.8005206 3.60818146e-14,5 C-1.13686838e-13,1 1,5.75716207e-14 4,5.35309892e-14 Z"/>
<linearGradient id="icon-c" x1="100%" x2="0%" y1="0%" y2="100%">
<stop offset="0%" stop-color="#CD7690"/>
<stop offset="100%" stop-color="#CA5377"/>
</linearGradient>
<path id="icon-d" d="M18.0450069,57.225 C16.6239398,57.2249541 15.319401,56.4292666 14.6550625,55.1573449 C12.9601701,51.9125391 12,48.2137078 12,44.2875 C12,31.4261695 22.2974514,21 35,21 C47.7025486,21 58,31.4261695 58,44.2875 C58,48.2137078 57.0398299,51.9125391 55.3449375,55.1573449 C54.6806259,56.4292924 53.3760701,57.2249902 51.9549931,57.225 L18.0450069,57.225 Z M52.8888889,41.7 C51.4775035,41.7 50.3333333,42.8584723 50.3333333,44.2875 C50.3333333,45.7165277 51.4775035,46.875 52.8888889,46.875 C54.3002743,46.875 55.4444444,45.7165277 55.4444444,44.2875 C55.4444444,42.8584723 54.3002743,41.7 52.8888889,41.7 Z M35,28.7625 C36.4113854,28.7625 37.5555556,27.6040277 37.5555556,26.175 C37.5555556,24.7459723 36.4113854,23.5875 35,23.5875 C33.5886146,23.5875 32.4444444,24.7459723 32.4444444,26.175 C32.4444444,27.6040277 33.5886146,28.7625 35,28.7625 Z M17.1111111,41.7 C15.6997257,41.7 14.5555556,42.8584723 14.5555556,44.2875 C14.5555556,45.7165277 15.6997257,46.875 17.1111111,46.875 C18.5224965,46.875 19.6666667,45.7165277 19.6666667,44.2875 C19.6666667,42.8584723 18.5224965,41.7 17.1111111,41.7 Z M22.3506389,28.8925219 C20.9392535,28.8925219 19.7950833,30.0509941 19.7950833,31.4800219 C19.7950833,32.9090496 20.9392535,34.0675219 22.3506389,34.0675219 C23.7620243,34.0675219 24.9061944,32.9090496 24.9061944,31.4800219 C24.9061944,30.0509941 23.7620243,28.8925219 22.3506389,28.8925219 Z M47.6493611,28.8925219 C46.2379757,28.8925219 45.0938056,30.0509941 45.0938056,31.4800219 C45.0938056,32.9090496 46.2379757,34.0675219 47.6493611,34.0675219 C49.0607465,34.0675219 50.2049167,32.9090496 50.2049167,31.4800219 C50.2049167,30.0509941 49.0607465,28.8925219 47.6493611,28.8925219 Z M40.6952153,31.4423414 C39.686809,31.1156695 38.6082049,31.6784508 38.285566,32.6992195 L34.6181042,44.3034293 C31.9739028,44.501373 29.8888889,46.7346281 29.8888889,49.4625 C29.8888889,52.3205555 32.1772292,54.6375 35,54.6375 C37.8227708,54.6375 40.1111111,52.3205555 40.1111111,49.4625 C40.1111111,47.8636676 39.3946771,46.434559 38.269434,45.4852699 L41.9365764,33.8821113 C42.2591354,32.8612617 41.7033819,31.7690133 40.6952153,31.4423414 Z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<mask id="icon-b" fill="#fff">
<use xlink:href="#icon-a"/>
</mask>
<g mask="url(#icon-b)">
<rect width="70" height="70" fill="url(#icon-c)"/>
<path fill="#FFF" fill-opacity=".383" d="M4,1.8 L65,1.8 C67.6666667,1.8 69.3333333,1.13333333 70,-0.2 C70,2.46666667 70,3.46666667 70,2.8 L1.10547097e-14,2.8 C-1.65952376e-14,3.46666667 -2.9161925e-14,2.46666667 -2.66453526e-14,-0.2 C0.666666667,1.13333333 2,1.8 4,1.8 Z" transform="matrix(1 0 0 -1 0 2.8)"/>
<path fill="#393939" d="M4,50 C2,50 -7.10542736e-15,49.851312 0,45.8367347 L0,26.3942795 L16.3536575,8.86200565 C29.4512192,-0.488174988 39.6666667,-2.3877551 47,3.16326531 C54.3333333,8.71428571 58,14.9591837 58,21.8979592 C55.8677728,29.7827578 54.7719047,33.7755585 54.7123959,33.8763613 C54.6528871,33.9771642 49.9857922,39.3517104 40.7111111,50 L4,50 Z" opacity=".324" transform="translate(0 20)"/>
<path fill="#000" fill-opacity=".383" d="M4,4 L65,4 C67.6666667,4 69.3333333,3 70,1 C70,3.66666667 70,5 70,5 L1.77635684e-15,5 C1.77635684e-15,5 1.77635684e-15,3.66666667 1.77635684e-15,1 C0.666666667,3 2,4 4,4 Z" transform="translate(0 65)"/>
<use fill="#000" fill-rule="nonzero" opacity=".3" xlink:href="#icon-d"/>
<path fill="#FFF" fill-rule="nonzero" d="M18.0450069,55.225 C16.6239398,55.2249541 15.319401,54.4292666 14.6550625,53.1573449 C12.9601701,49.9125391 12,46.2137078 12,42.2875 C12,29.4261695 22.2974514,19 35,19 C47.7025486,19 58,29.4261695 58,42.2875 C58,46.2137078 57.0398299,49.9125391 55.3449375,53.1573449 C54.6806259,54.4292924 53.3760701,55.2249902 51.9549931,55.225 L18.0450069,55.225 Z M52.8888889,39.7 C51.4775035,39.7 50.3333333,40.8584723 50.3333333,42.2875 C50.3333333,43.7165277 51.4775035,44.875 52.8888889,44.875 C54.3002743,44.875 55.4444444,43.7165277 55.4444444,42.2875 C55.4444444,40.8584723 54.3002743,39.7 52.8888889,39.7 Z M35,26.7625 C36.4113854,26.7625 37.5555556,25.6040277 37.5555556,24.175 C37.5555556,22.7459723 36.4113854,21.5875 35,21.5875 C33.5886146,21.5875 32.4444444,22.7459723 32.4444444,24.175 C32.4444444,25.6040277 33.5886146,26.7625 35,26.7625 Z M17.1111111,39.7 C15.6997257,39.7 14.5555556,40.8584723 14.5555556,42.2875 C14.5555556,43.7165277 15.6997257,44.875 17.1111111,44.875 C18.5224965,44.875 19.6666667,43.7165277 19.6666667,42.2875 C19.6666667,40.8584723 18.5224965,39.7 17.1111111,39.7 Z M22.3506389,26.8925219 C20.9392535,26.8925219 19.7950833,28.0509941 19.7950833,29.4800219 C19.7950833,30.9090496 20.9392535,32.0675219 22.3506389,32.0675219 C23.7620243,32.0675219 24.9061944,30.9090496 24.9061944,29.4800219 C24.9061944,28.0509941 23.7620243,26.8925219 22.3506389,26.8925219 Z M47.6493611,26.8925219 C46.2379757,26.8925219 45.0938056,28.0509941 45.0938056,29.4800219 C45.0938056,30.9090496 46.2379757,32.0675219 47.6493611,32.0675219 C49.0607465,32.0675219 50.2049167,30.9090496 50.2049167,29.4800219 C50.2049167,28.0509941 49.0607465,26.8925219 47.6493611,26.8925219 Z M40.6952153,29.4423414 C39.686809,29.1156695 38.6082049,29.6784508 38.285566,30.6992195 L34.6181042,42.3034293 C31.9739028,42.501373 29.8888889,44.7346281 29.8888889,47.4625 C29.8888889,50.3205555 32.1772292,52.6375 35,52.6375 C37.8227708,52.6375 40.1111111,50.3205555 40.1111111,47.4625 C40.1111111,45.8636676 39.3946771,44.434559 38.269434,43.4852699 L41.9365764,31.8821113 C42.2591354,30.8612617 41.7033819,29.7690133 40.6952153,29.4423414 Z"/>
</g>
</g>
</svg>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
var radialoptions = {
series: [72],
chart: {
type: 'radialBar',
width: 72,
height: 72,
sparkline: {
enabled: true
}
},
dataLabels: {
enabled: false
},
colors: ['#0ab39c'],
stroke: {
lineCap: 'round'
},
plotOptions: {
radialBar: {
hollow: {
margin: 0,
size: '70%'
},
track: {
margin: 0,
},
dataLabels: {
name: {
show: false
},
value: {
offsetY: 5,
show: true
}
}
}
}
};
var radialchart = new ApexCharts(document.querySelector("#radialchart-1"), radialoptions);
radialchart.render();
// Radialchart 2
var radialoptions = {
series: [45],
chart: {
type: 'radialBar',
width: 72,
height: 72,
sparkline: {
enabled: true
}
},
dataLabels: {
enabled: false
},
colors: ['#0ab39c'],
stroke: {
lineCap: 'round'
},
plotOptions: {
radialBar: {
hollow: {
margin: 0,
size: '70%'
},
track: {
margin: 0,
},
dataLabels: {
name: {
show: false
},
value: {
offsetY: 5,
show: true
}
}
}
}
};
var radialchart = new ApexCharts(document.querySelector("#radialchart-2"), radialoptions);
radialchart.render();
// Radialchart 3
var radialoptions = {
series: [54],
chart: {
type: 'radialBar',
width: 72,
height: 72,
sparkline: {
enabled: true
}
},
dataLabels: {
enabled: false
},
colors: ['#0ab39c'],
stroke: {
lineCap: 'round'
},
plotOptions: {
radialBar: {
hollow: {
margin: 0,
size: '70%'
},
track: {
margin: 0,
},
dataLabels: {
name: {
show: false
},
value: {
offsetY: 5,
show: true
}
}
}
}
};
var radialchart = new ApexCharts(document.querySelector("#radialchart-3"), radialoptions);
radialchart.render();
\ No newline at end of file \ No newline at end of file
odoo.define('idg_dashboard.pad_dashboard', function (require) {
"use strict";
var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var QWeb = core.qweb;
var PadDashboard = AbstractAction.extend({
template: 'Dashboard',
init: function(parent, context) {
this._super(parent, context);
this.dashboard_templates = [
'DashboardTop',
];
this.pad_total_nasional = [];
},
start: function() {
var self = this;
this.set("title", "Dashboard");
return this._super().then(function() {
self.render_dashboards();
});
},
render_dashboards: function() {
var self = this;
_.each(this.dashboard_templates, function(template) {
self.$('.o_pad_dashboard').append(QWeb.render(template, {widget: self}));
});
},
fetch_data: function() {
// to do : fetching the data
},
});
core.action_registry.add('pad_dashboard_tag', PadDashboard);
return PadDashboard;
});
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<templates id="template" xml:space="preserve">
<t t-name="Dashboard">
<div class="oh_dashboards">
<div class="container-fluid o_pad_dashboard">
</div>
</div>
</t>
<t t-name="DashboardTop">
<div class="row">
<div class="col-xl-3 col-sm-6">
<div class="card">
<div class="card-body">
<div class="d-flex text-muted">
<div class="flex-shrink-0 me-3 align-self-center">
<div id="radialchart-1" class="apex-charts" dir="ltr"></div>
</div>
<div class="flex-grow-1 overflow-hidden">
<p class="mb-1">Users</p>
<h5 class="mb-3">2.2k</h5>
<p class="text-truncate mb-0"><span class="text-success me-2"> 0.02% <i class="ri-arrow-right-up-line align-bottom ms-1"></i></span> From previous</p>
</div>
</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
<div class="col-xl-3 col-sm-6">
<div class="card">
<div class="card-body">
<div class="d-flex">
<div class="flex-shrink-0 me-3 align-self-center">
<div id="radialchart-2" class="apex-charts" dir="ltr"></div>
</div>
<div class="flex-grow-1 overflow-hidden">
<p class="mb-1">Views per minute</p>
<h5 class="mb-3">50</h5>
<p class="text-truncate mb-0"><span class="text-success me-2"> 1.7% <i class="ri-arrow-right-up-line align-bottom ms-1"></i></span> From previous</p>
</div>
</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
<div class="col-xl-3 col-sm-6">
<div class="card">
<div class="card-body">
<div class="d-flex text-muted">
<div class="flex-shrink-0 me-3 align-self-center">
<div id="radialchart-3" class="apex-charts" dir="ltr"></div>
</div>
<div class="flex-grow-1 overflow-hidden">
<p class="mb-1">Bounce Rate</p>
<h5 class="mb-3">24.03 %</h5>
<p class="text-truncate mb-0"><span class="text-danger me-2"> 0.01% <i class="ri-arrow-right-down-line align-bottom ms-1"></i></span> From previous</p>
</div>
</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
<div class="col-xl-3 col-sm-6">
<div class="card">
<div class="card-body">
<div class="d-flex text-muted">
<div class="flex-shrink-0 me-3 align-self-center">
<div class="avatar-sm">
<div class="avatar-title bg-light rounded-circle text-primary font-size-20">
<i class="ri-group-line"></i>
</div>
</div>
</div>
<div class="flex-grow-1 overflow-hidden">
<p class="mb-1">New Visitors</p>
<h5 class="mb-3">435</h5>
<p class="text-truncate mb-0"><span class="text-success me-2"> 0.01% <i class="ri-arrow-right-up-line align-bottom ms-1"></i></span> From previous</p>
</div>
</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
</div>
</t>
</templates>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="idg_region_tax_actual_graph" model="ir.actions.act_window">
<field name="name">idg.region.tax.actual.tree</field>
<field name="res_model">idg.region.tax.actual</field>
<field name="view_mode">graph</field>
<!-- <field name="view_id" ref="idg_board.idg_board_tax_actual_graph_view"/> -->
</record>
<record id="idg_region_tax_actual_tree" model="ir.actions.act_window">
<field name="name">idg.region.tax.actual.tree</field>
<field name="res_model">idg.region.tax.actual</field>
<field name="view_mode">tree</field>
<!-- <field name="view_id" ref="idg_board.idg_board_tax_actual_graph_view"/> -->
</record>
<record id="idg_region_tax_plan_tree" model="ir.actions.act_window">
<field name="name">idg.region.tax.plan.tree</field>
<field name="res_model">idg.region.tax.plan</field>
<field name="view_mode">graph</field>
<!-- <field name="view_id" ref="idg_board.idg_board_tax_plan_graph_view"/> -->
</record>
<record id="idg_region_tax_potency_tree" model="ir.actions.act_window">
<field name="name">idg.region.tax.potency.tree</field>
<field name="res_model">idg.region.tax.potency</field>
<field name="view_mode">graph</field>
<!-- <field name="view_id" ref="idg_board.idg_board_tax_potency_graph_view"/> -->
</record>
<record model="ir.ui.view" id="tax_main_board">
<field name="name">Dashboard Pajak Daerah</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Dashboard Pajak Daerah">
<board style="1-1-1">
<column>
<action
string="Potensi"
name="%(idg_region_tax_potency_tree)d"/>
</column>
<column>
<action
string="Rencana"
name="%(idg_region_tax_plan_tree)d"/>
</column>
<column>
<action
string="Realisasi"
name="%(idg_region_tax_actual_graph)d"/>
</column>
</board>
<board style="2-1">
<column>
<action
string="Potensi"
name="%(idg_region_tax_potency_tree)d"/>
<action
string="Rencana"
name="%(idg_region_tax_plan_tree)d"/>
</column>
<column>
<action
string="Realisasi"
name="%(idg_region_tax_actual_tree)d"/>
</column>
</board>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_tax">
<field name="name">Dashboard Pajak Daerah</field>
<field name="res_model">board.board</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="tax_main_board"/>
</record>
<menuitem
name="Dashboard Pajak Daerah"
parent="base.menu_reporting_dashboard"
action="open_board_tax"
sequence="1"
id="menu_board_tax"/>
</odoo>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="pad_dashboard_action" model="ir.actions.client">
<field name="name">Dashboard</field>
<field name="tag">pad_dashboard_tag</field>
</record>
<menuitem name="Dashboard" id="pad_dashboard_menu" action="pad_dashboard_action"/>
<!-- <template id="dashboard_assets" name="Dashboard Assets" inherit_id="web.assets_backend">-->
<!-- <xpath expr="." position="inside">-->
<!-- <link href="/idg_board/static/src/css/pad_dashboard.css" rel="stylesheet" type="text/css" />-->
<!-- </xpath>-->
<!-- </template>-->
<template id="dashboard_assets_2" name="Dashboard Assets 2" inherit_id="web.assets_backend">
<xpath expr="." position="after">
<script type="text/javascript" src="/idg_board/static/src/js/pad_dashboard.js"/>
<script type="text/javascript" src="/idg_board/static/src/js/apexcharts.min.js"/>
<script type="text/javascript" src="/idg_board/static/src/js/dashboard.js"/>
</xpath>
</template>
</odoo>
\ No newline at end of file \ No newline at end of file
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<record id="action_idg_region_tax_actual" model="ir.actions.act_window"> <record id="action_idg_region_tax_actual" model="ir.actions.act_window">
<field name="name">Region Tax Actual</field> <field name="name">Region Tax Actual</field>
<field name="res_model">idg.region.tax.actual</field> <field name="res_model">idg.region.tax.actual</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="idg_region_tax_actual_tree"/> <field name="view_id" ref="idg_region_tax_actual_tree"/>
<field name="search_view_id" ref="view_idg_region_tax_actual_search"/> <field name="search_view_id" ref="view_idg_region_tax_actual_search"/>
<field name="help" type="html"> <field name="help" type="html">
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<record id="action_idg_region_tax_plan" model="ir.actions.act_window"> <record id="action_idg_region_tax_plan" model="ir.actions.act_window">
<field name="name">Region Tax Planned</field> <field name="name">Region Tax Planned</field>
<field name="res_model">idg.region.tax.plan</field> <field name="res_model">idg.region.tax.plan</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="idg_region_tax_plan_tree"/> <field name="view_id" ref="idg_region_tax_plan_tree"/>
<field name="search_view_id" ref="view_idg_region_tax_plan_search"/> <field name="search_view_id" ref="view_idg_region_tax_plan_search"/>
<field name="help" type="html"> <field name="help" type="html">
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<record id="action_idg_region_tax_potency" model="ir.actions.act_window"> <record id="action_idg_region_tax_potency" model="ir.actions.act_window">
<field name="name">Region Tax Potency</field> <field name="name">Region Tax Potency</field>
<field name="res_model">idg.region.tax.potency</field> <field name="res_model">idg.region.tax.potency</field>
<field name="view_mode">tree,form,kanban,graph</field> <field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="idg_region_tax_potency_tree"/> <field name="view_id" ref="idg_region_tax_potency_tree"/>
<field name="search_view_id" ref="view_idg_region_tax_potency_search"/> <field name="search_view_id" ref="view_idg_region_tax_potency_search"/>
<!-- <field name="context">{'search_default_group_province': 1}</field>--> <!-- <field name="context">{'search_default_group_province': 1}</field>-->
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- Top menu item --> <!-- Top menu item -->
<menuitem id="idg_pdl_kab_menu_root" <menuitem id="idg_pdl_kab_menu_root"
name="PDL Kab/Kota" name="PDL Kab/Kota"
web_icon="idg_pdl_kab_icon,static/description/icon.png" web_icon="idg_pdl_kab,static/description/icon.png"
active="True" active="True"
sequence="400"/> sequence="400"/>
<!--Pendataan--> <!--Pendataan-->
......
# -*- coding: utf-8 -*-
from .hooks import test_pre_init_hook, test_post_init_hook
# from . import wizard
# -*- coding: utf-8 -*-
{
"name": "IDG Backend Theme V14",
"description": """Odoo V14 backend theme for Indonesia Government""",
"summary": "Odoo V14 backend theme for Indonesia Government",
"category": "Themes/Backend",
"version": "1.0",
'author': 'bregananta',
'company': 'bregananta',
'maintainer': 'bregananta',
'website': "https://www.bregananta.id",
"depends": ['base', 'web', 'mail', 'web_responsive'],
'images': [],
"data": [
# 'security/ir.model.access.csv',
'views/assets.xml',
'views/icons.xml',
'views/layout.xml',
# 'views/theme.xml',
# 'data/theme_data.xml',
],
"qweb": [
'static/src/xml/sidebar.xml',
'static/src/xml/styles.xml',
'static/src/xml/top_bar.xml',
# 'static/src/xml/systray.xml',
],
'installable': True,
'application': False,
'auto_install': False,
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="theme_data_stored" model="theme.data.stored">
<field name="name">default</field>
</record>
</data>
</odoo>
# -*- coding: utf-8 -*-
import base64
from odoo import api, SUPERUSER_ID
from odoo.modules import get_module_resource
def test_pre_init_hook(cr):
"""pre init hook"""
env = api.Environment(cr, SUPERUSER_ID, {})
menu_item = env['ir.ui.menu'].search([('parent_id', '=', False)])
for menu in menu_item:
if menu.name == 'PDL Kab/Kota':
img_path = get_module_resource(
'idg_theme', 'static', 'src', 'img', 'icons', 'idg_pdl.png')
menu.write({'web_icon_data': base64.b64encode(open(img_path, "rb").read())})
if menu.name == 'BPHTB':
img_path = get_module_resource(
'idg_theme', 'static', 'src', 'img', 'icons', 'idg_bphtb.png')
menu.write({'web_icon_data': base64.b64encode(open(img_path, "rb").read())})
def test_post_init_hook(cr, registry):
"""post init hook"""
env = api.Environment(cr, SUPERUSER_ID, {})
menu_item = env['ir.ui.menu'].search([('parent_id', '=', False)])
for menu in menu_item:
if menu.name == 'PDL Kab/Kota':
img_path = get_module_resource(
'idg_theme', 'static', 'src', 'img', 'icons',
'idg_pdl.png')
menu.write({'web_icon_data': base64.b64encode(
open(img_path, "rb").read())})
if menu.name == 'BPHTB':
img_path = get_module_resource(
'idg_theme', 'static', 'src', 'img', 'icons',
'idg_bphtb.png')
menu.write({'web_icon_data': base64.b64encode(
open(img_path, "rb").read())})
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_theme_data,access.theme.data,model_theme_data,,1,1,1,1
<!-- HERO SECTION -->
<div class="contianer">
<div class="row position-relative"
style="background-color: #2f3542 !important; height: 400px; margin-bottom: 6rem; border-radius: 1rem !important;">
<div class="col-lg-12 d-flex flex-column justify-content-start align-items-center">
<h1 class="display-1 text-white" style="padding-top: 5rem;">SDN Theme</h1>
<p class="text-light small font-weight-bold" style="letter-spacing: 2px; text-transform: uppercase;">Backend Theme for
Odoo 14</p>
</div>
</div>
</div>
<!-- END OF HERO SECTION -->
\ No newline at end of file \ No newline at end of file
odoo.define('idg_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: "idg_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;
});
\ No newline at end of file \ No newline at end of file
odoo.define('idg_theme.SidebarMenu', function (require) {
"use strict";
const config = require("web.config");
const Menu = require("web.Menu");
const SideBar = require("idg_theme.SideBar");
Menu.include({
start() {
var res = this._super.apply(this, arguments);
this.sidebar_apps = this.$('.sidebar_panel');
this._sideBar = new SideBar(this, this.menu_data);
var sideBar = this._sideBar.appendTo(this.sidebar_apps);
return res, sideBar
},
});
function showSidebar(){
$("#sidebar_panel").css({'display':'block'});
$(".o_action_manager").css({'margin-left': '90px','transition':'all .1s linear'});
$(".top_heading").css({'margin-left': '78px','transition':'all .1s linear'});
$("#dotsWhite").toggleClass("d-block d-none");
$("#dotsPrimary").toggleClass("d-block d-none");
//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");
}
function hideSidebar(){
$("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'});
$("#dotsWhite").toggleClass("d-block d-none");
$("#dotsPrimary").toggleClass("d-block d-none");
//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");
}
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;
});
/* $(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");
});*/
});
\ No newline at end of file \ No newline at end of file
odoo.define('idg_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]
});
});
});
\ No newline at end of file \ No newline at end of file
odoo.define('idg_theme.theme', function (require) {
"use strict";
var SystrayMenu = require('web.SystrayMenu');
var Widget = require('web.Widget');
var Session = require('web.session');
var ThemeWidget = Widget.extend({
template: 'theme_systray',
events: {
'click #theme_sdn': '_onClick',
},
is_admin: false,
willStart: function () {
this.is_admin = Session.is_admin;
return this._super.apply(this, arguments);
},
_onClick: function(){
var menu = $('.o_menu_sections');
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);
return ThemeWidget;
});
.datepicker{
z-index: 9999 !important;
}
div.dropdown-menu.bootstrap-datetimepicker-widget {
width: 28rem !important;
}
.datepicker .table-sm > thead,
.datepicker > div > table > tbody > tr > td.active{
background-color: $one__primary;
}
.datepicker .table-sm > thead > tr:first-child th:hover {
background-color: $one__primary-dark;
}
.datepicker .table-sm > tbody > tr > td.today::before{
border-bottom-color: $one__primary;
}
.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;
}
}
\ No newline at end of file \ No newline at end of file
#sidebar_panel {
height: 100%;
position: fixed;
top: 0px;
background-color: $one__sidebar-color;
border-right: 1px solid $one__sidebar-border;
display: none;
width: 80px;
overflow-y: scroll;
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
scrollbar-width: none; /* Hide scrollbar for Firefox */
z-index: 999;
}
#sidebar_panel::-webkit-scrollbar {
display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}
.sidebar_menu{
margin-top: 20px !important;
}
.sidebar_title{
color: $one__sidebar_text;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 0.9rem;
margin-left: auto;
margin-right: auto;
width: 38px;
display: block;
margin-top: 18px !important;
}
.sidebar_panel .sidebar {
padding: 0;
white-space: nowrap;
padding-bottom: 20px;
padding-top: 5px;
}
.sidebar_panel .sidebar_close {
text-align: end;
display: none;
position: sticky;
height: 35px;
padding-top: 5px;
top: 0;
background: #2a3042;
z-index: 1;
}
.sidebar_panel .sidebar_close a#closeSidebar {
font-size: 18px;
margin-right: 10px;
color: #ffffff;
opacity: .3;
}
.sidebar_panel .sidebar_close a#closeSidebar img {
width: 15px;
}
.sidebar_panel .sidebar .sidebar_logo {
padding-top: 20px;
text-align: center;
padding-bottom: 20px;
}
.sidebar_panel .sidebar .sidebar_logo img {
max-width: 150px;
}
.sidebar_panel .sidebar .sidebar_head {
padding-top: 20px;
padding-left: 15px;
color: #6a7187;
font-size: 14px;
}
.sidebar_panel .sidebar .sidebar_menu {
list-style: none;
margin: 0;
padding: 0;
}
.sidebar_panel .sidebar .sidebar_menu li {
margin: 0;
padding: 0;
border: 0px;
display: block;
}
.sidebar_panel .sidebar .sidebar_menu li a {
margin: 0;
border: 0px;
display: block;
cursor: pointer;
overflow: hidden;
padding: 8px 10px 8px 25px;
color: #ffffff;
font-size: 13px;
transition:.3s all;
}
.sidebar_panel .sidebar .sidebar_menu li:hover a {
background: $one__sidebar-color-hover;
color: $one__light;
}
.sidebar_panel .nav-link {
opacity: 1 !important;
transition:.3s all;
}
.sidebar_panel .sidebar a.nav-link.active {
color: $one__light !important;
border-left: 4px solid $one__light;
img{
margin-left: -0.5rem !important;
}
}
.sidebar_panel .sidebar .sidebar_menu li a .sidebar_img {
width: 32px;
height: 32px;
margin: 8px 8px 8px 0;
}
.sidebar_panel .sidebar .sidebar_menu li a {
transition: $transition-fast;
&:hover{
transform: scale(1.1);
transition: $transition-fast;
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!