#fix: Baseview
This commit is contained in:
parent
59285440a5
commit
778a34be12
|
|
@ -0,0 +1 @@
|
|||
from . import models
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
{
|
||||
'name': 'Base Changes',
|
||||
'category': 'Base',
|
||||
'version': '1.1',
|
||||
'author': 'Seshi Kanth',
|
||||
'summary': 'Changes of the form',
|
||||
'description': 'This module contains form changes.',
|
||||
'depends': [
|
||||
'base',
|
||||
'web',
|
||||
],
|
||||
|
||||
'data': [
|
||||
# 'views/user_menu.xml',
|
||||
],
|
||||
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'base_custom/static/src/css/backend.css',
|
||||
'base_custom/static/src/js/user_menu_patch.js',
|
||||
'base_custom/static/src/js/hide_user_menu.js',
|
||||
'base_custom/static/src/xml/user_menu.xml',
|
||||
],
|
||||
},
|
||||
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import ir_http
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
from odoo import models
|
||||
|
||||
|
||||
class IrHttp(models.AbstractModel):
|
||||
_inherit = "ir.http"
|
||||
|
||||
def session_info(self):
|
||||
session_info = super().session_info()
|
||||
|
||||
employee = self.env.user.employee_id
|
||||
|
||||
session_info.update({
|
||||
"employee_name": employee.name or self.env.user.name,
|
||||
"employee_designation": employee.job_id.name if employee.job_id else "",
|
||||
})
|
||||
|
||||
return session_info
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
.o_switch_company_menu .oe_topbar_name{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.oe_topbar_name{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
.oe_topbar_name .fw-bold{
|
||||
font-size:13px;
|
||||
font-weight:600;
|
||||
}
|
||||
|
||||
.oe_topbar_name .designation{
|
||||
font-size:11px;
|
||||
color:#7b7b7b;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const userMenuRegistry = registry.category("user_menuitems");
|
||||
|
||||
const itemsToHide = [
|
||||
"documentation",
|
||||
"support",
|
||||
"shortcuts",
|
||||
"odoo_account",
|
||||
];
|
||||
|
||||
for (const item of itemsToHide) {
|
||||
if (userMenuRegistry.contains(item)) {
|
||||
userMenuRegistry.remove(item);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { UserMenu } from "@web/webclient/user_menu/user_menu";
|
||||
import { session } from "@web/session";
|
||||
|
||||
patch(UserMenu.prototype, {
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
this.employeeName = session.employee_name;
|
||||
this.employeeDesignation = session.employee_designation;
|
||||
},
|
||||
|
||||
get employeeInfo() {
|
||||
return {
|
||||
employeeName: this.employeeName,
|
||||
employeeDesignation: this.employeeDesignation,
|
||||
};
|
||||
},
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-inherit="web.UserMenu"
|
||||
t-inherit-mode="extension">
|
||||
|
||||
<xpath expr="//small[contains(@class,'oe_topbar_name')]"
|
||||
position="replace">
|
||||
|
||||
<small class="oe_topbar_name d-none d-lg-inline-block ms-2 text-start"
|
||||
style="max-width:220px">
|
||||
|
||||
<div class="fw-bold text-truncate">
|
||||
<t t-esc="employeeInfo.employeeName"/>
|
||||
</div>
|
||||
|
||||
<div class="text-muted text-truncate designation">
|
||||
<t t-esc="employeeInfo.employeeDesignation"/>
|
||||
</div>
|
||||
|
||||
</small>
|
||||
|
||||
</xpath>
|
||||
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="hrms-filter-box">
|
||||
<label>Period</label>
|
||||
<span>Period</span>
|
||||
<select class="form-select form-select-sm" t-on-change="onPeriodChange" t-att-value="state.period">
|
||||
<option value="this_month" t-att-selected="state.period === 'this_month'">This Month</option>
|
||||
<option value="this_year" t-att-selected="state.period === 'this_year'">This Year</option>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
/*right: 20px;*/
|
||||
left: 260px;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
font-size: 10px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<!-- Increase login form width -->
|
||||
<xpath expr="//form" position="attributes">
|
||||
<attribute name="style">max-width:250px;margin:auto;padding-top:70px;;</attribute>
|
||||
<attribute name="style">max-width:280px;margin:auto;padding-top:95px;;</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- <!– Company Logo –>-->
|
||||
|
|
@ -26,13 +26,13 @@
|
|||
<!-- </xpath>-->
|
||||
|
||||
</template>
|
||||
<template id="brand_promotion_inherit"
|
||||
inherit_id="web.brand_promotion">
|
||||
<!-- Powered by -->
|
||||
|
||||
<template id="brand_promotion_inherit" inherit_id="web.brand_promotion">
|
||||
<xpath expr="//div[@class='o_brand_promotion']" position="replace">
|
||||
<div class="o_brand_promotion srivyn_brand_footer">
|
||||
Powered by
|
||||
<strong>SRIVYN PLATFORMS PVT.LTD</strong>
|
||||
<span>SRIVYN PLATFORMS PVT</span>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue