Odooly 2.6.3__tar.gz → 2.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {odooly-2.6.3 → odooly-2.6.4}/CHANGES.rst +12 -0
  2. {odooly-2.6.3 → odooly-2.6.4/Odooly.egg-info}/PKG-INFO +4 -7
  3. {odooly-2.6.3/Odooly.egg-info → odooly-2.6.4}/PKG-INFO +4 -7
  4. {odooly-2.6.3 → odooly-2.6.4}/README.rst +3 -6
  5. {odooly-2.6.3 → odooly-2.6.4}/odooly.py +4 -2
  6. {odooly-2.6.3 → odooly-2.6.4}/odooly_run.py +12 -11
  7. {odooly-2.6.3 → odooly-2.6.4}/LICENSE +0 -0
  8. {odooly-2.6.3 → odooly-2.6.4}/MANIFEST.in +0 -0
  9. {odooly-2.6.3 → odooly-2.6.4}/Odooly.egg-info/SOURCES.txt +0 -0
  10. {odooly-2.6.3 → odooly-2.6.4}/Odooly.egg-info/dependency_links.txt +0 -0
  11. {odooly-2.6.3 → odooly-2.6.4}/Odooly.egg-info/entry_points.txt +0 -0
  12. {odooly-2.6.3 → odooly-2.6.4}/Odooly.egg-info/top_level.txt +0 -0
  13. {odooly-2.6.3 → odooly-2.6.4}/docs/Makefile +0 -0
  14. {odooly-2.6.3 → odooly-2.6.4}/docs/api.rst +0 -0
  15. {odooly-2.6.3 → odooly-2.6.4}/docs/conf.py +0 -0
  16. {odooly-2.6.3 → odooly-2.6.4}/docs/developer.rst +0 -0
  17. {odooly-2.6.3 → odooly-2.6.4}/docs/index.rst +0 -0
  18. {odooly-2.6.3 → odooly-2.6.4}/docs/intro.rst +0 -0
  19. {odooly-2.6.3 → odooly-2.6.4}/docs/make.bat +0 -0
  20. {odooly-2.6.3 → odooly-2.6.4}/docs/tutorial.rst +0 -0
  21. {odooly-2.6.3 → odooly-2.6.4}/odooly.ini +0 -0
  22. {odooly-2.6.3 → odooly-2.6.4}/setup.cfg +0 -0
  23. {odooly-2.6.3 → odooly-2.6.4}/setup.py +0 -0
  24. {odooly-2.6.3 → odooly-2.6.4}/tests/__init__.py +0 -0
  25. {odooly-2.6.3 → odooly-2.6.4}/tests/_common.py +0 -0
  26. {odooly-2.6.3 → odooly-2.6.4}/tests/test_client.py +0 -0
  27. {odooly-2.6.3 → odooly-2.6.4}/tests/test_interact.py +0 -0
  28. {odooly-2.6.3 → odooly-2.6.4}/tests/test_model.py +0 -0
  29. {odooly-2.6.3 → odooly-2.6.4}/tests/test_util.py +0 -0
@@ -2,6 +2,18 @@ Changelog
2
2
  ---------
3
3
 
4
4
 
5
+ 2.6.4 (2026-03-26)
6
+ ~~~~~~~~~~~~~~~~~~
7
+
8
+ * Remove ``self`` from vars available in interactive mode.
9
+ It was giving wrong suggestions in case of typing error.
10
+
11
+ * Inject ``clear`` command in built-ins for Python <= 3.12.
12
+
13
+ * Adjust ``call_kw`` path to ``/web/dataset/call_kw/<model>/<method``
14
+ for adequate HTTP logging, and to be consistent with Odoo Web.
15
+
16
+
5
17
  2.6.3 (2026-03-18)
6
18
  ~~~~~~~~~~~~~~~~~~
7
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Odooly
3
- Version: 2.6.3
3
+ Version: 2.6.4
4
4
  Summary: Versatile tool for Odoo
5
5
  Home-page: http://odooly.readthedocs.org/
6
6
  Author: Florent Xicluna
@@ -46,11 +46,8 @@ Overview
46
46
  --------
47
47
 
48
48
  Odooly connects to an Odoo instance through HTTP. It makes it easy to browse the application model,
49
- and to perform actions. It carries three modes of use:
50
-
51
- (1) with command line arguments
52
- (2) as an interactive shell
53
- (3) as a client library
49
+ and to perform actions on the server. It is both an interactive shell (with pretty-printing and colors)
50
+ and a client library.
54
51
 
55
52
 
56
53
  Key features:
@@ -58,7 +55,7 @@ Key features:
58
55
  - provides an API similar to Odoo Model, through Webclient API
59
56
  - supports JSON-2 API with Odoo 19 and more recent
60
57
  - supports external API JSON-RPC as alternative
61
- - compatible with Odoo 9 to 19
58
+ - compatible with Odoo 9 to 20
62
59
  - single file ``odooly.py``, no external dependency
63
60
  - helpers for ``search``, for data model introspection, etc...
64
61
  - simplified syntax for search ``domain``
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Odooly
3
- Version: 2.6.3
3
+ Version: 2.6.4
4
4
  Summary: Versatile tool for Odoo
5
5
  Home-page: http://odooly.readthedocs.org/
6
6
  Author: Florent Xicluna
@@ -46,11 +46,8 @@ Overview
46
46
  --------
47
47
 
48
48
  Odooly connects to an Odoo instance through HTTP. It makes it easy to browse the application model,
49
- and to perform actions. It carries three modes of use:
50
-
51
- (1) with command line arguments
52
- (2) as an interactive shell
53
- (3) as a client library
49
+ and to perform actions on the server. It is both an interactive shell (with pretty-printing and colors)
50
+ and a client library.
54
51
 
55
52
 
56
53
  Key features:
@@ -58,7 +55,7 @@ Key features:
58
55
  - provides an API similar to Odoo Model, through Webclient API
59
56
  - supports JSON-2 API with Odoo 19 and more recent
60
57
  - supports external API JSON-RPC as alternative
61
- - compatible with Odoo 9 to 19
58
+ - compatible with Odoo 9 to 20
62
59
  - single file ``odooly.py``, no external dependency
63
60
  - helpers for ``search``, for data model introspection, etc...
64
61
  - simplified syntax for search ``domain``
@@ -17,11 +17,8 @@ Overview
17
17
  --------
18
18
 
19
19
  Odooly connects to an Odoo instance through HTTP. It makes it easy to browse the application model,
20
- and to perform actions. It carries three modes of use:
21
-
22
- (1) with command line arguments
23
- (2) as an interactive shell
24
- (3) as a client library
20
+ and to perform actions on the server. It is both an interactive shell (with pretty-printing and colors)
21
+ and a client library.
25
22
 
26
23
 
27
24
  Key features:
@@ -29,7 +26,7 @@ Key features:
29
26
  - provides an API similar to Odoo Model, through Webclient API
30
27
  - supports JSON-2 API with Odoo 19 and more recent
31
28
  - supports external API JSON-RPC as alternative
32
- - compatible with Odoo 9 to 19
29
+ - compatible with Odoo 9 to 20
33
30
  - single file ``odooly.py``, no external dependency
34
31
  - helpers for ``search``, for data model introspection, etc...
35
32
  - simplified syntax for search ``domain``
@@ -28,7 +28,7 @@ try:
28
28
  except ImportError:
29
29
  requests = None
30
30
 
31
- __version__ = '2.6.3'
31
+ __version__ = '2.6.4'
32
32
  __all__ = ['Client', 'Env', 'HTTPSession', 'WebAPI', 'Service', 'Json2',
33
33
  'Printer', 'Error', 'ServerError',
34
34
  'BaseModel', 'Model', 'BaseRecord', 'Record', 'RecordList',
@@ -1276,6 +1276,8 @@ class Client:
1276
1276
  return self._post_jsonrpc(f"{name}/{method}", params=params)
1277
1277
  else:
1278
1278
  def dispatch_web(method, params):
1279
+ if method == 'call_kw' and name == 'web/dataset':
1280
+ method = f"{method}/{params['model']}/{params['method']}"
1279
1281
  return self._post_jsonrpc(f"{name}/{method}", params=params)
1280
1282
  return dispatch_web
1281
1283
 
@@ -1465,7 +1467,6 @@ class Client:
1465
1467
  assert not user, f"Use client.login({user!r}) instead"
1466
1468
  self._globals['client'] = self.env.client
1467
1469
  self._globals['env'] = env = self.env
1468
- self._globals['self'] = env.user if env.uid else None
1469
1470
  self._set_prompt()
1470
1471
  # Logged in?
1471
1472
  if env.uid:
@@ -2386,6 +2387,7 @@ def _interact(global_vars, use_pprint=True, usage=USAGE):
2386
2387
  from _pyrepl import readline
2387
2388
  else:
2388
2389
  from code import InteractiveConsole as Console
2390
+ builtins.clear = type('', (), {'__repr__': lambda s: os.system('clear') or ''})()
2389
2391
  try:
2390
2392
  import readline
2391
2393
  import rlcompleter
@@ -20,17 +20,18 @@ SOFTKEYW = {*getattr(keyword, 'softkwlist', ())}
20
20
  J_SPECIAL = {'false', 'null', 'true'}
21
21
  CONSTANTS = {'False', 'None', 'True'}
22
22
  DEF_CLASS = {'def', 'class'}
23
+ CSI = '\233' # Control Sequence Introducer, same as ESC+[ or \x1b[
23
24
 
24
25
 
25
26
  class THEME: # Default theme
26
- keyword = '\x1b[1;34m'
27
- builtin = '\x1b[36m'
28
- comment = '\x1b[31m'
29
- string = '\x1b[32m'
30
- number = '\x1b[33m'
31
- op = '\x1b[0m' # No color
32
- definition = '\x1b[1m'
33
- reset = '\x1b[0m'
27
+ keyword = f'{CSI}1;34m'
28
+ builtin = f'{CSI}36m'
29
+ comment = f'{CSI}31m'
30
+ string = f'{CSI}32m'
31
+ number = f'{CSI}33m'
32
+ op = f'{CSI}m' # No color
33
+ definition = f'{CSI}1m'
34
+ reset = f'{CSI}m'
34
35
 
35
36
 
36
37
  def gen_colors(value, theme, keywords=KEYWORDS):
@@ -127,18 +128,18 @@ def patch_colors(module):
127
128
  global THEME
128
129
  try: # Python >= 3.14
129
130
  from _pyrepl.utils import BUILTINS, THEME
130
- BUILTINS |= {'Client', 'client', 'env', 'self'}
131
+ BUILTINS |= {'Client', 'client', 'env', 'clear'}
131
132
  except ImportError:
132
133
  pass
133
134
 
134
135
  module.color_repr = color_repr
136
+ decolor = odooly.partial(re.compile(r'(\233|\033\[)[;\d]*m').sub, '')
135
137
  if module.color_py is not str: # Python >= 3.14
136
- return {'color_repr': color_repr}
138
+ return {'color_repr': color_repr, 'decolor': decolor}
137
139
  theme = THEME()
138
140
  module.color_py = color_python
139
141
  module.color_bold = f'{theme.definition}{{}}{theme.reset}'.format
140
142
  module.color_comment = f'{theme.comment}{{}}{theme.reset}'.format
141
- decolor = odooly.partial(re.compile(r'\x1b\[[;\d]+m').sub, '')
142
143
  return {'color_py': color_python, 'color_repr': color_repr, 'decolor': decolor}
143
144
 
144
145
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes