gOdoo-cli 0.0.2__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 (31) hide show
  1. godoo_cli-0.0.2/LICENSE +165 -0
  2. godoo_cli-0.0.2/PKG-INFO +169 -0
  3. godoo_cli-0.0.2/README.md +146 -0
  4. godoo_cli-0.0.2/pyproject.toml +149 -0
  5. godoo_cli-0.0.2/setup.py +48 -0
  6. godoo_cli-0.0.2/src/godoo_cli/__init__.py +2 -0
  7. godoo_cli-0.0.2/src/godoo_cli/__main__.py +5 -0
  8. godoo_cli-0.0.2/src/godoo_cli/cli.py +78 -0
  9. godoo_cli-0.0.2/src/godoo_cli/commands/__init__.py +7 -0
  10. godoo_cli-0.0.2/src/godoo_cli/commands/bootstrap.py +183 -0
  11. godoo_cli-0.0.2/src/godoo_cli/commands/launch.py +188 -0
  12. godoo_cli-0.0.2/src/godoo_cli/commands/makedev.py +138 -0
  13. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/__init__.py +8 -0
  14. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/cli.py +19 -0
  15. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/cli_callbacks.py +37 -0
  16. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/importer.py +70 -0
  17. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/modules.py +108 -0
  18. godoo_cli-0.0.2/src/godoo_cli/commands/rpc/translations.py +94 -0
  19. godoo_cli-0.0.2/src/godoo_cli/commands/shell.py +42 -0
  20. godoo_cli-0.0.2/src/godoo_cli/commands/source_get.py +164 -0
  21. godoo_cli-0.0.2/src/godoo_cli/commands/test.py +91 -0
  22. godoo_cli-0.0.2/src/godoo_cli/git/__init__.py +4 -0
  23. godoo_cli-0.0.2/src/godoo_cli/git/git_odoo.py +45 -0
  24. godoo_cli-0.0.2/src/godoo_cli/git/git_odoo_addons.py +95 -0
  25. godoo_cli-0.0.2/src/godoo_cli/git/git_repo.py +157 -0
  26. godoo_cli-0.0.2/src/godoo_cli/git/git_url.py +152 -0
  27. godoo_cli-0.0.2/src/godoo_cli/git/zip_download.py +47 -0
  28. godoo_cli-0.0.2/src/godoo_cli/helpers/__init__.py +83 -0
  29. godoo_cli-0.0.2/src/godoo_cli/helpers/cli.py +85 -0
  30. godoo_cli-0.0.2/src/godoo_cli/helpers/odoo_files.py +105 -0
  31. godoo_cli-0.0.2/src/godoo_cli/helpers/repospec.py +112 -0
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,169 @@
1
+ Metadata-Version: 2.1
2
+ Name: godoo-cli
3
+ Version: 0.0.2
4
+ Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
5
+ License: LGPL-3
6
+ Author: Joshua Kreuder
7
+ Author-email: Joshua_Kreuder@outlook.com
8
+ Requires-Python: >=3.8,<3.11
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Requires-Dist: gitpython (==3.1.27)
15
+ Requires-Dist: godoo-rpc (==0.0.2)
16
+ Requires-Dist: openupgradelib (==3.3.4)
17
+ Requires-Dist: python-dotenv (==0.20.0)
18
+ Requires-Dist: rich (==12.6.0)
19
+ Requires-Dist: ruamel-yaml (==0.17.21)
20
+ Requires-Dist: typer[all] (>=0.7.0,<0.8.0)
21
+ Description-Content-Type: text/markdown
22
+
23
+ # gOdoo Dev Environment
24
+
25
+ ![OdooLogo](https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/odoo_logo.png)
26
+ ![ComposeLogo](https://raw.githubusercontent.com/docker/compose/v2/logo.png)
27
+
28
+ **gOdoo** is short for **go Odoo**. \
29
+ It is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)
30
+ with Python CLI `godoo` convenience wrapper around `odoo-bin`.
31
+
32
+ This repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as
33
+ an all batteries included development environment.
34
+
35
+ Made Possible by: [WEMPE Elektronic GmbH](https://wetech.de)
36
+
37
+ # gOdoo-cli
38
+
39
+ Python package that provides `godoo` command line interface around `odoo-bin`.
40
+
41
+ It's build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and
42
+ Deployment.
43
+
44
+ Most flags can be configured by Env variables. \
45
+ Use `godoo --help` to find out more.
46
+
47
+ # Docker
48
+
49
+ This workspace also contains Docker and Docker-Compose files. \
50
+
51
+ They are used to provide either easy Odoo instances where the source is pulled according to
52
+ [odoo_repospec.yml](./odoo_repospec.yml), or as a all batteries included devcontainer for VScode.
53
+
54
+ ## Requirements
55
+
56
+ - [Docker Compose](https://github.com/docker/compose)
57
+ - [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.
58
+ Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)
59
+
60
+ ## Just wanna have a quick and easy Odoo Instance?
61
+
62
+ ```bash
63
+ git clone https://github.com/OpenJKSoftware/gOdoo
64
+ cd godoo
65
+ cp .env.sample .env # Change this to your liking or pass the env vars directly to the app container.
66
+ docker-compose build
67
+ docker-compose up
68
+ # wait......
69
+ # wait a bit mode ...
70
+ # just a little bit longer ..
71
+ # There we go.
72
+ # Odoo should be reachable on 'https://godoo.docker.localhost' assuming you didn't change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME
73
+ ```
74
+
75
+ # Devcontainer
76
+
77
+ ## Features
78
+
79
+ - All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service
80
+ Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).
81
+ - Easy fully working Odoo instance by `docker-compose up` with https access.
82
+ - `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured
83
+ in the Containers. See [.env.sample](./.env.sample))
84
+ - `odoo-bin` is added to PATH and can thus be invoked from every folder.
85
+ - Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on
86
+ `https://$COMPOSE_PROJECT_NAME.docker.localhost`
87
+ - [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode
88
+ - Preinstalled vscode Extensions Highlights:
89
+ - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for
90
+ easy Database access in the Sidebar.
91
+ - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls
92
+ container host.
93
+ - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)
94
+ - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab
95
+ Odoo Model information from a running Server
96
+ - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)
97
+
98
+ ## Usage
99
+
100
+ 1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance
101
+ 2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`
102
+ [Example](https://github.com/joshkreud/traefik_devproxy) \
103
+ There must be a Docker network called `traefik` that can reach traefik.
104
+ 3. Create `.env` file (see [.env.sample](.env.sample))
105
+ 4. Open Devcontianer:
106
+ - If you have the Devcontainer CLI: `devcontainer open .`
107
+ - If not open the workspace in Local Vscode. In the Command pallete search for
108
+ `Devcontainers: Rebuild and Reopen in container`
109
+ 5. From **within the container** start Odoo using one of the following commands:
110
+ - `make` -> Loads Odoo + Workspace Addons
111
+ - `make bare` -> Loads Odoo with ony `web` installed.
112
+ - `make enterprise` -> godoo launch with install script for web_enterprise
113
+ - The full init script is available via "`godoo`". (See --help for Options)
114
+ 6. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
115
+ For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)
116
+ 7. Login with `admin:admin`
117
+ 8. Profit!
118
+
119
+ ### Access to Odoo and Thirdparty addon Source
120
+
121
+ You can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within
122
+ the Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).
123
+ Really waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.
124
+
125
+ ## Reset Devcontainer Data
126
+
127
+ When you screwed up so bad its time to just start Over godoo has you covered:
128
+
129
+ ### Automatic Reset
130
+
131
+ There are 3 Options to reset the Dev Env.
132
+
133
+ 1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the
134
+ container. (Vscode will prompt to reconnect if still open)
135
+ 2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and
136
+ then do the same as `make reset`
137
+ 3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way
138
+ quicker than the other options.
139
+
140
+ ### Manual Reset
141
+
142
+ 1. Close vscode
143
+ 2. Remove `app` and `db` container from docker.
144
+ 3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`
145
+ 4. Restart Devcontainer
146
+
147
+ ## Python Debugging
148
+
149
+ ### VsCode Debugging
150
+
151
+ Debugging doesn't reliably work with
152
+ [Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode
153
+ enabled. \
154
+ The container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)
155
+
156
+ ### Interactive Shell
157
+
158
+ Use `godoo shell` to enter an interactive shell on the Database.
159
+
160
+ # Odoo Modules
161
+
162
+ ## Third Party Modules (repospec.yml)
163
+
164
+ The `godoo` bootstrap function, will download some modules using git. \
165
+ Which Repos to download is specified in `odoo_repospec.yml` ([Default](./odoo_repospec.yml)) \
166
+ Not all of the cloned addons are automatically installed. \
167
+ Install them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\
168
+ Modules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)
169
+
@@ -0,0 +1,146 @@
1
+ # gOdoo Dev Environment
2
+
3
+ ![OdooLogo](https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/odoo_logo.png)
4
+ ![ComposeLogo](https://raw.githubusercontent.com/docker/compose/v2/logo.png)
5
+
6
+ **gOdoo** is short for **go Odoo**. \
7
+ It is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)
8
+ with Python CLI `godoo` convenience wrapper around `odoo-bin`.
9
+
10
+ This repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as
11
+ an all batteries included development environment.
12
+
13
+ Made Possible by: [WEMPE Elektronic GmbH](https://wetech.de)
14
+
15
+ # gOdoo-cli
16
+
17
+ Python package that provides `godoo` command line interface around `odoo-bin`.
18
+
19
+ It's build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and
20
+ Deployment.
21
+
22
+ Most flags can be configured by Env variables. \
23
+ Use `godoo --help` to find out more.
24
+
25
+ # Docker
26
+
27
+ This workspace also contains Docker and Docker-Compose files. \
28
+
29
+ They are used to provide either easy Odoo instances where the source is pulled according to
30
+ [odoo_repospec.yml](./odoo_repospec.yml), or as a all batteries included devcontainer for VScode.
31
+
32
+ ## Requirements
33
+
34
+ - [Docker Compose](https://github.com/docker/compose)
35
+ - [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.
36
+ Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)
37
+
38
+ ## Just wanna have a quick and easy Odoo Instance?
39
+
40
+ ```bash
41
+ git clone https://github.com/OpenJKSoftware/gOdoo
42
+ cd godoo
43
+ cp .env.sample .env # Change this to your liking or pass the env vars directly to the app container.
44
+ docker-compose build
45
+ docker-compose up
46
+ # wait......
47
+ # wait a bit mode ...
48
+ # just a little bit longer ..
49
+ # There we go.
50
+ # Odoo should be reachable on 'https://godoo.docker.localhost' assuming you didn't change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME
51
+ ```
52
+
53
+ # Devcontainer
54
+
55
+ ## Features
56
+
57
+ - All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service
58
+ Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).
59
+ - Easy fully working Odoo instance by `docker-compose up` with https access.
60
+ - `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured
61
+ in the Containers. See [.env.sample](./.env.sample))
62
+ - `odoo-bin` is added to PATH and can thus be invoked from every folder.
63
+ - Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on
64
+ `https://$COMPOSE_PROJECT_NAME.docker.localhost`
65
+ - [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode
66
+ - Preinstalled vscode Extensions Highlights:
67
+ - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for
68
+ easy Database access in the Sidebar.
69
+ - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls
70
+ container host.
71
+ - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)
72
+ - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab
73
+ Odoo Model information from a running Server
74
+ - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)
75
+
76
+ ## Usage
77
+
78
+ 1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance
79
+ 2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`
80
+ [Example](https://github.com/joshkreud/traefik_devproxy) \
81
+ There must be a Docker network called `traefik` that can reach traefik.
82
+ 3. Create `.env` file (see [.env.sample](.env.sample))
83
+ 4. Open Devcontianer:
84
+ - If you have the Devcontainer CLI: `devcontainer open .`
85
+ - If not open the workspace in Local Vscode. In the Command pallete search for
86
+ `Devcontainers: Rebuild and Reopen in container`
87
+ 5. From **within the container** start Odoo using one of the following commands:
88
+ - `make` -> Loads Odoo + Workspace Addons
89
+ - `make bare` -> Loads Odoo with ony `web` installed.
90
+ - `make enterprise` -> godoo launch with install script for web_enterprise
91
+ - The full init script is available via "`godoo`". (See --help for Options)
92
+ 6. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
93
+ For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)
94
+ 7. Login with `admin:admin`
95
+ 8. Profit!
96
+
97
+ ### Access to Odoo and Thirdparty addon Source
98
+
99
+ You can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within
100
+ the Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).
101
+ Really waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.
102
+
103
+ ## Reset Devcontainer Data
104
+
105
+ When you screwed up so bad its time to just start Over godoo has you covered:
106
+
107
+ ### Automatic Reset
108
+
109
+ There are 3 Options to reset the Dev Env.
110
+
111
+ 1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the
112
+ container. (Vscode will prompt to reconnect if still open)
113
+ 2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and
114
+ then do the same as `make reset`
115
+ 3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way
116
+ quicker than the other options.
117
+
118
+ ### Manual Reset
119
+
120
+ 1. Close vscode
121
+ 2. Remove `app` and `db` container from docker.
122
+ 3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`
123
+ 4. Restart Devcontainer
124
+
125
+ ## Python Debugging
126
+
127
+ ### VsCode Debugging
128
+
129
+ Debugging doesn't reliably work with
130
+ [Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode
131
+ enabled. \
132
+ The container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)
133
+
134
+ ### Interactive Shell
135
+
136
+ Use `godoo shell` to enter an interactive shell on the Database.
137
+
138
+ # Odoo Modules
139
+
140
+ ## Third Party Modules (repospec.yml)
141
+
142
+ The `godoo` bootstrap function, will download some modules using git. \
143
+ Which Repos to download is specified in `odoo_repospec.yml` ([Default](./odoo_repospec.yml)) \
144
+ Not all of the cloned addons are automatically installed. \
145
+ Install them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\
146
+ Modules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)
@@ -0,0 +1,149 @@
1
+ [tool.poetry]
2
+ name = "gOdoo-cli"
3
+ version = "0.0.2"
4
+ description = "Wrapper around Odoo-Bin with some convinience RPC functions."
5
+ authors = ["Joshua Kreuder <Joshua_Kreuder@outlook.com>"]
6
+ license = "LGPL-3"
7
+ readme = "README.md"
8
+ packages = [{include = "godoo_cli" , from = "src"}]
9
+
10
+ [tool.poetry.scripts]
11
+ godoo = "src.godoo_cli:launch_cli"
12
+
13
+ [tool.poetry.dependencies]
14
+ python = ">=3.8,<3.11"
15
+ python-dotenv = "0.20.0"
16
+ ruamel-yaml = "0.17.21"
17
+ typer = {extras = ["all"], version = "^0.7.0"}
18
+ gitpython = "3.1.27"
19
+ rich = "12.6.0"
20
+ godoo-rpc = "0.0.2"
21
+ openupgradelib = "3.3.4"
22
+
23
+ [tool.poetry.group.dev.dependencies]
24
+ pylint-odoo = "8.0.16"
25
+ inotify = "0.2.10"
26
+ ipdb = "0.13.9"
27
+ debugpy = "1.6.0"
28
+ black = "22.10.0"
29
+ isort = "5.10.1"
30
+ pre-commit = "2.20.0"
31
+ watchdog = "2.1.7"
32
+ py-spy = "0.3.11"
33
+ rope = "0.23.0"
34
+ flake8 = "5.0.4"
35
+
36
+ [build-system]
37
+ requires = ["poetry-core>=1.0.0"]
38
+ build-backend = "poetry.core.masonry.api"
39
+
40
+ [tool.black]
41
+ line-length = 120
42
+
43
+ [tool.isort]
44
+ profile="black"
45
+ multi_line_output=3
46
+ include_trailing_comma=true
47
+ force_grid_wrap=0
48
+ combine_as_imports=true
49
+ use_parentheses=true
50
+ line_length=120
51
+ known_odoo="odoo"
52
+ known_odoo_addons="odoo.addons"
53
+ sections="FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER"
54
+ default_section="THIRDPARTY"
55
+ ensure_newline_before_comments=true
56
+
57
+ [tool.pylint.format]
58
+ max-line-length=120
59
+
60
+ [tool.pylint.master]
61
+ init-hook='import sys; sys.path.append("/odoo/odoo")'
62
+ load-plugins="pylint_odoo"
63
+ score="n"
64
+
65
+ [tool.pylint.odoolint]
66
+ readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
67
+ manifest-required-authors="Joshua Kreuder <Joshua_Kreuder@outlook.com>"
68
+ manifest-required-keys="license"
69
+ manifest-deprecated-keys="active"
70
+ license-allowed="AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3,Other proprietary"
71
+ valid-odoo-versions="16.0"
72
+
73
+ [tool.pylint.'MESSAGES CONTROL']
74
+ disable="all"
75
+
76
+ enable=[
77
+ "anomalous-backslash-in-string",
78
+ "api-one-deprecated",
79
+ "api-one-multi-together",
80
+ "assignment-from-none",
81
+ "attribute-deprecated",
82
+ "class-camelcase",
83
+ "dangerous-default-value",
84
+ "dangerous-view-replace-wo-priority",
85
+ "development-status-allowed",
86
+ "duplicate-id-csv",
87
+ "duplicate-key",
88
+ "duplicate-xml-fields",
89
+ "duplicate-xml-record-id",
90
+ "eval-referenced",
91
+ "eval-used",
92
+ "incoherent-interpreter-exec-perm",
93
+ "license-allowed",
94
+ "manifest-author-string",
95
+ "manifest-deprecated-key",
96
+ "manifest-required-author",
97
+ "manifest-required-key",
98
+ "manifest-version-format",
99
+ "method-compute",
100
+ "method-inverse",
101
+ "method-required-super",
102
+ "method-search",
103
+ "openerp-exception-warning",
104
+ "pointless-statement",
105
+ "pointless-string-statement",
106
+ "print-used",
107
+ "redundant-keyword-arg",
108
+ "redundant-modulename-xml",
109
+ "reimported",
110
+ "relative-import",
111
+ "return-in-init",
112
+ "rst-syntax-error",
113
+ "sql-injection",
114
+ "too-few-format-args",
115
+ "translation-field",
116
+ "translation-required",
117
+ "unreachable",
118
+ "use-vim-comment",
119
+ "wrong-tabs-instead-of-spaces",
120
+ "xml-syntax-error",
121
+ # messages that do not cause the lint step to fail
122
+ "consider-merging-classes-inherited",
123
+ "create-user-wo-reset-password",
124
+ "dangerous-filter-wo-user",
125
+ "deprecated-module",
126
+ "file-not-used",
127
+ "invalid-commit",
128
+ "missing-manifest-dependency",
129
+ "missing-newline-extrafiles",
130
+ # missing-readme",
131
+ "no-utf8-coding-comment",
132
+ "odoo-addons-relative-import",
133
+ "old-api7-method-defined",
134
+ "redefined-builtin",
135
+ "too-complex",
136
+ "unnecessary-utf8-coding-comment",
137
+ "unidiomatic-typecheck",
138
+ "unsubscriptable-object",
139
+ "missing-return",
140
+ # "use-a-generator",
141
+ "no-else-raise",
142
+ "useless-return"
143
+ ]
144
+
145
+
146
+ [tool.pylint.reports]
147
+ msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
148
+ output-format="colorized"
149
+ reports="no"