robotframework-odoofx 0.1.0__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.
- robotframework_odoofx-0.1.0/LICENSE +134 -0
- robotframework_odoofx-0.1.0/NOTICE +43 -0
- robotframework_odoofx-0.1.0/PKG-INFO +139 -0
- robotframework_odoofx-0.1.0/README.md +101 -0
- robotframework_odoofx-0.1.0/pyproject.toml +57 -0
- robotframework_odoofx-0.1.0/setup.cfg +4 -0
- robotframework_odoofx-0.1.0/src/OdooFxLibrary/__init__.py +15 -0
- robotframework_odoofx-0.1.0/src/OdooFxLibrary/odoo_library.py +484 -0
- robotframework_odoofx-0.1.0/src/OdooFxLibrary/rpc.py +329 -0
- robotframework_odoofx-0.1.0/src/robotframework_odoofx.egg-info/PKG-INFO +139 -0
- robotframework_odoofx-0.1.0/src/robotframework_odoofx.egg-info/SOURCES.txt +12 -0
- robotframework_odoofx-0.1.0/src/robotframework_odoofx.egg-info/dependency_links.txt +1 -0
- robotframework_odoofx-0.1.0/src/robotframework_odoofx.egg-info/requires.txt +8 -0
- robotframework_odoofx-0.1.0/src/robotframework_odoofx.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined in Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
24
|
+
permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or Object
|
|
36
|
+
form, made available under the License, as indicated by a copyright
|
|
37
|
+
notice that is included in or attached to the work (an example is
|
|
38
|
+
provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship, thus excluding
|
|
44
|
+
simple aggregations of unmodified components or the mere inclusion
|
|
45
|
+
of the Work unmodified in a container with other unmodified works or
|
|
46
|
+
portions thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any Derivative Works thereof,
|
|
50
|
+
submitted to, displayed by, or received by Licensor for inclusion
|
|
51
|
+
in the Work by the copyright owner or by an individual or Legal
|
|
52
|
+
Entity authorized to submit on behalf of the copyright owner. For
|
|
53
|
+
the purposes of this definition, "submitted" means any form of
|
|
54
|
+
electronic, verbal, or written communication sent to the Licensor
|
|
55
|
+
or its representatives.
|
|
56
|
+
|
|
57
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf
|
|
58
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
59
|
+
incorporated within the Work.
|
|
60
|
+
|
|
61
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
62
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
63
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
64
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
65
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
66
|
+
Work and such Derivative Works in Source or Object form.
|
|
67
|
+
|
|
68
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
(except as stated in this section) patent license to make, have made,
|
|
72
|
+
use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
73
|
+
|
|
74
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
75
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
76
|
+
modifications, and in Source or Object form, provided that You
|
|
77
|
+
meet the following conditions:
|
|
78
|
+
|
|
79
|
+
(a) You must give any other recipients of the Work or
|
|
80
|
+
Derivative Works a copy of this License; and
|
|
81
|
+
|
|
82
|
+
(b) You must cause any modified files to carry prominent notices
|
|
83
|
+
stating that You changed the files; and
|
|
84
|
+
|
|
85
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
86
|
+
that You distribute, all copyright, patent, trademark, and
|
|
87
|
+
attribution notices from the Source form of the Work,
|
|
88
|
+
excluding those notices that do not pertain to any part of
|
|
89
|
+
the Derivative Works; and
|
|
90
|
+
|
|
91
|
+
(d) If the Work includes a "NOTICE" text file, then any
|
|
92
|
+
Derivative Works that You distribute must include a readable
|
|
93
|
+
copy of the attribution notices contained
|
|
94
|
+
within such NOTICE file.
|
|
95
|
+
|
|
96
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
97
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
98
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
99
|
+
this License, without any additional terms or conditions.
|
|
100
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
101
|
+
the terms of any separate license agreement you may have executed
|
|
102
|
+
with Licensor regarding such Contribution.
|
|
103
|
+
|
|
104
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
105
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
106
|
+
except as required for reasonable and customary use in describing the
|
|
107
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
108
|
+
|
|
109
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
110
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
111
|
+
Contributor provides its Contributions) on an "AS-IS" BASIS,
|
|
112
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
113
|
+
implied, including, without limitation, any warranties or conditions
|
|
114
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
115
|
+
PARTICULAR PURPOSE.
|
|
116
|
+
|
|
117
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
118
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
119
|
+
unless required by applicable law (such as deliberate and grossly
|
|
120
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
121
|
+
liable to You for damages, including any direct, indirect, special,
|
|
122
|
+
incidental, or consequential damages of any character arising as a
|
|
123
|
+
result of this License or out of the use or inability to use the
|
|
124
|
+
Work.
|
|
125
|
+
|
|
126
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
127
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
128
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
129
|
+
or other liability obligations and/or rights consistent with this
|
|
130
|
+
License. However, in accepting such obligations, You may act only
|
|
131
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
132
|
+
of any other Contributor.
|
|
133
|
+
|
|
134
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ODOOFX
|
|
2
|
+
Copyright 2026 Cyril Montiel
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (see LICENSE file).
|
|
5
|
+
|
|
6
|
+
================================================================================
|
|
7
|
+
THIRD-PARTY COMPONENTS
|
|
8
|
+
================================================================================
|
|
9
|
+
|
|
10
|
+
The robotframework-odoofx package contains no third-party code. It depends on
|
|
11
|
+
the following projects, installed from PyPI under their own licenses:
|
|
12
|
+
|
|
13
|
+
1. Robot Framework
|
|
14
|
+
- Project: https://robotframework.org/
|
|
15
|
+
- License: Apache License 2.0
|
|
16
|
+
- Used for: keyword library API, typed secrets, test execution
|
|
17
|
+
|
|
18
|
+
2. Requests
|
|
19
|
+
- Project: https://requests.readthedocs.io/
|
|
20
|
+
- License: Apache License 2.0
|
|
21
|
+
- Used for: the JSON-2 channel (Odoo 19 and later)
|
|
22
|
+
|
|
23
|
+
3. Robot Framework Browser library (optional, `web` extra)
|
|
24
|
+
- Project: https://github.com/MarketSquare/robotframework-browser
|
|
25
|
+
- License: Apache License 2.0
|
|
26
|
+
- Used for: the web channel, through Playwright
|
|
27
|
+
(https://playwright.dev/, Apache License 2.0)
|
|
28
|
+
|
|
29
|
+
================================================================================
|
|
30
|
+
DESIGN LINEAGE
|
|
31
|
+
================================================================================
|
|
32
|
+
|
|
33
|
+
The method around the library (spec-driven test agents, guards) follows
|
|
34
|
+
rf-test-agents (https://github.com/CyrilM29/rf-test-agents, Apache License
|
|
35
|
+
2.0, same author). No code of it is part of this package.
|
|
36
|
+
|
|
37
|
+
================================================================================
|
|
38
|
+
TRADEMARKS
|
|
39
|
+
================================================================================
|
|
40
|
+
|
|
41
|
+
Odoo is a trademark of Odoo S.A. Robot Framework is a trademark of the Robot
|
|
42
|
+
Framework Foundation. ODOOFX is an independent project, not affiliated with,
|
|
43
|
+
sponsored or endorsed by Odoo S.A. or the Robot Framework Foundation.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: robotframework-odoofx
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ODOOFX: Robot Framework library for testing Odoo over its external API (XML-RPC up to Odoo 18, JSON-2 from Odoo 19), with opt-in journaled writes. Web channel in bootstrap.
|
|
5
|
+
Author-email: Cyril Montiel <cyril@montiel.me>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/CyrilM29/robotframework-odoofx
|
|
8
|
+
Project-URL: Documentation, https://cyrilm29.github.io/robotframework-odoofx/
|
|
9
|
+
Project-URL: Repository, https://github.com/CyrilM29/robotframework-odoofx
|
|
10
|
+
Project-URL: Issue Tracker, https://github.com/CyrilM29/robotframework-odoofx/issues
|
|
11
|
+
Keywords: robotframework,robot-framework,test-automation,testing,qa,odoo,erp,orm,rpc,xml-rpc,json-2
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Framework :: Robot Framework
|
|
16
|
+
Classifier: Framework :: Robot Framework :: Library
|
|
17
|
+
Classifier: Topic :: Software Development :: Testing
|
|
18
|
+
Classifier: Topic :: Software Development :: Testing :: Acceptance
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
+
Classifier: Operating System :: OS Independent
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
License-File: NOTICE
|
|
31
|
+
Requires-Dist: robotframework>=7.4
|
|
32
|
+
Requires-Dist: requests>=2.28.0
|
|
33
|
+
Provides-Extra: web
|
|
34
|
+
Requires-Dist: robotframework-browser<21,>=20.0; extra == "web"
|
|
35
|
+
Provides-Extra: all
|
|
36
|
+
Requires-Dist: robotframework-odoofx[web]; extra == "all"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# ODOOFX: Odoo library for Robot Framework
|
|
40
|
+
|
|
41
|
+
`OdooFxLibrary` brings Odoo test automation to Robot Framework. Today it talks
|
|
42
|
+
to Odoo through its external API: XML-RPC up to Odoo 18, JSON-2 from Odoo 19,
|
|
43
|
+
behind one keyword vocabulary that reads records and state codes, and writes
|
|
44
|
+
only when the connection opts in, with a journal of every write. It targets
|
|
45
|
+
Odoo Community and Enterprise. The web interface (Browser library) is the next
|
|
46
|
+
channel.
|
|
47
|
+
|
|
48
|
+
This repository publishes the **library sources** and, as they are written,
|
|
49
|
+
the documentation that concerns the library and its keyword reference.
|
|
50
|
+
|
|
51
|
+
> **Status (0.1.0, 2026-10-05): bootstrap.** The RPC channel works, reads and
|
|
52
|
+
> writes, proven live on Odoo 16 (XML-RPC) and Odoo 19.0-20260908 (XML-RPC and
|
|
53
|
+
> JSON-2). Writes are off unless the connection opts in. The web channel is a
|
|
54
|
+
> skeleton that only warns. Signatures may still change before 1.0.
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install robotframework-odoofx
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Requirements: Python 3.10 or later, Robot Framework 7.4 or later, and an Odoo
|
|
63
|
+
instance reachable over HTTP (designed for Odoo 14 and later, proven on 16 and
|
|
64
|
+
19). The `web` extra
|
|
65
|
+
(`pip install "robotframework-odoofx[web]"`, then `rfbrowser init` once for
|
|
66
|
+
the Playwright browsers) brings the Browser library for the coming web channel;
|
|
67
|
+
`all` installs every extra.
|
|
68
|
+
|
|
69
|
+
Keyword documentation:
|
|
70
|
+
[cyrilm29.github.io/robotframework-odoofx](https://cyrilm29.github.io/robotframework-odoofx/).
|
|
71
|
+
|
|
72
|
+
## Keywords of the current version
|
|
73
|
+
|
|
74
|
+
| Keyword | Purpose |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `Connect To Odoo` | Prove the target (URL, database, version) and open the RPC connection; `channel=auto` picks JSON-2 from Odoo 19, XML-RPC before; `allow_write` opts in to writes, `expected_series` refuses another Odoo version |
|
|
77
|
+
| `Get Odoo Connection Info` | The proven target of the current connection, never the secret |
|
|
78
|
+
| `Count Odoo Records` | Count the records of a model matching a domain |
|
|
79
|
+
| `Search Read Odoo Records` | Read the records of a model matching a domain |
|
|
80
|
+
| `Get Field Selection Values` | The technical codes of a selection field |
|
|
81
|
+
| `Count Odoo Records By State` | Record count per state code |
|
|
82
|
+
| `Get Odoo Record State` | The state code of one identified record |
|
|
83
|
+
| `Odoo Record State Should Be` | Fail unless the identified record is in the expected state code |
|
|
84
|
+
| `Assert Quotation Status Is` | Check a quotation's state code, by order reference or id |
|
|
85
|
+
| `Create Odoo Record`, `Update Odoo Record`, `Delete Odoo Record` | Write a record (needs `allow_write`) |
|
|
86
|
+
| `Call Odoo Record Method` | Call a model method such as `action_confirm` or `action_cancel` (needs `allow_write`) |
|
|
87
|
+
| `Get Odoo Write Journal` | Every write (after entry `since`) with its phase: `planned`, `done`, `failed` or `unknown` (to read back, never to resend) |
|
|
88
|
+
| `Odoo Write Journal Should Hold No Unknown Outcome`, `Odoo Last Write Should Be` | Assert on the journal: no write of unknown effect, the last write in a given phase |
|
|
89
|
+
| `Reconcile Odoo Write` | Settle a `planned` or `unknown` journal entry after reading the record back |
|
|
90
|
+
| `Get Odoo Config Parameter` | A system parameter such as `web.base.url` (administrator) |
|
|
91
|
+
| `Odoo User Should Be In Group`, `Odoo User Should Not Be In Group` | Group membership of a user, the group named by its external id |
|
|
92
|
+
| `New Odoo Run Marker` | A unique label to put in a free-text field of the records a run creates |
|
|
93
|
+
| `Get Odoo Server Time` | The server's clock (UTC, one second), to bracket what a run created |
|
|
94
|
+
| `Resolve Odoo External Id` | The database id behind an external id such as `product.product_product_1`, proved to be of the expected model |
|
|
95
|
+
| `Get Odoo Record` | One identified record, whole or by fields |
|
|
96
|
+
| `Odoo Record Exists` | Whether a record exists (archived ones count) |
|
|
97
|
+
| `Odoo Record Should Exist`, `Odoo Record Should Not Exist` | Prove a presence or a removal on the identified record |
|
|
98
|
+
| `Disconnect From Odoo` | Close the connection |
|
|
99
|
+
| `Navigate To Menu` | Skeleton (web channel), only warns |
|
|
100
|
+
| `Create New Quotation` | Skeleton, only warns |
|
|
101
|
+
|
|
102
|
+
```robotframework
|
|
103
|
+
*** Settings ***
|
|
104
|
+
Library OdooFxLibrary
|
|
105
|
+
|
|
106
|
+
*** Test Cases ***
|
|
107
|
+
Read A Quotation State
|
|
108
|
+
Connect To Odoo http://localhost:8069 my_database admin ${PASSWORD} channel=xmlrpc
|
|
109
|
+
Assert Quotation Status Is sale S00004
|
|
110
|
+
[Teardown] Disconnect From Odoo
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
States are compared by code (`draft`, `sent`, `sale`, `cancel`), never by the
|
|
114
|
+
translated label: a label fails the assertion as "not a state code".
|
|
115
|
+
|
|
116
|
+
Credentials never live in a suite: pass them on the command line
|
|
117
|
+
(`robot -v "PASSWORD: Secret:..." suite.robot`, the Robot Framework 7.4 typed
|
|
118
|
+
variable keeps them out of the logs) or through the environment.
|
|
119
|
+
|
|
120
|
+
## Layout
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
src/OdooFxLibrary/ the library
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Issues
|
|
127
|
+
|
|
128
|
+
Bug reports and suggestions are welcome as
|
|
129
|
+
[GitHub issues](https://github.com/CyrilM29/robotframework-odoofx/issues).
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
Apache 2.0. See [LICENSE](https://github.com/CyrilM29/robotframework-odoofx/blob/main/LICENSE) and [NOTICE](https://github.com/CyrilM29/robotframework-odoofx/blob/main/NOTICE).
|
|
134
|
+
|
|
135
|
+
## Trademarks
|
|
136
|
+
|
|
137
|
+
Odoo is a trademark of Odoo S.A. Robot Framework is a trademark of the Robot
|
|
138
|
+
Framework Foundation. ODOOFX is an independent project, not affiliated with,
|
|
139
|
+
sponsored or endorsed by Odoo S.A. or the Robot Framework Foundation.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# ODOOFX: Odoo library for Robot Framework
|
|
2
|
+
|
|
3
|
+
`OdooFxLibrary` brings Odoo test automation to Robot Framework. Today it talks
|
|
4
|
+
to Odoo through its external API: XML-RPC up to Odoo 18, JSON-2 from Odoo 19,
|
|
5
|
+
behind one keyword vocabulary that reads records and state codes, and writes
|
|
6
|
+
only when the connection opts in, with a journal of every write. It targets
|
|
7
|
+
Odoo Community and Enterprise. The web interface (Browser library) is the next
|
|
8
|
+
channel.
|
|
9
|
+
|
|
10
|
+
This repository publishes the **library sources** and, as they are written,
|
|
11
|
+
the documentation that concerns the library and its keyword reference.
|
|
12
|
+
|
|
13
|
+
> **Status (0.1.0, 2026-10-05): bootstrap.** The RPC channel works, reads and
|
|
14
|
+
> writes, proven live on Odoo 16 (XML-RPC) and Odoo 19.0-20260908 (XML-RPC and
|
|
15
|
+
> JSON-2). Writes are off unless the connection opts in. The web channel is a
|
|
16
|
+
> skeleton that only warns. Signatures may still change before 1.0.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install robotframework-odoofx
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Requirements: Python 3.10 or later, Robot Framework 7.4 or later, and an Odoo
|
|
25
|
+
instance reachable over HTTP (designed for Odoo 14 and later, proven on 16 and
|
|
26
|
+
19). The `web` extra
|
|
27
|
+
(`pip install "robotframework-odoofx[web]"`, then `rfbrowser init` once for
|
|
28
|
+
the Playwright browsers) brings the Browser library for the coming web channel;
|
|
29
|
+
`all` installs every extra.
|
|
30
|
+
|
|
31
|
+
Keyword documentation:
|
|
32
|
+
[cyrilm29.github.io/robotframework-odoofx](https://cyrilm29.github.io/robotframework-odoofx/).
|
|
33
|
+
|
|
34
|
+
## Keywords of the current version
|
|
35
|
+
|
|
36
|
+
| Keyword | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `Connect To Odoo` | Prove the target (URL, database, version) and open the RPC connection; `channel=auto` picks JSON-2 from Odoo 19, XML-RPC before; `allow_write` opts in to writes, `expected_series` refuses another Odoo version |
|
|
39
|
+
| `Get Odoo Connection Info` | The proven target of the current connection, never the secret |
|
|
40
|
+
| `Count Odoo Records` | Count the records of a model matching a domain |
|
|
41
|
+
| `Search Read Odoo Records` | Read the records of a model matching a domain |
|
|
42
|
+
| `Get Field Selection Values` | The technical codes of a selection field |
|
|
43
|
+
| `Count Odoo Records By State` | Record count per state code |
|
|
44
|
+
| `Get Odoo Record State` | The state code of one identified record |
|
|
45
|
+
| `Odoo Record State Should Be` | Fail unless the identified record is in the expected state code |
|
|
46
|
+
| `Assert Quotation Status Is` | Check a quotation's state code, by order reference or id |
|
|
47
|
+
| `Create Odoo Record`, `Update Odoo Record`, `Delete Odoo Record` | Write a record (needs `allow_write`) |
|
|
48
|
+
| `Call Odoo Record Method` | Call a model method such as `action_confirm` or `action_cancel` (needs `allow_write`) |
|
|
49
|
+
| `Get Odoo Write Journal` | Every write (after entry `since`) with its phase: `planned`, `done`, `failed` or `unknown` (to read back, never to resend) |
|
|
50
|
+
| `Odoo Write Journal Should Hold No Unknown Outcome`, `Odoo Last Write Should Be` | Assert on the journal: no write of unknown effect, the last write in a given phase |
|
|
51
|
+
| `Reconcile Odoo Write` | Settle a `planned` or `unknown` journal entry after reading the record back |
|
|
52
|
+
| `Get Odoo Config Parameter` | A system parameter such as `web.base.url` (administrator) |
|
|
53
|
+
| `Odoo User Should Be In Group`, `Odoo User Should Not Be In Group` | Group membership of a user, the group named by its external id |
|
|
54
|
+
| `New Odoo Run Marker` | A unique label to put in a free-text field of the records a run creates |
|
|
55
|
+
| `Get Odoo Server Time` | The server's clock (UTC, one second), to bracket what a run created |
|
|
56
|
+
| `Resolve Odoo External Id` | The database id behind an external id such as `product.product_product_1`, proved to be of the expected model |
|
|
57
|
+
| `Get Odoo Record` | One identified record, whole or by fields |
|
|
58
|
+
| `Odoo Record Exists` | Whether a record exists (archived ones count) |
|
|
59
|
+
| `Odoo Record Should Exist`, `Odoo Record Should Not Exist` | Prove a presence or a removal on the identified record |
|
|
60
|
+
| `Disconnect From Odoo` | Close the connection |
|
|
61
|
+
| `Navigate To Menu` | Skeleton (web channel), only warns |
|
|
62
|
+
| `Create New Quotation` | Skeleton, only warns |
|
|
63
|
+
|
|
64
|
+
```robotframework
|
|
65
|
+
*** Settings ***
|
|
66
|
+
Library OdooFxLibrary
|
|
67
|
+
|
|
68
|
+
*** Test Cases ***
|
|
69
|
+
Read A Quotation State
|
|
70
|
+
Connect To Odoo http://localhost:8069 my_database admin ${PASSWORD} channel=xmlrpc
|
|
71
|
+
Assert Quotation Status Is sale S00004
|
|
72
|
+
[Teardown] Disconnect From Odoo
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
States are compared by code (`draft`, `sent`, `sale`, `cancel`), never by the
|
|
76
|
+
translated label: a label fails the assertion as "not a state code".
|
|
77
|
+
|
|
78
|
+
Credentials never live in a suite: pass them on the command line
|
|
79
|
+
(`robot -v "PASSWORD: Secret:..." suite.robot`, the Robot Framework 7.4 typed
|
|
80
|
+
variable keeps them out of the logs) or through the environment.
|
|
81
|
+
|
|
82
|
+
## Layout
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
src/OdooFxLibrary/ the library
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Issues
|
|
89
|
+
|
|
90
|
+
Bug reports and suggestions are welcome as
|
|
91
|
+
[GitHub issues](https://github.com/CyrilM29/robotframework-odoofx/issues).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
Apache 2.0. See [LICENSE](https://github.com/CyrilM29/robotframework-odoofx/blob/main/LICENSE) and [NOTICE](https://github.com/CyrilM29/robotframework-odoofx/blob/main/NOTICE).
|
|
96
|
+
|
|
97
|
+
## Trademarks
|
|
98
|
+
|
|
99
|
+
Odoo is a trademark of Odoo S.A. Robot Framework is a trademark of the Robot
|
|
100
|
+
Framework Foundation. ODOOFX is an independent project, not affiliated with,
|
|
101
|
+
sponsored or endorsed by Odoo S.A. or the Robot Framework Foundation.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "robotframework-odoofx"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "ODOOFX: Robot Framework library for testing Odoo over its external API (XML-RPC up to Odoo 18, JSON-2 from Odoo 19), with opt-in journaled writes. Web channel in bootstrap."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
13
|
+
authors = [{ name = "Cyril Montiel", email = "cyril@montiel.me" }]
|
|
14
|
+
keywords = [
|
|
15
|
+
"robotframework", "robot-framework", "test-automation", "testing", "qa",
|
|
16
|
+
"odoo", "erp", "orm", "rpc", "xml-rpc", "json-2",
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 3 - Alpha",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Intended Audience :: Information Technology",
|
|
22
|
+
"Framework :: Robot Framework",
|
|
23
|
+
"Framework :: Robot Framework :: Library",
|
|
24
|
+
"Topic :: Software Development :: Testing",
|
|
25
|
+
"Topic :: Software Development :: Testing :: Acceptance",
|
|
26
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3.10",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
"Programming Language :: Python :: 3.12",
|
|
31
|
+
"Programming Language :: Python :: 3.13",
|
|
32
|
+
"Programming Language :: Python :: 3.14",
|
|
33
|
+
"Operating System :: OS Independent",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
dependencies = [
|
|
37
|
+
"robotframework>=7.4",
|
|
38
|
+
"requests>=2.28.0",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
web = ["robotframework-browser>=20.0,<21"]
|
|
43
|
+
all = [
|
|
44
|
+
"robotframework-odoofx[web]",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://github.com/CyrilM29/robotframework-odoofx"
|
|
49
|
+
Documentation = "https://cyrilm29.github.io/robotframework-odoofx/"
|
|
50
|
+
Repository = "https://github.com/CyrilM29/robotframework-odoofx"
|
|
51
|
+
"Issue Tracker" = "https://github.com/CyrilM29/robotframework-odoofx/issues"
|
|
52
|
+
|
|
53
|
+
[tool.setuptools]
|
|
54
|
+
package-dir = { "" = "src" }
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.packages]
|
|
57
|
+
find = { where = ["src"] }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ODOOFX - Odoo test automation for Robot Framework.
|
|
3
|
+
|
|
4
|
+
ORM, RPC/XML-RPC, UI web (Playwright), workflows.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
__author__ = "Cyril Montiel"
|
|
9
|
+
__email__ = "cyril@montiel.me"
|
|
10
|
+
__license__ = "Apache-2.0"
|
|
11
|
+
|
|
12
|
+
# Core library exports will go here
|
|
13
|
+
from .odoo_library import OdooFxLibrary
|
|
14
|
+
|
|
15
|
+
__all__ = ["OdooFxLibrary", "__version__"]
|