Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
16480 Visualizzazioni

Relatively new to Odoo.sh and github. Need a clear process to follow when performing development using Odoo.sh and github.

When making enhancements to a module I do understand the standards and rules. What is unclear is the git process.

I have been successful in Odoo.sh with the following process, but somehow I ended up with a fatal: not a git repository: error.

This is the process I have been following:

1. Using the odoo editor I make my changes to my xml and py files in my ~/user/[custom_module].

2. Using the webshell, I use git checkout to insure I'm on the correct branch

3. Use git add - To add my changes to git

4. Use git commit - To commit my changes to the branch

5. Use git push https - To push my changes to the branch

This process has worked three times with the branch that I have been working on, then things began to go sour. I'm looking at deleting my repository and starting all over again. But before I go down this road again, I would like to find or create a document on the proper steps for development in Odoo.sh.

Any suggestions?


Avatar
Abbandona
Risposta migliore

Hi,

You can refer our following blog regarding the deployment of a module in Odoo.sh

Odoo.sh module deployment

Regards

Avatar
Abbandona
Risposta migliore

Hi,


You're almost there. Just make sure to create your development branch from production either via Odoo.sh ui or GitHub.

If you see fatal: not a git repository, you're likely not in the right folder. Just switch to the correct directory where your Git repo is.

Personally, I prefer working locally with VS Code rather than the online editor, it’s faster and more comfortable once configured.

If you're new to Git and Odoo.sh, spending an hour with someone experienced near you can really help you get started with confidence.


Official doc: https://www.odoo.com/documentation/18.0/administration/odoo_sh/getting_started/create.html

Great video: https://www.youtube.com/watch?v=eBphCr3PKnk


Hope that helps!

Avatar
Abbandona
Risposta migliore

Hi Jeff: 

​Github Desktop is a free git client that you can download from github.com and use for your development activities. I have not tried it with odoo.sh per se but it works like a charm with github and any standard git repository.

Avatar
Abbandona
Autore Risposta migliore

Ok, well I created a new repository in Odoo.sh. Performed my changes, committed and pushed the changes. Of course, I still have an issue with my build and need to make another change. Problem is, git is no longer assigned to the original branch. If I attempt to $git checkout Project1, I receive the message:

fatal: 'Project1' is already checked out at '/home/odoo/containers/........

This is highly frustrating when just trying to develop. How do you release the container, or better yet, Make changes, test changes, when everything is good, than perform a commit and push. If each time I perform a change I need to re-create the original repository, development will take 10 fold longer.


Avatar
Abbandona

Hi, were you able to solve your problem in the end?

Post correlati Risposte Visualizzazioni Attività
0
mar 25
797
0
apr 24
1733
1
feb 24
2046
1
ott 20
4748
3
giu 25
5267