[IMP] Improve ospp_base module
parent
3f49ca1250
commit
f36ba9f5e2
|
@ -30,6 +30,14 @@
|
|||
'views/views.xml',
|
||||
'views/templates.xml',
|
||||
],
|
||||
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'ospp_base/static/src/js/web_title.js',
|
||||
'ospp_base/static/src/js/user_menu.js'
|
||||
],
|
||||
},
|
||||
|
||||
# only loaded in demonstration mode
|
||||
'demo': [
|
||||
'demo/demo.xml',
|
||||
|
|
|
@ -4,6 +4,19 @@ import uuid
|
|||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class View(models.Model):
|
||||
_inherit = 'ir.ui.view'
|
||||
|
||||
@api.model
|
||||
def _render_template(self, template, values=None):
|
||||
if template in ['web.login', 'web.webclient_bootstrap']:
|
||||
if not values:
|
||||
values = {}
|
||||
values["title"] = _("Newbiz")
|
||||
values["disable_footer"] = self.env['ir.config_parameter'].sudo().get_param("disable_footer", "") or True
|
||||
return super(View, self)._render_template(template, values)
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.2" width="90.01mm" height="43.71mm" viewBox="5750 13380 9001 4371" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:ooo="http://xml.openoffice.org/svg/export" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:presentation="http://sun.com/xmlns/staroffice/presentation" xmlns:smil="http://www.w3.org/2001/SMIL20/" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xml:space="preserve">
|
||||
<defs>
|
||||
<font id="EmbeddedFont_1" horiz-adv-x="2048">
|
||||
<font-face font-family="Droid Sans Fallback embedded" units-per-em="2048" font-weight="normal" font-style="normal" ascent="2117" descent="529"/>
|
||||
<missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
|
||||
<glyph unicode="训" horiz-adv-x="1801" d="M 400,1656 C 485,1549 555,1437 608,1320 L 456,1232 C 408,1349 341,1461 256,1568 L 400,1656 Z M 104,1064 L 520,1064 520,184 624,328 720,240 C 661,128 584,21 488,-80 L 368,24 368,920 104,920 104,1064 Z M 1720,1664 L 1880,1664 1880,-184 1720,-184 1720,1664 Z M 944,1664 L 1104,1664 1104,608 C 1104,283 1011,16 824,-192 L 696,-88 C 861,99 944,331 944,608 L 944,1664 Z M 1336,1560 L 1488,1560 1488,-32 1336,-32 1336,1560 Z"/>
|
||||
<glyph unicode="数" horiz-adv-x="1853" d="M 1368,1320 L 1904,1320 1904,1168 1816,1168 C 1784,795 1709,512 1592,320 1688,192 1811,75 1960,-32 L 1840,-184 C 1717,-83 1603,37 1496,176 1389,32 1259,-91 1104,-192 L 992,-48 C 1152,48 1285,173 1392,328 L 1184,760 1120,624 992,720 C 1125,1003 1221,1315 1280,1656 L 1440,1608 1368,1320 Z M 1656,1168 L 1328,1168 1272,984 C 1336,792 1408,627 1488,488 1557,637 1608,819 1640,1032 L 1640,1040 1656,1168 Z M 144,1312 L 560,1312 560,1648 704,1648 704,1312 1088,1312 1088,1176 704,1176 704,808 560,808 560,1056 C 469,928 363,824 240,744 L 136,872 C 269,941 387,1043 488,1176 L 144,1176 144,1312 Z M 336,1616 L 440,1400 312,1336 216,1560 336,1616 Z M 928,1616 L 1048,1560 C 1000,1469 949,1400 896,1352 L 792,1448 C 845,1496 891,1552 928,1616 Z M 872,1104 L 1016,904 896,832 C 864,907 819,976 760,1040 L 872,1104 Z M 136,640 L 448,640 504,768 656,752 608,640 968,640 968,504 C 904,365 827,248 736,152 L 984,0 888,-144 616,40 C 504,-56 355,-133 168,-192 L 120,-56 C 259,-13 379,43 480,112 L 200,256 368,504 136,504 136,640 Z M 536,504 L 416,320 608,224 C 688,309 752,403 800,504 L 536,504 Z"/>
|
||||
<glyph unicode="实" horiz-adv-x="1800" d="M 1040,1672 L 1128,1480 1896,1480 1896,1112 1736,1112 1736,1336 312,1336 312,1112 152,1112 152,1480 952,1480 872,1624 1040,1672 Z M 136,480 L 1048,480 C 1096,581 1120,696 1120,824 L 1128,1232 1296,1232 1288,776 C 1288,664 1272,565 1240,480 L 1904,480 1904,320 1160,320 C 1016,96 731,-72 304,-184 L 216,-32 C 552,53 795,171 944,320 L 136,320 136,480 Z M 592,1160 C 741,1091 880,1011 1008,920 L 896,800 C 773,891 640,968 496,1032 L 592,1160 Z M 400,888 C 549,819 685,739 808,648 L 696,528 C 573,619 443,696 304,760 L 400,888 Z M 1392,264 L 1928,-40 1824,-168 1288,144 1392,264 Z"/>
|
||||
<glyph unicode="字" horiz-adv-x="1774" d="M 1040,1672 L 1128,1480 1896,1480 1896,1112 1736,1112 1736,1336 312,1336 312,1112 152,1112 152,1480 952,1480 872,1624 1040,1672 Z M 400,1136 L 1624,1136 1624,968 C 1469,856 1299,752 1112,656 L 1112,584 1912,584 1912,424 1112,424 1112,-32 C 1112,-139 1040,-192 896,-192 L 552,-160 528,-8 856,-40 C 904,-40 928,-29 928,-8 L 928,424 136,424 136,584 928,584 928,744 1360,984 400,984 400,1136 Z"/>
|
||||
</font>
|
||||
</defs>
|
||||
<defs class="EmbeddedBulletChars">
|
||||
<g id="bullet-char-template-57356" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-57354" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-10146" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-10132" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-10007" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-10004" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-9679" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-8226" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-8211" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z"/>
|
||||
</g>
|
||||
<g id="bullet-char-template-61548" transform="scale(0.00048828125,-0.00048828125)">
|
||||
<path d="M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<g class="Page">
|
||||
<g class="Group">
|
||||
<g class="com.sun.star.drawing.CustomShape">
|
||||
<g id="id3">
|
||||
<rect class="BoundingBox" stroke="none" fill="none" x="5750" y="13440" width="4501" height="4251"/>
|
||||
<path fill="rgb(139,30,63)" stroke="none" d="M 8000,17690 L 5750,17690 5750,13440 10250,13440 10250,17690 8000,17690 Z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g class="com.sun.star.drawing.CustomShape">
|
||||
<g id="id4">
|
||||
<rect class="BoundingBox" stroke="none" fill="none" x="10250" y="13440" width="4501" height="4251"/>
|
||||
<path fill="rgb(35,57,91)" stroke="none" d="M 12500,17690 L 10250,17690 10250,13440 14750,13440 14750,17690 12500,17690 Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g class="com.sun.star.drawing.CustomShape">
|
||||
<g id="id5">
|
||||
<rect class="BoundingBox" stroke="none" fill="none" x="5750" y="13380" width="9001" height="4371"/>
|
||||
<text class="SVGTextShape"><tspan class="TextParagraph" font-family="Droid Sans Fallback, sans-serif" font-size="2117px" font-weight="400"><tspan class="TextPosition" x="6017" y="16387"><tspan fill="rgb(255,255,255)" stroke="none" style="white-space: pre">数字实训</tspan></tspan></tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.4 KiB |
|
@ -0,0 +1,43 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { preferencesItem } from "@web/webclient/user_menu/user_menu_items";
|
||||
import {browser} from "@web/core/browser/browser";
|
||||
|
||||
function documentationItem1(env) {
|
||||
const documentationURL = "https://www.newbizpaas.cn/documentation";
|
||||
return {
|
||||
type: "item",
|
||||
id: "documentation1",
|
||||
description: env._t("Documentation"),
|
||||
href: documentationURL,
|
||||
callback: () => {
|
||||
browser.open(documentationURL, "_blank");
|
||||
},
|
||||
sequence: 10,
|
||||
};
|
||||
}
|
||||
|
||||
function supportItem1(env) {
|
||||
const supportURL = "https://www.newbizpaas.cn/forum/1";
|
||||
return {
|
||||
type: "item",
|
||||
id: "support1",
|
||||
description: env._t("Support"),
|
||||
href: supportURL,
|
||||
callback: () => {
|
||||
browser.open(supportURL, "_blank");
|
||||
},
|
||||
sequence: 20,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
registry.category("user_menuitems").remove('documentation', { force: true })
|
||||
registry.category("user_menuitems").add('documentation1', documentationItem1)
|
||||
|
||||
registry.category("user_menuitems").remove('support', { force: true })
|
||||
registry.category("user_menuitems").add('support1', supportItem1)
|
||||
|
||||
|
||||
registry.category("user_menuitems").remove('odoo_account', { force: true })
|
|
@ -0,0 +1,15 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import { WebClient } from "@web/webclient/webclient";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
var core = require('web.core');
|
||||
var _lt = core._lt;
|
||||
|
||||
patch(WebClient.prototype, "Web Window Title", {
|
||||
setup() {
|
||||
const title = _lt("Newbiz");
|
||||
this._super();
|
||||
this.title.setParts({ zopenerp: title });
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue