你是想所有视图上的Save都改成Find, 还是只改某一个视图上的,还有你odoo哪个版本的
hui
-
界面上的"Save" 按钮我想改为"Find",怎样实现?初学ODOO,请各位大神指教 -
Element odoo has extra content: record, line 3你把视图跟菜单分开写了两个文件,在配置文件中他们的先后顺序是怎么样的
-
新手求助,想问下怎么修改才能恢复正常@peishaosong
是不是用这个字段做条件的时候,没有提前先把这个字段给展示处理 -
请教,销售订单保存时出现这个提示是怎么回事?可能是数据问题
-
[已解决]restore odoo12数据库报错@Joshua
谢谢,找到问题了,记录下.的确是postgres的版本问题导致的.本地pg是9.5.19,恢复的数据是服务器上的pg10.12的数据,所以恢复后登录报错如上.
ps:卸载pg旧版本安装新版本的时候,注意要卸载干净,否则会安装不上的.
-
[已解决]restore odoo12数据库报错@Joshua
为什么会想到是版本问题导致的,是因为这些错误的都是base模块的基础表吗 -
[已解决]restore odoo12数据库报错报错信息如下,不知道是否跟log里面列的其他模块有关?
2020-05-09 06:43:55,164 5636 INFO ? odoo.http: HTTP Configuring static files 2020-05-09 06:43:55,166 5636 DEBUG ? odoo.http: HTTP sessions stored in: /home/hui/data_file/odoo12/sessions 2020-05-09 06:43:55,176 5636 DEBUG 89_v12 odoo.modules.registry: Multiprocess load registry signaling: [Registry: 20] [Cache: 52] 2020-05-09 06:43:55,180 5636 INFO 89_v12 odoo.modules.loading: loading 1 modules... 2020-05-09 06:43:55,181 5636 DEBUG 89_v12 odoo.modules.loading: loading module base (1/1) 2020-05-09 06:43:55,197 5636 INFO 89_v12 odoo.modules.loading: 1 modules loaded in 0.02s, 0 queries 2020-05-09 06:43:55,203 5636 DEBUG 89_v12 odoo.modules.module: module muk_utils: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,203 5636 WARNING 89_v12 odoo.modules.graph: module muk_utils: not installable, skipped 2020-05-09 06:43:55,205 5636 DEBUG 89_v12 odoo.modules.module: module sms: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,205 5636 WARNING 89_v12 odoo.modules.graph: module sms: not installable, skipped 2020-05-09 06:43:55,207 5636 DEBUG 89_v12 odoo.modules.module: module muk_autovacuum: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,207 5636 WARNING 89_v12 odoo.modules.graph: module muk_autovacuum: not installable, skipped 2020-05-09 06:43:55,208 5636 DEBUG 89_v12 odoo.modules.module: module sale_order_aprobar: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,208 5636 WARNING 89_v12 odoo.modules.graph: module sale_order_aprobar: not installable, skipped 2020-05-09 06:43:55,211 5636 DEBUG 89_v12 odoo.modules.module: module auto_backup: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,211 5636 WARNING 89_v12 odoo.modules.graph: module auto_backup: not installable, skipped 2020-05-09 06:43:55,215 5636 DEBUG 89_v12 odoo.modules.module: module xx_muk_be_theme_collapse: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,215 5636 WARNING 89_v12 odoo.modules.graph: module xx_muk_be_theme_collapse: not installable, skipped 2020-05-09 06:43:55,220 5636 DEBUG 89_v12 odoo.modules.module: module muk_web_theme: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,220 5636 WARNING 89_v12 odoo.modules.graph: module muk_web_theme: not installable, skipped 2020-05-09 06:43:55,221 5636 DEBUG 89_v12 odoo.modules.module: module muk_web_utils: no manifest file found ('__manifest__.py', '__openerp__.py') 2020-05-09 06:43:55,221 5636 WARNING 89_v12 odoo.modules.graph: module muk_web_utils: not installable, skipped 2020-05-09 06:43:55,224 5636 DEBUG 89_v12 odoo.modules.loading: Updating graph with 47 more modules 2020-05-09 06:43:55,224 5636 INFO 89_v12 odoo.modules.loading: loading 40 modules... 2020-05-09 06:43:55,224 5636 DEBUG 89_v12 odoo.modules.loading: loading module decimal_precision (2/40) 2020-05-09 06:43:55,227 5636 DEBUG 89_v12 odoo.modules.loading: loading module uom (3/40) 2020-05-09 06:43:55,230 5636 DEBUG 89_v12 odoo.modules.loading: loading module web (4/40) 2020-05-09 06:43:55,238 5636 DEBUG 89_v12 odoo.modules.loading: loading module base_import (5/40) 2020-05-09 06:43:55,262 5636 DEBUG 89_v12 odoo.modules.loading: loading module base_setup (6/40) 2020-05-09 06:43:55,265 5636 DEBUG 89_v12 odoo.modules.loading: loading module bus (7/40) 2020-05-09 06:43:55,269 5636 DEBUG 89_v12 odoo.modules.loading: loading module http_routing (8/40) 2020-05-09 06:43:55,274 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_diagram (9/40) 2020-05-09 06:43:55,275 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_editor (10/40) 2020-05-09 06:43:55,288 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_kanban_gauge (11/40) 2020-05-09 06:43:55,289 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_settings_dashboard (12/40) 2020-05-09 06:43:55,292 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_tour (13/40) 2020-05-09 06:43:55,295 5636 DEBUG 89_v12 odoo.modules.loading: loading module iap (14/40) 2020-05-09 06:43:55,299 5636 DEBUG 89_v12 odoo.modules.loading: loading module mail (15/40) 2020-05-09 06:43:55,352 5636 DEBUG 89_v12 odoo.modules.loading: loading module web_unsplash (16/40) 2020-05-09 06:43:55,360 5636 DEBUG 89_v12 odoo.modules.loading: loading module analytic (17/40) 2020-05-09 06:43:55,364 5636 DEBUG 89_v12 odoo.modules.loading: loading module auth_signup (18/40) 2020-05-09 06:43:55,377 5636 DEBUG 89_v12 odoo.modules.loading: loading module fetchmail (19/40) 2020-05-09 06:43:55,386 5636 DEBUG 89_v12 odoo.modules.loading: loading module mail_bot (20/40) 2020-05-09 06:43:55,395 5636 DEBUG 89_v12 odoo.modules.loading: loading module partner_autocomplete (21/40) 2020-05-09 06:43:55,401 5636 DEBUG 89_v12 odoo.modules.loading: loading module portal (22/40) 2020-05-09 06:43:55,417 5636 DEBUG 89_v12 odoo.modules.loading: loading module product (23/40) 2020-05-09 06:43:55,438 5636 DEBUG 89_v12 odoo.modules.loading: loading module sales_team (24/40) 2020-05-09 06:43:55,443 5636 DEBUG 89_v12 odoo.modules.loading: loading module snailmail (25/40) 2020-05-09 06:43:55,449 5636 DEBUG 89_v12 odoo.modules.loading: loading module digest (26/40) 2020-05-09 06:43:55,456 5636 DEBUG 89_v12 odoo.modules.loading: loading module account (27/40) 2020-05-09 06:43:55,605 5636 DEBUG 89_v12 odoo.modules.loading: loading module account_bank_statement_import (28/40) 2020-05-09 06:43:55,610 5636 DEBUG 89_v12 odoo.modules.loading: loading module account_cancel (29/40) 2020-05-09 06:43:55,612 5636 DEBUG 89_v12 odoo.modules.loading: loading module account_facturx (30/40) 2020-05-09 06:43:55,614 5636 DEBUG 89_v12 odoo.modules.loading: loading module l10n_multilang (31/40) 2020-05-09 06:43:55,618 5636 DEBUG 89_v12 odoo.modules.loading: loading module membership (32/40) 2020-05-09 06:43:55,629 5636 DEBUG 89_v12 odoo.modules.loading: loading module payment (33/40) 2020-05-09 06:43:55,631 5636 DEBUG 89_v12 odoo.modules.loading: loading module snailmail_account (34/40) 2020-05-09 06:43:55,644 5636 DEBUG 89_v12 odoo.modules.loading: loading module l10n_cn (35/40) 2020-05-09 06:43:55,646 5636 DEBUG 89_v12 odoo.modules.loading: loading module member_lee (36/40) 2020-05-09 06:43:55,648 5636 DEBUG 89_v12 odoo.modules.loading: loading module payment_transfer (37/40) 2020-05-09 06:43:55,651 5636 DEBUG 89_v12 odoo.modules.loading: loading module sale (38/40) 2020-05-09 06:43:55,676 5636 DEBUG 89_v12 odoo.modules.loading: loading module l10n_cn_small_business (39/40) 2020-05-09 06:43:55,679 5636 DEBUG 89_v12 odoo.modules.loading: loading module sale_management (40/40) 2020-05-09 06:43:55,686 5636 INFO 89_v12 odoo.modules.loading: 40 modules loaded in 0.46s, 0 queries 2020-05-09 06:43:56,245 5636 INFO 89_v12 odoo.modules.loading: Modules loaded. 2020-05-09 06:43:56,250 5636 DEBUG 89_v12 odoo.modules.registry: Multiprocess signaling check: [Registry - 20 -> 20] [Cache - 52 -> 52] 2020-05-09 06:43:56,250 5636 INFO 89_v12 odoo.addons.base.models.ir_http: Generating routing map 2020-05-09 06:43:56,298 5636 INFO 89_v12 werkzeug: 127.0.0.1 - - [09/May/2020 06:43:56] "GET / HTTP/1.1" 200 - 24 0.020 1.113 2020-05-09 06:43:56,333 5636 DEBUG 89_v12 odoo.modules.registry: Multiprocess signaling check: [Registry - 20 -> 20] [Cache - 52 -> 52] 2020-05-09 06:43:56,336 5636 INFO 89_v12 werkzeug: 127.0.0.1 - - [09/May/2020 06:43:56] "GET /web HTTP/1.1" 303 - 1 0.000 0.004 2020-05-09 06:43:56,345 5636 DEBUG 89_v12 odoo.modules.registry: Multiprocess signaling check: [Registry - 20 -> 20] [Cache - 52 -> 52] 2020-05-09 06:43:56,621 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,622 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,627 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,644 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,650 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,652 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,654 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,663 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,666 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,670 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,861 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,862 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,872 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,874 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:56,881 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,293 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,295 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,296 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,298 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,673 5636 WARNING 89_v12 odoo.modules.module: module muk_web_theme: module not found 2020-05-09 06:43:57,700 5636 ERROR 89_v12 odoo.sql_db: bad query: b'INSERT INTO "ir_attachment" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "company_id", "datas_fname", "mimetype", "name", "public", "res_id", "res_model", "type") VALUES (nextval(\'ir_attachment_id_seq\'), 1, (now() at time zone \'UTC\'), 1, (now() at time zone \'UTC\'), true, 1, \'web.assets_common.js\', \'application/javascript\', \'/web/content/js\', true, 0, \'ir.ui.view\', \'binary\') RETURNING id' ERROR: relation "ir_attachment_id_seq" does not exist LINE 1: ...", "res_id", "res_model", "type") VALUES (nextval('ir_attach... ^ 2020-05-09 06:43:57,700 5636 ERROR 89_v12 odoo.sql_db: bad query: b'SELECT "ir_ui_view".id FROM "ir_ui_view" WHERE (("ir_ui_view"."active" = true) AND ("ir_ui_view"."key" = \'web.login_layout\')) ORDER BY "ir_ui_view"."priority" ,"ir_ui_view"."name" ,"ir_ui_view"."id" limit 1' ERROR: current transaction is aborted, commands ignored until end of transaction block 2020-05-09 06:43:57,782 5636 INFO 89_v12 werkzeug: 127.0.0.1 - - [09/May/2020 06:43:57] "GET /web/login HTTP/1.1" 500 - 202 0.132 1.307 2020-05-09 06:43:57,796 5636 ERROR 89_v12 werkzeug: Error on request: Traceback (most recent call last): File "/home/hui/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 193, in run_wsgi execute(self.server.app) File "/home/hui/.local/lib/python3.5/site-packages/werkzeug/serving.py", line 181, in execute application_iter = app(environ, start_response) File "/home/hui/odoo-dev/odoo12/odoo/odoo/service/server.py", line 350, in app return self.app(e, s) File "/home/hui/odoo-dev/odoo12/odoo/odoo/service/wsgi_server.py", line 128, in application return application_unproxied(environ, start_response) File "/home/hui/odoo-dev/odoo12/odoo/odoo/service/wsgi_server.py", line 117, in application_unproxied result = odoo.http.root(environ, start_response) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 1318, in __call__ return self.dispatch(environ, start_response) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 1291, in __call__ return self.app(environ, start_wrapped) File "/home/hui/.local/lib/python3.5/site-packages/werkzeug/wsgi.py", line 599, in __call__ return self.app(environ, start_response) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 1486, in dispatch result = ir_http._dispatch() File "/home/hui/odoo-dev/odoo12/odoo/addons/auth_signup/models/ir_http.py", line 19, in _dispatch return super(Http, cls)._dispatch() File "/home/hui/odoo-dev/odoo12/odoo/addons/web_editor/models/ir_http.py", line 22, in _dispatch return super(IrHttp, cls)._dispatch() File "/home/hui/odoo-dev/odoo12/odoo/addons/http_routing/models/ir_http.py", line 394, in _dispatch result = super(IrHttp, cls)._dispatch() File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_http.py", line 207, in _dispatch return cls._handle_exception(e) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_http.py", line 177, in _handle_exception return request._handle_exception(exception) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 774, in _handle_exception return super(HttpRequest, self)._handle_exception(exception) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/hui/odoo-dev/odoo12/odoo/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_http.py", line 203, in _dispatch result = request.dispatch() File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 833, in dispatch r = self._call_function(**self.params) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 340, in checked_call result.flatten() File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 1268, in flatten self.response.append(self.render()) File "/home/hui/odoo-dev/odoo12/odoo/odoo/http.py", line 1261, in render return env["ir.ui.view"].render_template(self.template, self.qcontext) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 1279, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "/home/hui/odoo-dev/odoo12/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 1288, in render return self.env[engine].render(self.id, qcontext) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_qweb.py", line 59, in render result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 272, in render self.compile(template, options)(self, body.append, values or {}) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 346, in _compiled_fn raise e File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_173_5 File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 349, in _compiled_fn element, document = self.get_template(template, options) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 374, in get_template raise QWebException("load could not load template", name=template) odoo.addons.base.models.qweb.QWebException: None Traceback (most recent call last): File "/home/hui/odoo-dev/odoo12/odoo/odoo/tools/cache.py", line 88, in lookup r = d[key] File "/home/hui/odoo-dev/odoo12/odoo/odoo/tools/func.py", line 69, in wrapper return func(self, *args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/tools/lru.py", line 44, in __getitem__ a = self.d[obj].me KeyError: ('ir.qweb', <function IrQWeb._get_asset_nodes at 0x7f7eb3ddc048>, 'web.assets_common', 'en_US', False, True, False, False, (None,)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_web_login_layout_11 File "<template>", line 2, in body_call_content_10 File "<template>", line 4, in set_8 File "<decorator-gen-56>", line 2, in _get_asset_nodes File "/home/hui/odoo-dev/odoo12/odoo/odoo/tools/cache.py", line 93, in lookup value = d[key] = self.method(*args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_qweb.py", line 308, in _get_asset_nodes return remains + asset.to_node(css=css, js=js, debug=debug, async_load=async_load) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/assetsbundle.py", line 174, in to_node ["src", self.js().url], File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/assetsbundle.py", line 327, in js return self.save_attachment('js', content) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/assetsbundle.py", line 300, in save_attachment attachment = ira.sudo().create(values) File "<decorator-gen-41>", line 2, in create File "/home/hui/odoo-dev/odoo12/odoo/odoo/api.py", line 451, in _model_create_multi return create(self, [arg]) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_attachment.py", line 507, in create return super(IrAttachment, self).create(vals_list) File "<decorator-gen-3>", line 2, in create File "/home/hui/odoo-dev/odoo12/odoo/odoo/api.py", line 452, in _model_create_multi return create(self, arg) File "/home/hui/odoo-dev/odoo12/odoo/odoo/models.py", line 3514, in create records = self._create(data_list) File "/home/hui/odoo-dev/odoo12/odoo/odoo/models.py", line 3614, in _create cr.execute(query, params) File "/home/hui/odoo-dev/odoo12/odoo/odoo/sql_db.py", line 148, in wrapper return f(self, *args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/sql_db.py", line 225, in execute res = self._obj.execute(query, params) psycopg2.ProgrammingError: relation "ir_attachment_id_seq" does not exist LINE 1: ...", "res_id", "res_model", "type") VALUES (nextval('ir_attach... ^ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/qweb.py", line 370, in get_template document = options.get('load', self.load)(template, options) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_qweb.py", line 122, in load template = env['ir.ui.view'].read_template(name) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 1170, in read_template return self._read_template(self.get_view_id(xml_id)) File "/home/hui/odoo-dev/odoo12/odoo/odoo/addons/base/models/ir_ui_view.py", line 1185, in get_view_id view = self.search([('key', '=', template)], limit=1) File "/home/hui/odoo-dev/odoo12/odoo/odoo/models.py", line 1561, in search res = self._search(args, offset=offset, limit=limit, order=order, count=count) File "/home/hui/odoo-dev/odoo12/odoo/odoo/models.py", line 4071, in _search self._cr.execute(query_str, where_clause_params) File "/home/hui/odoo-dev/odoo12/odoo/odoo/sql_db.py", line 148, in wrapper return f(self, *args, **kwargs) File "/home/hui/odoo-dev/odoo12/odoo/odoo/sql_db.py", line 225, in execute res = self._obj.execute(query, params) psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block load could not load template Template: web.login_layout - - -
-
Odoo的异步队列神器-queue_job@digitalsatori
嗯嗯,好的,谢谢,非常感谢. -
Odoo的异步队列神器-queue_job@digitalsatori
实验系统自带导入的时候启用异步导入,成功导入.但是速度没有快多少,什么原因?配置文件修改了如下的:
workers = 4 server_wide_modules = web,queue_job channels = root:1
日志可以看到
queue.job
启动了,2020-03-19 02:16:26,417 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: starting 2020-03-19 02:16:26,418 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: initializing database connections 2020-03-19 02:16:26,513 6384 DEBUG ? odoo.addons.queue_job.jobrunner.runner: queue_job is not installed for db ccp_v11 2020-03-19 02:16:26,542 6384 DEBUG ? odoo.addons.queue_job.jobrunner.runner: queue_job is not installed for db ll_v12 2020-03-19 02:16:26,653 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db queue2_v11 2020-03-19 02:16:26,728 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db queue_v11 2020-03-19 02:16:26,790 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db test_v11 2020-03-19 02:16:26,790 6384 INFO ? odoo.addons.queue_job.jobrunner.runner: database connections ready 2020-03-19 02:16:26,790 6384 DEBUG ? odoo.addons.queue_job.jobrunner.runner: select() timeout: 60.00 sec
-
Odoo 错误:Exception("bus.Bus unavailable") 是什么鬼?@digitalsatori 我就本地测试的话,不用nginx,有办法处理掉这个错误吗?
-
Odoo的异步队列神器-queue_job@digitalsatori
非常感谢,现在通过官方的系统导入使用异步队列可以啦.我还有几个问题想再确认下:
1.worker
设置多少合适
2.测试的时候发现,我用6500条数据(只有两个导入字段)测试,worker=2
,系统导入的时候选择了后台导入,还使用了30min左右.速度没有提高多少
3.在odoo启动后创建的.(官方文档有,如果创建一个新数据库或在已有数据库上安装了job
在不做任何操作的情况下,不会执行job,即使重写requeue
也没效果,必须关闭重启odoo
服务才会很快执行job
queue_job
,必须重启才会生效.)
3.如果自定义导入方法的话,就需要自己分割文件,生成不同的job
了吧
4.多个channel
和runner
是怎么设置的,哪里设置的,什么作用 -
Odoo的异步队列神器-queue_job@digitalsatori 从log看,有WorkCorn的日志,但是报错一直是这个错误在循环,走不下去.
2020-03-12 02:18:43,989 6106 INFO aa_v11 werkzeug: 127.0.0.1 - - [12/Mar/2020 02:18:43] "POST /longpolling/poll HTTP/1.1" 200 - 2020-03-12 02:18:50,691 6111 DEBUG ? odoo.service.server: WorkerCron (6111) polling for jobs 2020-03-12 02:18:50,708 6111 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=aa_v11' 2020-03-12 02:18:50,708 6111 DEBUG ? odoo.service.server: WorkerCron (6111) aa_v11 time:0.005s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:50,709 6111 DEBUG ? odoo.service.server: WorkerCron (6111) polling for jobs 2020-03-12 02:18:50,720 6111 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=mm_v11' 2020-03-12 02:18:50,721 6111 DEBUG ? odoo.service.server: WorkerCron (6111) mm_v11 time:0.007s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:50,721 6111 DEBUG ? odoo.service.server: WorkerCron (6111) polling for jobs 2020-03-12 02:18:50,733 6111 WARNING ? odoo.addons.base.ir.ir_cron: Skipping database test10_v10 as its base version is not 11.0.1.3. 2020-03-12 02:18:50,734 6111 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=test10_v10' 2020-03-12 02:18:50,734 6111 DEBUG ? odoo.service.server: WorkerCron (6111) test10_v10 time:0.007s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:50,735 6111 DEBUG ? odoo.service.server: WorkerCron (6111) polling for jobs 2020-03-12 02:18:50,748 6111 WARNING ? odoo.addons.base.ir.ir_cron: Skipping database 2e_v8 as its base version is not 11.0.1.3. 2020-03-12 02:18:50,748 6111 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=2e_v8' 2020-03-12 02:18:50,749 6111 DEBUG ? odoo.service.server: WorkerCron (6111) 2e_v8 time:0.007s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:56,759 6113 DEBUG ? odoo.service.server: WorkerCron (6113) polling for jobs 2020-03-12 02:18:56,774 6113 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=aa_v11' 2020-03-12 02:18:56,775 6113 DEBUG ? odoo.service.server: WorkerCron (6113) aa_v11 time:0.007s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:56,775 6113 DEBUG ? odoo.service.server: WorkerCron (6113) polling for jobs 2020-03-12 02:18:56,788 6113 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=mm_v11' 2020-03-12 02:18:56,788 6113 DEBUG ? odoo.service.server: WorkerCron (6113) mm_v11 time:0.008s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:56,789 6113 DEBUG ? odoo.service.server: WorkerCron (6113) polling for jobs 2020-03-12 02:18:56,799 6113 WARNING ? odoo.addons.base.ir.ir_cron: Skipping database test10_v10 as its base version is not 11.0.1.3. 2020-03-12 02:18:56,799 6113 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=test10_v10' 2020-03-12 02:18:56,799 6113 DEBUG ? odoo.service.server: WorkerCron (6113) test10_v10 time:0.005s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:56,800 6113 DEBUG ? odoo.service.server: WorkerCron (6113) polling for jobs 2020-03-12 02:18:56,810 6113 WARNING ? odoo.addons.base.ir.ir_cron: Skipping database 2e_v8 as its base version is not 11.0.1.3. 2020-03-12 02:18:56,810 6113 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'sslmode=prefer user=hui dbname=2e_v8' 2020-03-12 02:18:56,811 6113 DEBUG ? odoo.service.server: WorkerCron (6113) 2e_v8 time:0.006s mem: 330508.0k -> 330508.0k (diff: 0.0k) 2020-03-12 02:18:58,000 6107 DEBUG aa_v11 odoo.modules.registry: Multiprocess signaling check: [Registry - 14 -> 14] [Cache - 44 -> 44] 2020-03-12 02:18:58,003 6107 ERROR aa_v11 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 653, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 695, in dispatch result = self._call_function(**self.params) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 939, in __call__ return self.method(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 517, in response_wrap response = f(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/addons/bus/controllers/main.py", line 37, in poll raise Exception("bus.Bus unavailable") Exception: bus.Bus unavailable 2020-03-12 02:18:58,006 6107 INFO aa_v11 werkzeug: 127.0.0.1 - - [12/Mar/2020 02:18:58] "POST /longpolling/poll HTTP/1.1" 200 - 2020-03-12 02:18:59,679 6106 INFO ? werkzeug: 127.0.0.1 - - [12/Mar/2020 02:18:59] "GET /web/static/src/xml/dialog.xml?debug=1583979539675 HTTP/1.1" 200 - 2020-03-12 02:19:21,842 6106 DEBUG aa_v11 odoo.modules.registry: Multiprocess signaling check: [Registry - 14 -> 14] [Cache - 44 -> 44] 2020-03-12 02:19:21,844 6106 ERROR aa_v11 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 653, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 695, in dispatch result = self._call_function(**self.params) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 939, in __call__ return self.method(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 517, in response_wrap response = f(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/addons/bus/controllers/main.py", line 37, in poll raise Exception("bus.Bus unavailable") Exception: bus.Bus unavailable
-
Odoo的异步队列神器-queue_job@digitalsatori 估计跟如下报错有关,但是我根据报错位置打印出来
dispatch
是None
.源码中这个值应该是这么来的
odoo.multi_process or odoo.evented
.这个是跟设置还是什么有关还是其他,指点下?
2020-03-11 09:41:10,840 27721 DEBUG aa_v11 odoo.modules.registry: Multiprocess signaling check: [Registry - 13 -> 13] [Cache - 33 -> 33] 2020-03-11 09:41:10,842 27721 ERROR aa_v11 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 653, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 695, in dispatch result = self._call_function(**self.params) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 939, in __call__ return self.method(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 517, in response_wrap response = f(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/addons/bus/controllers/main.py", line 40, in poll raise Exception("bus.Bus unavailable") Exception: bus.Bus unavailable
-
Odoo的异步队列神器-queue_job@digitalsatori 我的workers是2
-
Odoo的异步队列神器-queue_job@digitalsatori 我根据文档用
@job
测试了,只是在Jobs里面创建了一条记录,状态始终是Pending
,怎么知道什么时候执行,我把priority
设置最高1,eta
设置成现在的时间,但是始终不执行?怎么回事呢? -
Odoo的异步队列神器-queue_job@digitalsatori 在 Odoo的异步队列神器-queue_job 中说:
button_import
我这样测试的:
表格的数据处理分了专门处理表头的,处理表格数据的,然后在导入按钮对应的方法中进行调用.但是报错AttributeError: 'import.wizard' object has no attribute 'with_delay'
.请教下什么问题?代码如下:
from odoo import models, fields, api from odoo.addons.queue_job.job import job class ImportWizardProduct(models.TransientModel): _name = 'import.wizard' _description = "Import Wizard" # wizard导入按钮的方法 def button_import(self): title_index = self.handle_title_index() ... import_data = self.with_delay().import_product_templates() ... # 处理表格表头的 def handle_title_index(self): ... # 处理表格中数据的 @job def import_product_templates(self): ...
-
Odoo的异步队列神器-queue_job我想批量导入product.template的数据,通过wizard导入excel,所有导入的数据处理都在wizard里面,这样
@job
和with_delay()
的调用都在wizard里面,怎么使用? -
动作创建可能出错了,odoo server Error -
odoo12安装完成后,输出的PDF无内容,用阅读器打开提示文件损坏,wkhtmltopdf已安装,请教是什么问题@Cyril
<t t-call="web.external_layout">
你加上一个页眉试试 -
base.automation与ir.corn 有啥区别这两个都能用作定时器,有什么不同?
有时候base.automation
在Setting中用视图创建的也不会触发的?