rocketdoo 1.2__py3-none-any.whl

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.
rocketdoo/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ # __init__.py
2
+ from .rocketdoo import main
rocketdoo/config.py ADDED
@@ -0,0 +1,352 @@
1
+ import sys
2
+ import os
3
+ import re
4
+ import yaml
5
+ import shutil
6
+
7
+
8
+ docker_compose_path = "docker-compose.yml"
9
+ dockerfile_path = "Dockerfile"
10
+
11
+ # Function to modify docker-compose.yml
12
+
13
+ def modificar_docker_compose(edicion):
14
+ if edicion.lower() == 'ee':
15
+ try:
16
+ # Read docker compose at first
17
+ with open(docker_compose_path, 'r') as file:
18
+ contenido = file.readlines()
19
+
20
+ # Modify content memory
21
+ contenido_modificado = []
22
+ for linea in contenido:
23
+ # Check if the line has the specific pattern
24
+ if linea.lstrip().startswith('#- ./enterprise:/usr/lib/python3/dist-packages/odoo/enterprise'):
25
+ # Remove only the '#' symbol that appears after the spaces, without affecting the indentation.
26
+ indentacion = len(linea) - len(linea.lstrip())
27
+ linea = ' ' * indentacion + linea.lstrip().lstrip('#').lstrip()
28
+ contenido_modificado.append(linea)
29
+ else:
30
+ contenido_modificado.append(linea)
31
+
32
+ # Writes the modified content back to the file
33
+ with open(docker_compose_path, 'w') as file:
34
+ file.writelines(contenido_modificado)
35
+
36
+ print("Environment prepared for the Enterprise edition. Be sure to upload your Enterprise folder to the root of the project.")
37
+ except FileNotFoundError:
38
+ print(f"The file {docker_compose_path} was not found.")
39
+ except Exception as e:
40
+ print(f"Error modifying {docker_compose_path}: {e}")
41
+
42
+ # Function to modify the odoo.conf file
43
+ def modificar_odoo_conf(edicion):
44
+ odoo_conf_path = os.path.join("config", "odoo.conf")
45
+
46
+ if edicion.lower() == 'ee':
47
+ # Ensure that the file exists
48
+ if not os.path.exists(odoo_conf_path):
49
+ print(f"The file {odoo_conf_path} does not exist.")
50
+ return
51
+
52
+ with open(odoo_conf_path, 'r') as file:
53
+ contenido = file.read()
54
+
55
+ # Add enterprise path to addons_path
56
+ addons_path = "/usr/lib/python3/dist-packages/odoo/enterprise"
57
+ contenido_modificado = re.sub(r'(addons_path\s*=\s*)(.*)', r'\1\2,{}'.format(addons_path), contenido)
58
+
59
+ with open(odoo_conf_path, 'w') as file:
60
+ file.write(contenido_modificado)
61
+
62
+ print("Modified odoo.conf file to include the Enterprise path.")
63
+
64
+ # Ask for the odoo edition
65
+ edicion = input("In which Odoo edition will you develop? Community or Enterprise (ce/ee): ").strip().lower()
66
+
67
+ # Apply modifications if Enterprise edition
68
+ if edicion == 'ee':
69
+ modificar_docker_compose(edicion)
70
+ modificar_odoo_conf(edicion)
71
+ else:
72
+ print("Community Edition Selected")
73
+
74
+ # SSH lines to be searched and uncommented/commented as needed
75
+ ssh_lines = [
76
+ "#RUN mkdir -p /root/.ssh\n",
77
+ "#COPY ./.ssh/rsa /root/.ssh/id_rsa\n", # The “rsa” will be replaced with the correct key name.
78
+ "#RUN chmod 700 /root/.ssh/id_rsa\n",
79
+ '#RUN echo "StrictHostKeyChecking no" >> /root/.ssh/config\n',
80
+ ]
81
+
82
+
83
+ def get_input(prompt, required=True):
84
+ """Function that receives an input from the user, with the option of not being mandatory."""
85
+ value = input(prompt)
86
+ while required and not value:
87
+ value = input("This field can not empty " + prompt)
88
+ return value
89
+
90
+
91
+
92
+ def manejar_ssh(repos_privados, dockerfile_path):
93
+ """Maneja las claves SSH según si se utilizan repositorios privados."""
94
+ if not repos_privados:
95
+ print("No private repositories will be used. SSH keys will not be modified.")
96
+ return
97
+
98
+ ssh_folder = os.path.expanduser("~/.ssh") # Carpeta del usuario
99
+ build_context_ssh_folder = os.path.join(os.path.dirname(dockerfile_path), ".ssh") # Contexto de construcción
100
+
101
+ try:
102
+ # Buscar claves privadas en ~/.ssh
103
+ if not os.path.exists(ssh_folder):
104
+ print(f"The {ssh_folder} folder was not found. Make sure you have SSH keys configured.")
105
+ return
106
+
107
+ ssh_keys = [
108
+ f for f in os.listdir(ssh_folder)
109
+ if os.path.isfile(os.path.join(ssh_folder, f)) and not f.endswith('.pub')
110
+ ]
111
+
112
+ if not ssh_keys:
113
+ print(f"No private keys were found in {ssh_folder}.")
114
+ return
115
+
116
+ print("The following private keys were found in ~/.ssh:")
117
+ for i, key in enumerate(ssh_keys):
118
+ print(f"{i + 1}. {key}")
119
+
120
+ key_index = int(get_input("Selecciona el número de la clave que deseas usar: ")) - 1
121
+ selected_key = ssh_keys[key_index]
122
+ print(f"You have selected the key: {selected_key}")
123
+
124
+ # Crear la carpeta .ssh en el contexto de construcción si no existe
125
+ if not os.path.exists(build_context_ssh_folder):
126
+ os.makedirs(build_context_ssh_folder)
127
+
128
+ # Copiar la clave seleccionada al contexto de construcción
129
+ source_key_path = os.path.join(ssh_folder, selected_key)
130
+ dest_key_path = os.path.join(build_context_ssh_folder, selected_key)
131
+ shutil.copy(source_key_path, dest_key_path)
132
+
133
+ print(f"Key {selected_key} copied to the construction context: {dest_key_path}")
134
+
135
+ # Modificar el Dockerfile para usar la clave copiada
136
+ with open(dockerfile_path, "r") as file:
137
+ lines = file.readlines()
138
+
139
+ with open(dockerfile_path, "w") as file:
140
+ for line in lines:
141
+ if line.startswith("#RUN mkdir -p /root/.ssh"):
142
+ file.write("RUN mkdir -p /root/.ssh\n")
143
+ elif "#COPY ./.ssh/rsa" in line:
144
+ file.write(
145
+ f"COPY ./.ssh/{selected_key} /root/.ssh/{selected_key}\n"
146
+ )
147
+ elif "#RUN chmod 700 /root/.ssh/id_rsa" in line:
148
+ file.write(
149
+ f"RUN chmod 700 /root/.ssh/{selected_key}\n"
150
+ )
151
+ elif '#RUN echo "StrictHostKeyChecking no"' in line:
152
+ file.write('RUN echo "StrictHostKeyChecking no" >> /root/.ssh/config\n')
153
+ else:
154
+ file.write(line)
155
+
156
+ print(f"Dockerfile has been updated to use the key {selected_key}.")
157
+
158
+ except IndexError:
159
+ print("Invalid selection. Please try again.")
160
+ except Exception as e:
161
+ print(f"Error handling SSH keys: {e}")
162
+
163
+
164
+
165
+ def comentar_lineas():
166
+ """Comment out specific lines in the Dockerfile."""
167
+ copy_line = "COPY ./gitman.yml /usr/lib/python3/dist-packages/odoo/\n"
168
+ gitman_line = "RUN gitman install -r /usr/lib/python3/dist-packages/odoo/\n"
169
+
170
+ try:
171
+ with open(dockerfile_path, "r") as file:
172
+ lines = file.readlines()
173
+
174
+ with open(dockerfile_path, "w") as file:
175
+ for line in lines:
176
+ if line == copy_line or line == gitman_line:
177
+ file.write(f"# {line}")
178
+ else:
179
+ file.write(line)
180
+
181
+ print("Lines commented correctly in the Dockerfile.")
182
+
183
+ except FileNotFoundError:
184
+ print(f"The file {dockerfile_path} was not found.")
185
+ except Exception as e:
186
+ print(f"Unexpected error: {e}")
187
+
188
+
189
+ # Function to validate user input
190
+ def obtener_respuesta_si_no(mensaje):
191
+ while True:
192
+ respuesta = input(mensaje).strip().lower()
193
+ if respuesta in ["y", "n"]:
194
+ return respuesta
195
+ else:
196
+ print("Please enter 'y' for yes or 'n' for no.")
197
+
198
+
199
+ # Ask if the user wants to use private repositories
200
+ usar_repos_privados = input("Do you want to use private repositories (y/n): ").strip().lower()
201
+
202
+
203
+ # Handle SSH in the Dockerfile based on user response
204
+ manejar_ssh(usar_repos_privados == "y", dockerfile_path)
205
+
206
+ # Ask if the user wants to user gitman with public repositorie
207
+ usar_gitman = input("Do you want to use third-party repositories (y/n): ").strip().lower()
208
+
209
+ if usar_gitman != "y":
210
+ if os.path.exists("gitman.yml"):
211
+ os.remove("gitman.yml")
212
+
213
+ print("Not use third-party repositories. Commenting lines of the Dockerfile...")
214
+ comentar_lineas()
215
+ sys.exit(0)
216
+
217
+
218
+ # Here I would follow the rest of your code to configure Gitman and modify odoo.conf...
219
+
220
+ # Define the initial structure of the configuration file
221
+ config = {
222
+ "location": "external_addons",
223
+ "sources": [],
224
+ "default_group": "",
225
+ "groups": [],
226
+ }
227
+
228
+
229
+ def agregar_repositorio():
230
+ """Functions to add new repositories"""
231
+ repo_info = {
232
+ "repo": get_input("Write or paste the repository (URL): "),
233
+ "name": get_input("Write a name (name): "),
234
+ "rev": get_input("Write revision/version (branch): "),
235
+ "type": "git", # keeping fixed,
236
+ "scripts": [
237
+ "sh /usr/lib/python3/dist-packages/odoo/install_dependencies.sh"
238
+ ], # keeping fixed
239
+ }
240
+
241
+ # Add the repository information to the source list
242
+ config["sources"].append(repo_info)
243
+
244
+
245
+ # Function to modify the odoo.conf file in the config folder
246
+ def modificar_odoo_conf():
247
+ """Modify the addons_path line in config/odoo.conf by adding the new repositories"""
248
+ try:
249
+ # Path to the odoo.conf file in the config folder
250
+ odoo_conf_path = os.path.join("config", "odoo.conf")
251
+
252
+ # Verifying the existence of the odoo.conf file
253
+ if not os.path.exists(odoo_conf_path):
254
+ raise FileNotFoundError(f"The file {odoo_conf_path} does not exist.")
255
+
256
+ # We check if we have read and write permissions
257
+ if not os.access(odoo_conf_path, os.R_OK):
258
+ raise PermissionError(
259
+ f"Cannot read the {odoo_conf_path} file. Check the permissions."
260
+ )
261
+ if not os.access(odoo_conf_path, os.W_OK):
262
+ raise PermissionError(
263
+ f"Cannot write to the {odoo_conf_path} file. Check the permissions."
264
+ )
265
+
266
+ print(f"Modifying the {odoo_conf_path} file...")
267
+
268
+ # We read the gitman.yml file to obtain the names
269
+ with open("gitman.yml", "r") as file:
270
+ gitman_data = yaml.safe_load(file)
271
+
272
+ # We extract the values of 'name' from each repository in sources, making sure not to include empty ones.
273
+ nombres_repositorios = [
274
+ repo["name"] for repo in gitman_data["sources"] if repo["name"]
275
+ ]
276
+ print(f"Extracted repositories: {nombres_repositorios}")
277
+
278
+ # If there are no repository names, we do nothing.
279
+ if not nombres_repositorios:
280
+ print("No repositories were found to add.")
281
+ return
282
+
283
+ # We create the new string for addons_path with the new paths
284
+ nuevas_rutas = ",".join(
285
+ [
286
+ f"/usr/lib/python3/dist-packages/odoo/external_addons/{nombre}"
287
+ for nombre in nombres_repositorios
288
+ ]
289
+ )
290
+
291
+ # Read the odoo.conf file
292
+ with open(odoo_conf_path, "r") as file:
293
+ lines = file.readlines()
294
+
295
+ # We look for the line containing addons_path
296
+ addons_path_encontrado = False
297
+ for i, line in enumerate(lines):
298
+ if line.startswith("addons_path ="):
299
+ # We add the new routes to the existing line, if they are not already there.
300
+ linea_actual = line.strip().split(" = ")[1]
301
+ lineas_rutas_existentes = linea_actual.split(",")
302
+
303
+ # We add the new routes to the existing ones, if they are not already there.
304
+ rutas_actualizadas = lineas_rutas_existentes + [
305
+ ruta
306
+ for ruta in nuevas_rutas.split(",")
307
+ if ruta not in lineas_rutas_existentes
308
+ ]
309
+ lines[i] = f"addons_path = {','.join(rutas_actualizadas)}\n"
310
+ addons_path_encontrado = True
311
+ print(f"addons_path line modified: {lines[i]}")
312
+ break
313
+
314
+ # If addons_path is not found, we add it at the end
315
+ if not addons_path_encontrado:
316
+ lines.append(f"addons_path = {nuevas_rutas}\n")
317
+ print("A new addons_path line was added.")
318
+
319
+ # Save the changes in the odoo.conf file.
320
+ with open(odoo_conf_path, "w") as file:
321
+ file.writelines(lines)
322
+
323
+ print("odoo.conf file successfully updated.")
324
+
325
+ except FileNotFoundError as fnf_error:
326
+ print(fnf_error)
327
+ except PermissionError as perm_error:
328
+ print(perm_error)
329
+ except Exception as e:
330
+ print(f"Unexpected error when modifying odoo.conf: {e}")
331
+
332
+
333
+ # Main to add repositories
334
+ while True:
335
+ agregar_repositorio()
336
+
337
+ # We ask if the user wants to add more repositories
338
+ agregar_mas = input("Do you want to add another repository? (y/n): ").strip().lower()
339
+
340
+ # Validating answer
341
+ if agregar_mas != "y":
342
+ print("Finished configuring gitman to third-party repository.")
343
+ break
344
+
345
+ # Save the gitman files and their configurations on a YAML format
346
+ with open("gitman.yml", "w") as file:
347
+ yaml.dump(config, file, default_flow_style=False, sort_keys=False)
348
+
349
+ print("File gitman.yml generated successfully.")
350
+
351
+ # Calling function to modify odoo.conf
352
+ modificar_odoo_conf()
rocketdoo/rocketdoo.py ADDED
@@ -0,0 +1,44 @@
1
+ import argparse
2
+ import subprocess
3
+ import signal
4
+ import sys
5
+
6
+ # Define la versión del paquete
7
+ VERSION = "1.2"
8
+
9
+ # Maneja la interrupción con Ctrl+C
10
+ def signal_handler(sig, frame):
11
+ print("\nRocketdoo has been cancelled by the user.")
12
+ sys.exit(0)
13
+
14
+ # Registra el manejador de señal para SIGINT (Ctrl+C)
15
+ signal.signal(signal.SIGINT, signal_handler)
16
+
17
+ def main():
18
+ # Configura el analizador de argumentos
19
+ parser = argparse.ArgumentParser(description="Rocketdoo CLI")
20
+ parser.add_argument(
21
+ '--version', action='store_true', help="Show Rocketdoo version"
22
+ )
23
+
24
+ # Parsea los argumentos
25
+ args = parser.parse_args()
26
+
27
+ # Si se pasa el argumento --version, muestra la versión y sale
28
+ if args.version:
29
+ print(f"Rocketdoo version {VERSION}")
30
+ return
31
+
32
+ # Ejecuta Copier si no se pasa --version
33
+ try:
34
+ subprocess.run(["copier", "copy", "./", "./", "--trust"])
35
+ except KeyboardInterrupt:
36
+ # Este bloque captura el Ctrl+C y permite salir limpiamente
37
+ print("\nRocketdoo has been cancelled by the user.")
38
+ except Exception as e:
39
+ # Captura cualquier otro error, sin mostrar traceback detallado
40
+ print(f"\nUnexpected Error: {e}")
41
+ finally:
42
+ sys.exit(0)
43
+
44
+
@@ -0,0 +1,63 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+ Copyright (C) 2024 Horacio Montaño
4
+
5
+
6
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
7
+ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
8
+
9
+ This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
10
+
11
+ 0. Additional Definitions.
12
+ As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.
13
+
14
+ “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
15
+
16
+ An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
17
+
18
+ A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.
19
+
20
+ The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
21
+
22
+ The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
23
+
24
+ 1. Exception to Section 3 of the GNU GPL.
25
+ You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
26
+
27
+ 2. Conveying Modified Versions.
28
+ If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
29
+ a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
30
+ b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
31
+
32
+ 3. Object Code Incorporating Material from Library Header Files.
33
+ The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts, and accessors, small macros, and small inline functions (ten lines or less in length), you do both of the following:
34
+ a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
35
+ b) Accompany the object code with a copy of the GNU GPL and this license document.
36
+
37
+ 4. Combined Works.
38
+ You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
39
+ a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
40
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
41
+ c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
42
+ d) Do one of the following:
43
+ 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
44
+ 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
45
+
46
+ 5. Combined Libraries.
47
+ You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
48
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
49
+ b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
50
+
51
+ 6. Revised Versions of the GNU Lesser General Public License.
52
+ The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
53
+ Each version is given a distinguishing version number. If the Library specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library does not specify a version number of the GNU Lesser General Public License, you may choose any version ever published by the Free Software Foundation.
54
+
55
+ If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
56
+
57
+ <div Rocketdoo=""></div>
58
+
59
+ Licencia: LGPL-3.0+
60
+ Versión: "1.2"
61
+ Autor: Horacio Montaño, Elias Braceras
62
+ Fecha: 16/10/2024
63
+ Descripción: Framework to development Odoo
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.1
2
+ Name: rocketdoo
3
+ Version: 1.2
4
+ Summary: This library allows you to build an automated local development environment for Odoo EE and CE.
5
+ Home-page: https://github.com/HDM-soft/rocketdoo.git
6
+ Author: Horacio Montaño and Elias Braceras
7
+ Author-email: horaciomontano@hdmsoft.com.ar
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: copier
11
+
12
+ # HDMsoft
13
+ [visit our page](https://odoo.hdmsoft.com.ar)
14
+
15
+ ## ROCKETDOO
16
+
17
+ Base repository for Odoo development.
18
+
19
+ ## Developed by:
20
+
21
+ - "Elias Braceras"
22
+ - "Horacio Montaño"
23
+
24
+ ## Version:
25
+ - "1.2"
26
+
27
+ ----------------------------------------------------------------------------------------------------------------------------------------------------------
28
+
29
+ ### Simple Description:
30
+
31
+ RocketDoo is an automated development Framework, designed for ERP-ODOO; in all its versions and editions.
32
+ This repository is a template, which allows you to create your own repository to be able to develop with comfort.
33
+ In order to use it, it is important to install the framework, after creating and cloning its repository created from the template.
34
+
35
+ ``` pip install rocketdoo```
36
+
37
+ - This development environment is intended for those developing on Linux operating systems, such as Ubuntu, Debian, etc. However, for those who prefer to develop on Windows, we suggest installing **WSL2**, the Windows Subsystem for Linux.
38
+
39
+ - This version includes a CLI project launcher designed to make setting up your development project easier.
40
+
41
+ - Docker is used to create Odoo instances, and Docker Compose is used to spin them up along with a database.
42
+
43
+ - A set of configurations is provided for use in VSCode, including debugging and container launch configurations.
44
+
45
+ - Gitman is used for downloading and installing external repositories.
46
+
47
+ - Make sure you have **Docker** and **Docker Compose** installed on your computer. If not, you can follow the official Docker installation guide, [Docker Installation Guide](https://docs.docker.com/engine/install/ubuntu/).
48
+
49
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------
50
+
51
+ ### INSTRUCTIONS:
52
+
53
+ 1. The first step is to use the HDMSOFT repository, our **rocketdoo** template, by creating a repository from it using the green **use this template** button at the top right corner.
54
+
55
+ 2. Decide on a name for your development repository.
56
+
57
+ 3. Once your repository is created, clone it:
58
+
59
+ ```git clone "your_repo_url"```
60
+
61
+
62
+ 4. Before running the launcher, navigate to your repository directory and install the dependencies using the command:
63
+
64
+ ```sudo pip3 install -r requirements.txt```
65
+
66
+ 5. To start, you must enter the subdirectory “rocketdoo” located in the root of rocketdoo; and then execute the following command:
67
+
68
+ ```rocketdoo```
69
+
70
+ 6. Follow the steps provided by the launch software.
71
+
72
+ 7. The second stage of the LAUNCHER offers you the option to use **GITMAN** for third-party repositories. If you say yes, you’ll need to answer some questions.
73
+
74
+ 8. Our launcher will modify the odoo.conf file in the "addons_path" line with the new repositories.
75
+
76
+ 9. Once your project is ready, you can bring up your local instance with:
77
+
78
+ ```docker compose up```
79
+
80
+ 11. RocketDoo will start building the environment image and then launch the system. Once successfully completed, you can check by entering the following URL in your web browser: **localhost:port**
81
+
82
+ 12. If your project has launched successfully, you can run the command:
83
+
84
+ ```code .```
85
+
86
+ NOW YOU CAN START DEVELOPING WITH "VISUAL STUDIO CODE"!
87
+
88
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
89
+
90
+ ### Suggestions and Considerations:
91
+
92
+ - We recommend using Visual Studio Code Extensions, such as **Docker**, **Dev Container**, and any others you find useful for working in VSCode.
93
+
94
+ - If you wish to develop in the Enterprise edition, Rocketdoo will ask you, and will make the necessary configurations. However, you should ensure that you have the "enterprise" folder with all the modules and place it in the root of this project.
95
+
96
+ - This development framework allows you to use private repositories for your developments. For this, the system will ask you if you want to use “private repositories” and if your answer is YES, it will map your local user folder “~/.ssh/” and ask you to choose which ssh key to use.
97
+ Don't worry, these private keys are not saved in your repository after the commit and push; it simply stores them locally and inside the development docker container.
98
+ Remember that your selected key must be previously configured with your GitHub repository.
99
+ This private information is as ephemeral as your environment.
100
+
101
+ ### HOW TO ADD MORE MODULES TO GITMAN IF YOU DID NOT DO IT WITH THE LAUNCHER?
102
+
103
+ - If you need to use third-party addons after setting up your development environment with our launcher, you’ll need to manually edit the **gitman.yml** file and also add lines to the **odoo.conf** addons_path using:
104
+
105
+ ```sudo nano gitman.yml```
106
+
107
+ and complete each line, starting with the repository URL and version, according to your development deployment version. You’ll need to replicate the set of lines to add more third-party repositories.
108
+
109
+ If you need help, you can refer to the [gitman official guide](https://gitman.readthedocs.io/en/latest/).
110
+
111
+ - In this example, you can see how to add your new module package paths.
112
+
113
+ Example:
114
+ ```addons_path: usr/lib/python/dist-packages/odoo/extra_addons/,usr/lib/python/dist-packages/odoo/external_addons/account-financial-tools```
115
+
116
+ - Gitman creates a folder containing all declared modules under **external_addons**, which can be found inside your Odoo web container at the path declared in **odoo.conf**.
117
+
118
+ - All paths should be separated by a comma ","
119
+ - Once third-party modules are declared in "gitman," you’ll need to rebuild your image, keeping the same image name as initially created, using the command:
120
+
121
+ ```docker build . -t my-image-name```
122
+
123
+ - Then restart the Odoo service or container with the command:
124
+
125
+ ```docker compose restart```
126
+
127
+ and once in your Odoo instance, refresh the application list in "developer" mode to see the new modules.
128
+
129
+ If you modify your **gitman.yml** file before building with the "build" command, it will be sufficient to see the modules without needing to restart your containers.
130
+
131
+ - For simpler third-party modules, as well as the module you’re developing, we recommend placing them in the **addons** folder within your working directory.
132
+
133
+ ------------------------------------------------------------------------------------------------------------------------------------------------------
134
+
135
+ ### Technical Support
136
+
137
+ - If you have any questions or issues with our development environment, you can contact us and submit your inquiry or support ticket by clicking on the link below.
138
+
139
+ - [Support Link](https://odoo.hdmsoft.com.ar/contactus)
140
+
141
+
@@ -0,0 +1,9 @@
1
+ rocketdoo/__init__.py,sha256=qKCwHxUj7bJI28Bxc3CwwC2r5GuSgWcQCRTkuHGeZos,42
2
+ rocketdoo/config.py,sha256=aKnH4SidLlSOSaJoEcl7n578CW9yV9o5Y89_TBjeHFI,13049
3
+ rocketdoo/rocketdoo.py,sha256=p3GQmNViASGBSszVDHGY5Jsl82ypyUibXFhJih_6FNE,1250
4
+ rocketdoo-1.2.dist-info/LICENSE,sha256=NXZXQ9rTv8wUCQhbeuFhXkTxU64lKDhjfiKWkPFoGVE,6871
5
+ rocketdoo-1.2.dist-info/METADATA,sha256=jLLVj1O0GZPMdTdTwPhVfrDa2j7obskqMSnZals2w_8,7158
6
+ rocketdoo-1.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
7
+ rocketdoo-1.2.dist-info/entry_points.txt,sha256=4cPoVUKDKObcjc5XnzdNnfF2PXZxcMVkICnsGncvMcA,45
8
+ rocketdoo-1.2.dist-info/top_level.txt,sha256=1C4H5TiWfjaghOhl1hRpRnnBr5vY4Z-u4IZp99imP9E,10
9
+ rocketdoo-1.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.42.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ rocketdoo = rocketdoo:main
@@ -0,0 +1 @@
1
+ rocketdoo