Tardo / OdooTerminal

Webextension tool for Odoo
GNU Affero General Public License v3.0
119 stars 27 forks source link

Store ids of search operation, for massive writes #26

Closed yajo closed 3 years ago

yajo commented 3 years ago

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... 🤔

Tardo commented 3 years ago

Nice feature! The final syntax. (i called it 'runners/subcommands'):

write {{search my.model id [['some','=','domain']]}}.id "{'field': 'Value'}"

Syntax. can be: {{subcommand}}, {{subcommand}}.field or {{subcommand}}[index]

So, no variables implemented. Direct usage only.