Odoo.sh + Claude Code: AI-Powered ERP Module Development (Setup and Examples)
By Kevin Zaki
Summary
Topics Covered
- Enterprise Control Is Custom Platform Development
- From Prompt to Production-Ready Module in Minutes
- AI Understands Context Without Studio
- No-Code UX Meets Real Code Generation
Full Transcript
In this video, we're going to talk about ODSH and AI. If you haven't heard, ODO just launched cloud code and open code directly into the ODSH platform. And if
you're not familiar with ODSH, it's basically ODO's platform as a service, right? It manages the infrastructure uh
right? It manages the infrastructure uh for your ODU deployment. Has a lot of features that you can utilize, but today we're just going to really talk about um the new integration with Cloud Code and
Open Code. So essentially what allows
Open Code. So essentially what allows you to do is prompt directly into ODO to create custom developments using cloud code or open code and that's actually
going to create the development in your GitHub repository that's connected to your ODOSH instance. Now this is really important because when mid-market enterprise customers and clients and
prospects talk about control, this is what control actually looks like. Your
actual platform and the ability to customize that platform as you see fit.
What we're going to do today is showcase how to connect to Claude um or open code. We'll do Claude code in our
code. We'll do Claude code in our example and we're going to build out some simple prompts and then we're going to try to do a more complex one and just see how it all connects seamlessly,
frictionless um in the ODSH platform.
So, if you're already on ODSH, you may have gotten a message that looks something like this um ODSH meets AI and just describing what the capabilities are.
So now let's go into ODOSH and let's get started. So here we're at odo.sh which
started. So here we're at odo.sh which
is the sh platform. I'm already logged into my GitHub. So to log in you just need to log in using your GitHub account. And here all I'm going to do is
account. And here all I'm going to do is deploy my platform. So I'm going to click on deploy your platform. Wizard
that pops up is going to ask you whether or not you want to use an existing repository or create a new one. We will
create a new one. We'll have to give this a name. So, we'll just call this claude code demo kez odo version. Here we'll select 19, the
odo version. Here we'll select 19, the latest version. We'll enter in our
latest version. We'll enter in our subscription code. And then we'll select
subscription code. And then we'll select our hosting location. So, you'll see in real time it pings all of the different servers to see which has the least latency. Um, I'm in Buffalo, New York,
latency. Um, I'm in Buffalo, New York, so it's actually pinging the Canadian Toronto location, but I'm going to switch this to the Americas.
And I'm going to click on deploy. So
that's going to build my new ODO instance and it's going to connect directly to my GitHub.
Now while this loads you'll see on the left side of the screen we have our production staging and development environments. Our development
environments. Our development environment is getting spun up. Now if
you're familiar with ODSH you'll notice that this new AI feature is available.
So you'll see this AI logo and there's a couple of different things that we need to configure and look at. So the first thing is if we go to the top of our screen and we go into settings for our
project, you will see that if you scroll through, we can say allow ODSH to push code to our repository.
And what that's going to allow us to do is when we're using Claude, we can push the actual code to our GitHub repository.
There's also going to be some settings about Claude and Open Code. So here
under development branches, select a module group to install automatically for a new build. So when
you build a uh do a new build for ODU, do you want it to have specific modules pre-installed? Do you want it to run the
pre-installed? Do you want it to run the test cases? Do you want it to have demo
test cases? Do you want it to have demo data? And then we're going to select
data? And then we're going to select whether we use open code or cloud. So
here we'll use cloud. So some default settings that are just going to allow us to quickly um you know test our developments as we're building them.
So now I'll go back to branches. Here we
have our main branch. I'm going to create a production branch. I'll just
call this prod. And that's [snorts] going to generate.
Okay. So that will generate. Let me just refresh this. There we go. And our
refresh this. There we go. And our
staging. Once our production is done, we will um duplicate our production. So now
within our development branch, we can click on the main here. You'll see that we can click on this AI feature and that's going to populate cloud code
directly into ODSH.
First, you're prompted with a few default settings. This is typically how
default settings. This is typically how you set up cloud code if you're using it on the terminal uh on your computer as well. Um but here we'll just select what
well. Um but here we'll just select what mode we want. Let's do let's just keep it regular dark mode.
And we're going to select how we want to log in. So, we're either going to do it
log in. So, we're either going to do it through a cloud code account, a anthropic console account, API usage building, or a thirdparty platform. I
have Cloud Pro, so I'm just going to go ahead and use my cloud or my Cloud Mac.
So, I'm going to click this. And then
it's going to want to prompt me to open my browser and do this.
So, I need to authorize this. So I will authorize, copy this code, and I will paste this in here.
Login successful. Press enter to continue. There just some information
continue. There just some information about how it can make mistakes. And
we're basically ready to go. So for our first example, actually, let's create this staging environment or we're still waiting for our production. It looks
good. Now, let's just do staging from our production and we'll let that build.
So, here we have um our cloud all set up.
Okay, it wanted us to authorize again maybe. Nope, I think we're good.
maybe. Nope, I think we're good.
All right. So, if you're not familiar with cloud, uh, basically what we can do here is just prompt it to do something.
And ODU has made it frictionless. So,
it's already set up. It already knows what it needs to do.
I can use a backslash to see what my available options are. But, for the sake of our demonstration, I'm simply just going to give it a prompt to build something. So, I'm just going to start
something. So, I'm just going to start with something super easy. And we're
going to update the contact profile on uh res.partner partner to add a couple
uh res.partner partner to add a couple of different fields that we may want to track. So, for this example, let's just
track. So, for this example, let's just do something very silly. We're going to do um
on res.partner
on res.partner add a new text field for a contacts
favorite football team.
add it to the form view.
And just like that, it's going to take that prompt and actually complete our command. Obviously, this is an extremely
command. Obviously, this is an extremely simple example. We'll do a much more
simple example. We'll do a much more complex one that's going to take a little bit more time, but I just want to show you what happens here.
So you're getting the system is showing it's creating the manifest. It's creating the init files.
manifest. It's creating the init files.
Um it's creating the models init files for a res.partner model that we're going to override. You'll see a new
to override. You'll see a new res.partner file is created. We have our
res.partner file is created. We have our favorite football team which is a text string. And then we have our form view
string. And then we have our form view that's being inherited. And we're adding it after the field website. it seems
like. So, we'll see where that goes. And
now it wants me to proceed. It's going
to give me my URL for my uh development branch. So, I can say yes.
branch. So, I can say yes.
And now it has given me my uh connect my backend URL. So, I can click on that.
backend URL. So, I can click on that.
It's going to open up into my deployment.
Now, while that all right, it's open. We
can go into contacts. We'll click into contacts. We'll see favorite football
contacts. We'll see favorite football team was created right here. Now,
perfect. It worked exactly like we would expect. We can describe if we wanted to
expect. We can describe if we wanted to change it. Maybe we wanted to say, you
change it. Maybe we wanted to say, you know, move that favorite football team under tags or move it in the sales and purchasing section. Um, whatever the
purchasing section. Um, whatever the case might be, you can just prompt it.
So, let's just do that really quickly.
Let's just say that we want to move the favorite football team above the tax ID field.
Can you move the favorite football team above the tax ID field?
So that's going to execute rebuild and do that. So you see you'll see right
do that. So you see you'll see right here it's removing the after website and now it's saying before the AT field. So
very simple fix and change. It's going
to update that. Then we can refresh and look at what it did. So, let's go ahead and click that contacts. And now you'll see favorite
contacts. And now you'll see favorite football team here.
So, the point here is that it's frictionless. We just prompted it. Now,
frictionless. We just prompted it. Now,
we have an actual module in the back end of the system as opposed to using something uh like a studio. Obviously,
you can do that very easily in studio.
Now, where does that code live? It lives
in the user folder where all custom developments go. So, if I go into the
developments go. So, if I go into the editor here in ODOSH, that's going to open up our built-in editor. On the left side of the screen,
editor. On the left side of the screen, we can go to source. We can go into the user folder, and we'll see inside the user folder, we have our partner
football team. We have our model,
football team. We have our model, our default indent file. We have
res.partner
Python file inheriting res.partner with
our new field.
And then we have our manifest.
It's depends on contacts, a quick summary, our partner football team, our NIP file, and then our view, which is our res partner view that we looked at.
So, exactly what we would expect also inside of the user folder. Now, just to verify, if I go into my app store, I can look for football and you'll see this partner football team application was
installed as an actual module.
All right. So that's a very simple example, very seamless. Now let's try something a little bit more complex or actually a lot more complex. In this
example, let's say that, you know, as a company, we primarily use Easy Post for shipping in the United States and it has all of the different carriers connected to Easy Post. But what we want to be
able to do is do some rate shopping on our end. So once we package up our
our end. So once we package up our products, we want to look at all of the different available options for shipping for whatever we have set up in Easy Post
and in ODU. So there's not a great way to do this natively.
There's a lot of uh workflows that you can configure, but for our use case and our company in this example, we just want to be able to see all different possibilities and select one at the
time. So maybe we're prioritizing the
time. So maybe we're prioritizing the speed or the cost. We can select one at the time.
So I wrote up a larger prompt here. I'm
just going to paste this in and I'm going to explain it as we right after we paste this in.
Okay. So that will start working and basically what's going to happen here is we're saying create a new ODO module called delivery easy post rate shop that depends on the easy post connector. This
module adds rate shopping functionality to delivery orders. So the delivery carrier changes we need to add a boolean field to the easy post uh carrier and
basically what we're we're going to ask is do we want to include this in rate shopping just in case we want to exclude it just give it some flexibility.
We have some stock.picking picking
changes that we're going to add a button in the header saying uh near button validate which is essentially going to say near the validate button add a new
button that is going to um have a rate shop option right so it's going to be a button that probably says raid shop you click on it it opens up the prompt then some um additional fields and
actions that we want to perform so basically I wanted to return all the different rate options and I gave it some specifics on how they you they to
look at ODO's um delivery methods um just so it can interpret it correctly and then exactly um how I want the system to be created or how I want it to
be created. So we have this wizard view.
be created. So we have this wizard view.
It's going to be a form and it's going to have a list view that we can select from. I also created a mockup. Let me
from. I also created a mockup. Let me
say yes here. Proceed.
And the mockup looks something like this. Now it doesn't have this mockup. I
this. Now it doesn't have this mockup. I
just wrote this out. Basically, what I'm hoping for is a button that says rate shop. It shows me the different services
shop. It shows me the different services available, the prices, the days, and then I can select one. And then on the additional information tab, it'll add it as my shipping provider. And then once I
validate this document, it's going to print out um my shipping with the different service providers. Now, the
interesting part here is that ODO already has the Easy Post connector. It
already has basically everything we need except this wizard that shows us all the different pricing options from the delivery view. So that's what we're
delivery view. So that's what we're going to create because that's what we want in our business. So this is going to take a few minutes to run. So I will let that run and then we will come back
once it is complete. All right. So that
just took another minute. It's asking me if it wants to generate the URL. I do.
It's showing me everything that it created. So we have models, delivery
created. So we have models, delivery carrier, stock picking overrides. We
have a wizard folder with our easy post rate shopping wizard that we wanted to create. We have our views for delivery
create. We have our views for delivery carriers, views for our stock picking, our wizard view for the rate shopping view itself, some security files,
and then it asks if if we want to commit and push this. So let's just open this up for now. While that loads, we'll go into we're going to have to do some configuration settings. So, let's go
configuration settings. So, let's go ahead and go into Easy Post here.
We'll log in and let me get my security information.
All right.
So, my account settings, I'm going to go to my API keys, and I'll copy those over in a second.
So, now in inventory, I'm going to go to my delivery methods. I'm going to set up easy post. Let's call this uh USPS
easy post. Let's call this uh USPS ground.
Let's copy our production API keys.
Easy post. We'll just set this up as standard delivery.
It's my production one.
And we need our test one.
We'll save this. And now what we'll do is load our easy post carrier accounts.
We'll do USPS.
Our default package here. We can select a default package.
I'm going to create one. We'll just call it um 9 by9 by9 just for our example and easy post USPS. Save. And we can set a
default service here. Let's say this is ground or what the equivalent to USPS ground might be. Let's say it's uh let's do
might be. Let's say it's uh let's do first and priority. So we'll call this first.
Um all right. So let's see if that works. And we'll duplicate this. And the
works. And we'll duplicate this. And the
same thing we will do um USPS priority.
Okay. Now we also need to include this in the rate shopping. That's the what we prompted the agent to add. So we want both of these to be in rate shopping.
So now let's create a new Let me just see what product we should use. Let's
use the office chair black. Let me make sure that it actually has some weight configured on it. Okay. So now in my delivery orders, I'm going to create a new delivery order. We'll choose Acme.
Um we'll do the office chair black. Set
this to one and mark as to-do. All
right. So now we actually do see this rate shopping button, which is great.
Under this additional information tab, we don't have a carrier selected yet, but we do see USPS first and priority.
And let's go ahead and click on rate shopping to see if it works. So, it
actually showing me my USPS priority service level. And it's saying that my
service level. And it's saying that my other USPS first is not available for whatever configurations I have set up.
Um, so let's go ahead and see if we can get a different one. So, instead of USPS first, maybe we select something else.
Let's do uh express And if we go back to our delivery order for Acme, let's go to rate shop. Now we
see two different options. One for
priority, one for express. So let's go ahead and select the priority one.
Under the additional information tab is set the USPS priority. Actually logged
into chatter as well, which is nice. And
we can simply validate this. Disable
SMS. And let's see. So we now actually created the shipment. It's obviously a test shipment, but the cost is the same.
741, which is nice. Um, perfect. That's
exactly what we wanted. Let's actually
duplicate this and try the other shipping method.
We'll mark this as to-do. We'll do rate shopping. And let's now let's try
shopping. And let's now let's try express.
It said express here. Let's go ahead and validate it.
and we were able to create that in express with the same cost that we estimated originally. So that's perfect.
estimated originally. So that's perfect.
That's exactly what we wanted. It's not
always going to work in the first try, but in this case, we had a well-built prompt that allowed the system to create it in one go. The next thing we want to do though, right before we go, is to
push this into a staging environment and into a production environment. So let's
we we want to create a staging environment. Let's see if we have one
environment. Let's see if we have one created. Oh, we do have one. Let's go
created. Oh, we do have one. Let's go
back to our AI here. And actually, if we go to history, we can go into GitHub here. And you'll see that it's not
here. And you'll see that it's not pushed to GitHub yet. So, it's in our it's not in our folder. So, let's go ahead and tell the system here, tell the
AI to just push it. Can you push this development to GitHub?
I'm going to say yes.
And I use a tab button, but my email is kezod.com for my GitHub. And that's only because I have my Claude on a personal account as
opposed uh the one that I connected here is on a personal account.
Sometimes it jumps up. So you're just going to use the down arrow to come to the bottom.
Okay. So we're committing it now and it has some description. I'm going to say yes.
All right. So now let's go back into GitHub. We'll refresh and we see both
GitHub. We'll refresh and we see both our delivery easy post rate and our partner football team both pushed. Now I
want to now push this into our staging environment. So all I have to do is drag
environment. So all I have to do is drag and drop this. Obviously we can merge it manually. But here I'll just click on
manually. But here I'll just click on merge since it doesn't necessarily matter too much for us. It's going to rebuild into our staging environment with all of our other staging data. So
if we had something from production, we can now test it inside of our staging maybe with other developments as well.
So this is our development branch gets pushed into our staging environment then eventually into our production environment.
All right, so that's all for today. Hope
that was helpful. Let me know your thoughts.
Loading video analysis...