mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 11:12:05 +02:00
18.0 vanilla
This commit is contained in:
parent
d72e748793
commit
0a7ae8db93
337 changed files with 399651 additions and 232598 deletions
|
|
@ -8,6 +8,7 @@ import threading
|
|||
from pathlib import Path
|
||||
|
||||
import odoo
|
||||
from odoo.modules.registry import Registry
|
||||
from odoo.tools import config
|
||||
from . import Command
|
||||
|
||||
|
|
@ -56,7 +57,7 @@ class Shell(Command):
|
|||
|
||||
def init(self, args):
|
||||
config.parser.prog = f'{Path(sys.argv[0]).name} {self.name}'
|
||||
config.parse_config(args)
|
||||
config.parse_config(args, setup_logging=True)
|
||||
odoo.cli.server.report_configuration()
|
||||
odoo.service.server.start(preload=[], stop=True)
|
||||
signal.signal(signal.SIGINT, raise_keyboard_interrupt)
|
||||
|
|
@ -108,7 +109,7 @@ class Shell(Command):
|
|||
}
|
||||
if dbname:
|
||||
threading.current_thread().dbname = dbname
|
||||
registry = odoo.registry(dbname)
|
||||
registry = Registry(dbname)
|
||||
with registry.cursor() as cr:
|
||||
uid = odoo.SUPERUSER_ID
|
||||
ctx = odoo.api.Environment(cr, uid, {})['res.users'].context_get()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue