Giter VIP home page Giter VIP logo

odooterminal's Introduction

odooterminal's People

Contributors

mart-e avatar pre-commit-ci[bot] avatar tardo avatar yajo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odooterminal's Issues

New generator for int sequence?

When you have to write or unlink a bunch of records, it'd be helpful.

Instead of writing unlink ir.ui.view 2424,2484,2485,2486,2487, be able to write something like unlink ir.ui.view 2424,$INTSEQ[2484,2487]

What do you think?

[BUG] TypeError: keys must be str, int, float, bool or None, not frozendict

Basic Info. (please complete the following information):

  • Odoo version: 16.0
  • Browser: chrome
  • Command: read -m account.move.line -i 1 -f *

Describe the bug
I test those on Odoo runbot

On Odoo 15.0, 16.0 Work like a charm!
read -m res.partner -i 1 -f *

Some modules on Odoo 16.0 do not work, such as
read -m account.move.line -i 1 -f *

But that is no problem on Odoo 15.0

Expected behavior
Read all fields of the record

Store ids of search operation, for massive writes

I need to do a mass write operation

  1. search my.model id [['some','=','domain']] returns 100 ids.
  2. I'd need something like write $last_search_ids "{'field': 'Value'}"

I guess it'd be great if there's a way to save that variable explicitly. Something like:

last_search_ids = search my.model id [['some','=','domain']]

But the result is a list of dicts, so I'm not sure on how to operate over it to convert it to comma-separated ids like write wants... ๐Ÿค”

[BUG] Init commands

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 14
  • Browser: chrome
  • Command: print -m 'This is a example'

Describe the bug
Testing the "Init Command". When the odoo tab is started or refreshed, it emits the error, coming from the plugin.

Expected behavior
I expected the message to be printed in the plugin console or in the browser queue

Screenshots
image

Additional context
Null

[BUG] calling `write` doesn't execute a write

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 15.0
  • Browser: firefox
  • Command: write hr.attendance 1446 'check_out="2022-10-25 12:50"'

Describe the bug
With this command I was able to fix my forgotten check in/out times. But since v9, it seems that write does not call the server.

Expected behavior
Execute write operation.

Additional context
Used to work fine. I was able to do the same with recordset and commit though.

New command `ref`

It would be nice if we had a ref example_module.example_xmlid command that searches among ir.model.data and returns the model + res_id combination that matches that/those ref/s.

Batch unlink

I want to mass unlink some records after searching, and I found here already have some great syntax.

  1. Search and return the recordsets
  2. Subcommands to use the result in a new command call

So it would be great if I can use the below syntax to unlink records.

unlink -m ir.attachment -i {{search -m ir.attachment -f id -d [['res_model','=','ir.ui.view'],['name','like','assets_']]}}.id

Thanks for the great tools. I hope I hadn't missed anything in the doc.

Being able to input various commands that will be executed sequentially

The idea would be to be able to put various commands at once and then press enter, and it will execute the first, wait for response, execute the second, wait for response, etc.
Basically will always try to wait for the previous one to do the next one, this would be useful for upgrade/install commands, something like
multi -c ual; upgrade -m module1; upgrade -m module2; upgrade -m module3; install -m module4; upgrade -m module5; print finished;
Or something like
multi-commands(enter)(enters in multi command mode)(prints text "Introduce commands and write execute to start")
ual(enter)(does nothing)
upgrade -m module(enter)(does nothing)
etc(enter)(does nothing)
execute(enter)(executes the commands)

But tbh i would prefer to put them all in the same command separated by ; or some other separator.

[BUG] In Odoo SaaS versions, you cannot see the real version in the extension icon

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: saas-16.1
  • Browser: firefox
  • Command: None. Just looking at the icon

Describe the bug
The icon does not display the full version string, because it's too small.

Expected behavior
It would be nice if the version string could span 2 lines, just to be able to see which saas version is being used.

Screenshots
imagen

Additional context
Just open a runbot of any saas-16.1 edition (or newer)

[BUG]

in firefox, the configuration window (Init Commands,terminal context) is not shown

  • Odoo version: 14.0
  • Browser: firefox

bug
Version 8.6.0, in the Firefox browser dont show the extension Config/Preferences
in chrome works fine

Expected behavior
Show the extension Config/Preferences

Screenshots
Firefox:
image

Chrme;
image

[BUG] UtilsBackend is undefined

  • Odoo version: 14.0
  • Browser: firefox
  • Command: lang -o export -l en_US -m mail

Bug
when execute the command, show the next message
[!] Error executing 'lang':
UtilsBackend is undefined

Expected behavior
Finish the export lang file

Screen Shot
Screen Shot 2022-05-18 at 09 56 42

Env variables for `ACTIVE_ID` and `ACTIVE_MODEL`

First of all, I wanna thank you for this amazing tool โค๏ธ
I have integrated it into my flow and it has saved me quite a lot of time already


Is your feature request related to a problem? Please describe.
Not really a problem, just something I wish it was possible.
I often use this tool to read hidden or missing fields on a record form.
For example, I navigate to a sale.order record, get the id from the browser URL, and use read sale.order ID field1,field2

Describe the solution you'd like
I'd like to be able to execute something like read $ACTIVE_MODEL $ACTIVE_ID field1,field2, where ACTIVE_MODEL and ACTIVE_ID would be inferred from the page.


Is this something you'd be interested in?
I'd be happy to contribute to make it happen (any pointers to get me started would be welcomed, too)

[BUG] `debug` doesn't work in newer versions

Basic Info:

  • Odoo version: 17.0
  • Browser: Firefox
  • Command: debug 0, debug 1

Describe the bug

  • debug 0 returns an error due to $.deparam not being available
  • debug 1 (or 2) returns an error due to $.param.querystring not being available

The fix should be simple so I can open a PR if needed. Thank you!

Expected behavior
These commands should work.

Screenshots
N/A

Additional context
N/A

Add defaults to search

search is very useful. However, it should have some defaults.

For example, running search res.partner should be the same as search res.partner display_name "[]"

Allow batch operations

Commands write and unlink would benefit a lot from being able to pass a list of IDS instead of just one.

Not working on v13?

It's failing when I install a new odoo database in v13.

With debug=assets:

TypeError: service is undefined
    _call_service http://localhost:13069/web/static/src/js/core/service_mixins.js:89
    trigger http://localhost:13069/web/static/src/js/core/mixins.js:224
    _trigger_up http://localhost:13069/web/static/src/js/core/mixins.js:339
    _trigger_up http://localhost:13069/web/static/src/js/core/mixins.js:341
    trigger_up http://localhost:13069/web/static/src/js/core/mixins.js:334
    call http://localhost:13069/web/static/src/js/core/service_mixins.js:116
    _busServ moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/compat/v12/common.js:12
    init moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/compat/v12/common.js:17
    OdooClass.extend/Class.include/</prototype[name]</< http://localhost:13069/web/static/src/js/core/class.js:123
    Class http://localhost:13069/web/static/src/js/core/class.js:107
    init moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/terminal.js:306
    OdooClass.extend/</prototype[name]</< http://localhost:13069/web/static/src/js/core/class.js:90
    init moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/funcs/backend.js:16
    OdooClass.extend/Class.include/</prototype[name]</< http://localhost:13069/web/static/src/js/core/class.js:123
    init moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/funcs/core.js:11
    OdooClass.extend/Class.include/</prototype[name]</< http://localhost:13069/web/static/src/js/core/class.js:123
    init moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/funcs/common.js:19
    OdooClass.extend/Class.include/</prototype[name]</< http://localhost:13069/web/static/src/js/core/class.js:123
    Class http://localhost:13069/web/static/src/js/core/class.js:107
    <anonymous> moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/loaders/backend.js:23
    jQuery 11
    <anonymous> moz-extension://b4528c19-ae3f-420c-8805-2d57a522dc7f/odoo/js/loaders/backend.js:20
    def http://localhost:13069/web/static/src/js/boot.js:260
    processJob http://localhost:13069/web/static/src/js/boot.js:258
    processJobs http://localhost:13069/web/static/src/js/boot.js:316
    def http://localhost:13069/web/static/src/js/boot.js:271
    promise callback*processJob/def< http://localhost:13069/web/static/src/js/boot.js:267
    processJob http://localhost:13069/web/static/src/js/boot.js:258
    processJobs http://localhost:13069/web/static/src/js/boot.js:316
    def http://localhost:13069/web/static/src/js/boot.js:271
    promise callback*processJob/def< http://localhost:13069/web/static/src/js/boot.js:267
    processJob http://localhost:13069/web/static/src/js/boot.js:258
    processJobs http://localhost:13069/web/static/src/js/boot.js:316
    def http://localhost:13069/web/static/src/js/boot.js:271
    promise callback*processJob/def< http://localhost:13069/web/static/src/js/boot.js:267
    processJob http://localhost:13069/web/static/src/js/boot.js:258
    processJobs http://localhost:13069/web/static/src/js/boot.js:316
    def http://localhost:13069/web/static/src/js/boot.js:271
    promise callback*processJob/def< http://localhost:13069/web/static/src/js/boot.js:267
    processJob http://localhost:13069/web/static/src/js/boot.js:258
    processJobs http://localhost:13069/web/static/src/js/boot.js:316
    define http://localhost:13069/web/static/src/js/boot.js:154
    <anonymous> http://localhost:13069/web?debug=assets#action=35&cids=1&menu_id=5&model=ir.module.module&view_type=kanban:384
backend.js:37:21

[BUG] TypeError: Object.hasOwn is not a function

TypeError: Object.hasOwn is not a function
at chrome-extension://fdidojpjkbpfplcdmeaaehnjfkgpbhad/page_script.js:161:20
at chrome-extension://fdidojpjkbpfplcdmeaaehnjfkgpbhad/page_script.js:183:3
Screenshot from 2022-10-23 11-58-52

Issue Appearance when updateted ...

[BUG] broken on master

Basic Info:

  • Odoo version: master
  • Browser: firefox
  • Command: n/a

Describe the bug

  • Go to a runbot on master version
  • Login with admin/admin
The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:

    web.view_dialogs

The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems:

    terminal.core.compat.15.Backend
    terminal.core.compat.16.Backend
    terminal.loaders.Backend
    terminal.functions.Backend

Expected behavior
Use the database

Screenshots
Screenshot 2023-02-14 at 15-40-53 Odoo - Messages

Additional context
The unloaded modules are now displayed since odoo/odoo@c989ff3

more ergonomic write/create (without JSON)?

Is your feature request related to a problem? Please describe.
I hate handwriting JSON.

Describe the solution you'd like

Using field=value where value is any JSON:

write res.partner 33 name="something" email="[email protected]"

Or even better, where value is any YAML (which in turn is a superset of JSON):

write res.partner 33 name=something [email protected]

This feels more like a CLI.

Describe alternatives you've considered
The only one we have: write JSON. The above example would be:

write res.partner 33 '{"name": "something", "email": "[email protected]"}'

[BUG] Cannot do mass operation like the tutorial

Basic Info. (please complete the following information):

  • Odoo version: All versions
  • Browser: Chrome
  • Command: $orders = $(search sale.order -d [['state','=','draft']]); repeat -t $orders['length'] -c "call sale.order action_cancel [$orders[$(gen intiter)]['id']]"

Describe the bug
I tried to do a mass cancellation on quotations like the tutorial, but errors occurred.

Expected behavior
Cancellation successfully.

Screenshots
image

[BUG] unclear error when calling metadata of a record that doesn't exist

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 12.0
  • Browser: firefox
  • Command: metadata product.template 80255

Describe the bug

[!] Error executing 'metadata':
create_uid is not defined

Expected behavior
Get metadata

Screenshots
imagen

Getting 400 Bad Request on function call

Hi :)

After the latest update I've started getting a wekzeug.exceptions.BadRequest: 400 error when trying to call a function via Odoo Terminal.
It started on multiple instances of Odoo where there were no issue with using Odoo Terminal prior to the update, and it seems to occur even on functions created specifically for testing purposes (i.e. that's nothing but loggers - so nothing in the function themselves that should cause the problem).

If/when I implement such a function - e.g. on a button - and run it from Odoo itself, it goes through without issue, which is what leads me to believe it's the recent update for Odoo Terminal that started it.

Traceback (most recent call last):
  File "/home/redacted/src/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/redacted/src/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/redacted/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/home/redacted/src/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/home/redacted/src/odoo/odoo/http.py", line 318, in _call_function
    raise werkzeug.exceptions.BadRequest(msg % params)
werkzeug.exceptions.BadRequest: 400 Bad Request: <function Home.web_client at 0x7f5f0975ca60>, /web: Function declared as capable of handling request of type 'http' but called with a request of type 'json'```

Cannot open terminal from website

It'd be great to be able to hack just from the website, to see what a public or portal user can do. However, right now the terminal is disabled from the frontend.

[BUG] Odoo v15/14; when using "view" cmd => TypeError: parent._trigger_up is not a function

Basic Info. (please complete the following information):

  • Odoo version: 14.0, 15.0
  • Browser: Chrome
  • Command: view

Describe the bug
When attempting to view a record via the view command, above mentioned error occurs. Tested on various instances across versions 14 and 15; unable to replicate on v16 and v13 instances.
Following the errors first appearence it will pop up again when navigating the UI; most often when changing views.

When attempting to view a specific dataset ("view sale.order 1546"), a brief error is shown in the terminal itself.
To get the full error traceback and console log, attempt to view the model ("view sale.order")

Expected behavior
To be taken to the view of the model/record designated using the view command.

Screenshots
image

Additional context
Traceback:
TypeError: parent._trigger_up is not a function
at Class._trigger_up (https:///web/content/210-4583773/web.assets_common.js:4805:462)
at Class.trigger_up (https:///web/content/210-4583773/web.assets_common.js:4805:280)
at https:///web/content/210-4583773/web.assets_common.js:4869:342
at new Promise ()
at Class.loadViews (https:///web/content/210-4583773/web.assets_common.js:4869:307)
at Class.open (https:///web/content/211-5f6701f/web.assets_backend.js:2240:186)
at prototype. [as open] (https:///web/content/210-4583773/web.assets_common.js:4653:488)
at e.id.d.type (chrome-extension://fdidojpjkbpfplcdmeaaehnjfkgpbhad/dist/pub/loader.mjs:1:16957)
at as.callback (chrome-extension://fdidojpjkbpfplcdmeaaehnjfkgpbhad/dist/pub/loader.mjs:1:17158)
at #fe (chrome-extension://fdidojpjkbpfplcdmeaaehnjfkgpbhad/dist/pub/loader.mjs:1:89531)

[BUG] Cannot use count

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 13.0
  • Browser: firefox
  • Command: count project.task "[['categ_ids','not in',[20,42]]"

Describe the bug

[!] Invalid command parameters!

But I don't see why those are invalid. It seems like a valid domain to me...

Expected behavior
Counts

OdooTerminal is not letting me hack! ๐Ÿ˜‹

If I issue this command:

search -m res.partner -o "insert into res_partner(name) values('pwned'); -- " --domain []

This is the payload that is sent over the wire:

{
	"id": 879518458,
	"jsonrpc": "2.0",
	"method": "call",
	"params": {
		"args": [],
		"kwargs": {
			"context": {
				"active_test": false,
				"allowed_company_ids": [
					1
				],
				"lang": "en_US",
				"tz": "Europe/Brussels",
				"uid": 2
			},
			"domain": [],
			"fields": [
				"display_name"
			],
			"order": "insert DESC"
		},
		"method": "search_read",
		"model": "res.partner"
	}
}

You see that "order": "insert DESC"? OdooTerminal hacked my hacking!

It seems to come from this call:

orderBy: this._deserializeSort(kwargs.order),

It should be removed IMHO, and sent raw, to allow more hacking.

TT31444

Clicking on ID number does nothing

When you run search, clicking on the result ID does nothing. However the element seems clickable. Is it supposed to do something? ๐Ÿค”

Commands autocomplete

Is your feature request related to a problem? Please describe.
When doing a lot of commands with odoo terminal, it's pretty painfull to have to manually type modules/models name

Describe the solution you'd like
I was thinking to a per-command function called when user type a command and then a space (example: upgrade ) and then every command would have their function to implement autocomplete by overriding that function and return an array of choices depending of what possible and what user started to type

Describe alternatives you've considered
None yet

Additional context
None

[BUG] Init Commands

  • Odoo version: 14.0
  • Browser: chrome, firefox
  • Command: Init Commands

Describe the bug
does not run init commands

Expected behavior
Execute init commands

Screenshots
image

whoami with more info

whoami doesn't give details like:

  1. res.users id
  2. related res.partner id
  3. permissions granted to user
  4. active company_id
  5. available company_ids

It'd be nice that whoami includes all that info if available to the user. It would help debugging security.

Error when clicking on record ID

  1. I issue this command: search res.company.ldap
  2. I click on #1 to see that record info.
  3. Error:
TypeError: this._viewModelRecord is not a function backend.js:87:22
    _onClickTerminalView moz-extension://c636af60-2d58-4123-82b6-f2854e4f07cb/odoo/js/funcs/backend.js:87
    proxy http://example.com/web/static/src/js/core/mixins.js:278
    jQuery 2
        dispatch
        handle

Odoo Terminal v5.2.0
Odoo v12.0.0 (final 0 )

[BUG] Cannot use search

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 13.0
  • Browser: firefox
  • Command: search project.task "[['categ_ids', 'not in', [20,42]]]"

Describe the bug

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1339, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/auto/addons/web/controllers/main.py", line 1331, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 383, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 356, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4959, in search_read
    result = records.read(fields)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2951, in read
    raise ValueError("Invalid field %r on model %r" % (name, self._name))
ValueError: Invalid field '[["categ_ids"' on model 'project.task'

Expected behavior
Searching.

[BUG] Extension disabled in Odoo 16.1+

Basic Info. (please complete the following information):

  • Odoo version: saas-16.1, saas-16.2, saas-16.3, saas-16.4, 17.0
  • Browser: firefox
  • Command: None.

Describe the bug
The extension is disabled.

Expected behavior
Enabled.

Screenshots
Enabled in 16.0: imagen

Disabled in 17.0: imagen

[BUG] clear command: can't access private field or method: object is not the right class

First of all, check that you are using the latest version.
Basic Info. (please complete the following information):

  • Odoo terminal version: 10.3.1
  • Odoo version: 15.0 & 16.0 (not tested in 14.0)
  • Browser: Firefox 118.0.1
  • Command: clear -s screen

Describe the bug
When executing command clear -s screen i have "can't access private field or method: object is not the right class" error in the shell

Expected behavior
Clear terminal of previous commands and results

Screenshots
image
image

Additional context

Error when clicking on apps button in OE11

Version: Version: 11.0+e

STR:

  1. Enter backend in debug mode.
  2. Click on apps button.
TypeError: action is undefined
terminal.js:535:21
    current_action_updated moz-extension://c636af60-2d58-4123-82b6-f2854e4f07cb/module/js/terminal.js:535
    OdooClass.extend/Class.include/</prototype[name]</< https://www.iptecno.com/web/static/src/js/core/class.js:123
    toggle_app_switcher https://www.iptecno.com/web_enterprise/static/src/js/widgets/debug_manager.js:19
    show_app_switcher https://www.iptecno.com/web_enterprise/static/src/js/web_client.js:21
    proxy https://www.iptecno.com/web/static/src/js/core/mixins.js:279
    trigger https://www.iptecno.com/web/static/src/js/core/mixins.js:226
    _trigger_up https://www.iptecno.com/web/static/src/js/core/mixins.js:339
    _trigger_up https://www.iptecno.com/web/static/src/js/core/mixins.js:341
    trigger_up https://www.iptecno.com/web/static/src/js/core/mixins.js:335
    _onToggleAppSwitcher https://www.iptecno.com/web_enterprise/static/src/js/menu.js:237
    proxy https://www.iptecno.com/web/static/src/js/core/mixins.js:279
    jQuery 2

[BUG] Failure escaping character in LIKE search

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: 15.0
  • Browser: firefox
  • Command: search ir.model.data -d "[['module','=','l10n_es'],['name','=like','1\_%']]"

Describe the bug
The payload that is sent breaks the intention. I tried with double escape bar (\\) and the same happens.

It sends these literal info:

{"jsonrpc":"2.0","method":"call","params":{"args":[],"model":"ir.model.data","method":"search_read","kwargs":{"context":{"lang":"es_ES","tz":"Europe/Lisbon","uid":10,"allowed_company_ids":[1],"active_test":false},"domain":{"[[\"module\",\"":",","l10n_es\"],[\"name\",\"":"like\",\"1\\_%\"]]"},"fields":["display_name"]}},"id":637204415}

If you pipe that to jq, it will say: parse error: Invalid escape at line 1, column 290

Expected behavior
The domain is sent like this: [['module','=','l10n_es'],['name','=like','1\_%']]

Additional context

My intention was to escape the literal _ in Postgres.

Get metadta of some record

Is your feature request related to a problem? Please describe.
I need to know the xmlid of a record. I know the model and res id of the record.

Describe the solution you'd like

metadata some.model 1234 and get it right there.

Describe alternatives you've considered
Enabling developer mode, going to the form, clicking on the bug icon > show metadata.

Add active_test=False by default to searchid?

See this session:

2020-05-14_12-46

It would have made sense to me that searchid found the record even when inactive.

Also coming from Odoo world, maybe "read" is a better name for searchid, given that's the RPC name of the method. But that's not important.

Samples in the console itself

This is just a suggestion. It would be helpful if we could access it somehow from the same console to the examples. I am starting to use this tool, and every time I have to come the the repo to see the examples in the README.

Can you add a section in the console where these examples are shown?

Clicking on an ID after a search, to open its form, fails

STR:

  1. search -m hr.attendance -l 1
  2. Click on the ID.

Error 1:

Server application error
Error code: 200 
Error message: Odoo Server Error 
Error data message:
400 Bad Request: <function Home.web_client at 0x7fd46c17eae8>, /web: Function declared as capable of handling request of type 'http' but called with a request of type 'json' 
Error data debug:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 318, in _call_function
    raise werkzeug.exceptions.BadRequest(msg % params)
werkzeug.exceptions.BadRequest: 400 Bad Request: <function Home.web_client at 0x7fd46c17eae8>, /web: Function declared as capable of handling request of type 'http' but called with a request of type 'json'
ajax.js:35:25
Uncaught (in promise) 
Object { message: {โ€ฆ}, event: {โ€ฆ} }

Error 2:

Uncaught (in promise) TypeError: fieldsViews is undefined
    setup https://localhost/web/static/src/js/views/view_dialogs.js:376
    promise callback*open https://localhost/web/static/src/js/views/view_dialogs.js:337
    OdooClass.extend/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:90
    _cmdViewModelRecord moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/backend.js:83
    _onClickTerminalView moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/backend.js:97
    proxy https://localhost/web/static/src/js/core/mixins.js:277
    jQuery 8
    _delegateEvents https://localhost/web/static/src/js/core/widget.js:365
    setElement https://localhost/web/static/src/js/core/widget.js:321
    _injectTerminal moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/terminal.js:64
    _createTerminal moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/terminal.js:346
    init moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/terminal.js:121
    OdooClass.extend/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:90
    init moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/backend.js:16
    OdooClass.extend/Class.include/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:123
    init moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/fuzz.js:658
    OdooClass.extend/Class.include/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:123
    init moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/core.js:12
    OdooClass.extend/Class.include/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:123
    init moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/functions/common.js:20
    OdooClass.extend/Class.include/</prototype[name]</< https://localhost/web/static/src/js/core/class.js:123
    Class https://localhost/web/static/src/js/core/class.js:107
    <anonymous> moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/loaders/backend.js:26
    jQuery 11
    <anonymous> moz-extension://1ea6ef43-b0a3-4f46-a9b0-f48dce51880f/odoo/js/loaders/backend.js:23
    def https://localhost/web/static/src/js/boot.js:260
    processJob https://localhost/web/static/src/js/boot.js:258
    processJobs https://localhost/web/static/src/js/boot.js:316
    def https://localhost/web/static/src/js/boot.js:271
    promise callback*processJob/def< https://localhost/web/static/src/js/boot.js:267
    processJob https://localhost/web/static/src/js/boot.js:258
    processJobs https://localhost/web/static/src/js/boot.js:316
    def https://localhost/web/static/src/js/boot.js:271
    promise callback*processJob/def< https://localhost/web/static/src/js/boot.js:267
    processJob https://localhost/web/static/src/js/boot.js:258
    processJobs https://localhost/web/static/src/js/boot.js:316
    def https://localhost/web/static/src/js/boot.js:271
    promise callback*processJob/def< https://localhost/web/static/src/js/boot.js:267
    processJob https://localhost/web/static/src/js/boot.js:258
    processJobs https://localhost/web/static/src/js/boot.js:316
    def https://localhost/web/static/src/js/boot.js:271
    promise callback*processJob/def< https://localhost/web/static/src/js/boot.js:267
    processJob https://localhost/web/static/src/js/boot.js:258
    processJobs https://localhost/web/static/src/js/boot.js:316
    define https://localhost/web/static/src/js/boot.js:154
    <anonymous> https://localhost/web#action=1062&cids=1&menu_id=763:635
view_dialogs.js:376:20

Error in query, read and search command [BUG]

First of all, check that you are using the latest version.

Basic Info. (please complete the following information):

  • Odoo version: [e.g. 16.0] and [e.g. 17.0]
  • Browser: [e.g. edge, chrome]
  • Command: [e.g. read -m product.product -i XX -f *]

Describe the bug
The shortcut to get the model does not work and when you enter it manually it throws the error
[!] InvalidValueError: Invalid value 'product.product'

Expected behavior
The shortcut has to work correctly and return the expected query.

Screenshots
If applicable,
cap02
cap01
add screenshots to help explain your problem.

Additional context
translated from Spanish to English by DeepL

[BUG] Unregistered user

Lastest Version odoo terminal

Basic Info.:

  • Odoo version: 12.0, 13.0, 14.0
  • Browser: edge, firefox

Describe the bug
freeze when load the odoo. appears message 'Unregistered User ip_dns_odoo.site'
in console show
[OdooTerminal] Can't initilize longpolling: InternalError: too much recursion terminal.mjs:1:60392

Screenshots
Screen Shot 2023-08-16 at 15 00 05

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.