mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix bug
This commit is contained in:
@@ -10,7 +10,7 @@ from odoo.tools import pycompat
|
|||||||
from odoo.tests import common
|
from odoo.tests import common
|
||||||
ADMIN_USER_ID = common.ADMIN_USER_ID
|
ADMIN_USER_ID = common.ADMIN_USER_ID
|
||||||
|
|
||||||
def app_quick_import(cr, content_path, sep=None):
|
def app_quick_import(env, content_path, sep=None):
|
||||||
if not sep:
|
if not sep:
|
||||||
sep = '/'
|
sep = '/'
|
||||||
dir_split = content_path.split(sep)
|
dir_split = content_path.split(sep)
|
||||||
@@ -24,7 +24,6 @@ def app_quick_import(cr, content_path, sep=None):
|
|||||||
if model_name == 'discuss.channel':
|
if model_name == 'discuss.channel':
|
||||||
# todo: 创建discuss.channel时,如果用root用户会报错
|
# todo: 创建discuss.channel时,如果用root用户会报错
|
||||||
uid = 2
|
uid = 2
|
||||||
env = api.Environment(cr, uid, {})
|
|
||||||
if file_type == '.csv':
|
if file_type == '.csv':
|
||||||
file_type = 'text/csv'
|
file_type = 'text/csv'
|
||||||
elif file_type in ['.xls', '.xlsx']:
|
elif file_type in ['.xls', '.xlsx']:
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'odoo18 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data,Development Enhance',
|
'name': 'odoo18 Tweak,Ai Employee,Boost,Customize All in One. Customize,UI,Boost,Security,Data,Development Enhance',
|
||||||
'version': '24.10.08',
|
'version': '24.10.09',
|
||||||
'author': 'odooai.cn',
|
'author': 'odooai.cn',
|
||||||
'category': 'Extra Tools',
|
'category': 'Extra Tools',
|
||||||
'website': 'https://www.odooai.cn',
|
'website': 'https://www.odooai.cn',
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { patch } from "@web/core/utils/patch";
|
|||||||
import { browser } from "@web/core/browser/browser";
|
import { browser } from "@web/core/browser/browser";
|
||||||
import { registry } from "@web/core/registry";
|
import { registry } from "@web/core/registry";
|
||||||
import { session } from "@web/session";
|
import { session } from "@web/session";
|
||||||
|
import { user } from "@web/core/user";
|
||||||
import { useService } from "@web/core/utils/hooks";
|
import { useService } from "@web/core/utils/hooks";
|
||||||
const userMenuRegistry = registry.category("user_menuitems");
|
const userMenuRegistry = registry.category("user_menuitems");
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ patch(UserMenu.prototype, {
|
|||||||
description: _t("Preferences"),
|
description: _t("Preferences"),
|
||||||
callback: async function () {
|
callback: async function () {
|
||||||
const actionDescription = await env.services.orm.call("res.users", "action_get");
|
const actionDescription = await env.services.orm.call("res.users", "action_get");
|
||||||
actionDescription.res_id = session.user_id[0];
|
actionDescription.res_id = user.userId;
|
||||||
try {
|
try {
|
||||||
let m = document.getElementsByClassName("o_sidebar_close");
|
let m = document.getElementsByClassName("o_sidebar_close");
|
||||||
if (m) {
|
if (m) {
|
||||||
|
|||||||
Reference in New Issue
Block a user