This commit is contained in:
Ivan Office
2024-10-09 19:49:07 +08:00
parent 275b730654
commit 8fc5f8d636
3 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ from odoo.tools import pycompat
from odoo.tests import common
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:
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':
# todo: 创建discuss.channel时如果用root用户会报错
uid = 2
env = api.Environment(cr, uid, {})
if file_type == '.csv':
file_type = 'text/csv'
elif file_type in ['.xls', '.xlsx']:

View File

@@ -23,7 +23,7 @@
{
'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',
'category': 'Extra Tools',
'website': 'https://www.odooai.cn',

View File

@@ -8,6 +8,7 @@ import { patch } from "@web/core/utils/patch";
import { browser } from "@web/core/browser/browser";
import { registry } from "@web/core/registry";
import { session } from "@web/session";
import { user } from "@web/core/user";
import { useService } from "@web/core/utils/hooks";
const userMenuRegistry = registry.category("user_menuitems");
@@ -32,7 +33,7 @@ patch(UserMenu.prototype, {
description: _t("Preferences"),
callback: async function () {
const actionDescription = await env.services.orm.call("res.users", "action_get");
actionDescription.res_id = session.user_id[0];
actionDescription.res_id = user.userId;
try {
let m = document.getElementsByClassName("o_sidebar_close");
if (m) {