Is it appropriate to use the OpenERP 6.1 XMLRPC gateway for a web front-end? - odoo

We have been tasked to build a public web front-end on top of an OpenERP 6.1 backend. I have determined with a proof of concept that this will be possible using the XMLRPC gateway (after some CORS configuration). What we don't know is whether this is a good idea.
Is OpenERP intended to be used in this way?
Will the OpenERP & its XMLRPC gateway scale well enough as a web backend?
What is an alternative?

Being a modern, open and full featured ERP solution OpenERP installations tend to contain considerable amount of valuable data not only for internal use but also for sharing trough other portals as the company web site, parters web sites etc.
To answer your questions:
Is OpenERP intended to be used in this way?
It's more than normal to integrate OpenERP with external applications trough some integration interface. OpenERP is a rich application and the use of it's functionality and data outside the OpenERP client could be only of great value.
Will the OpenERP & its XMLRPC gateway scale well enough as a web
backend?
The right way for cross-platform integration with OpenERP is using XMLRPC. This approach will scale as well as the OpenERP's web client scales (if configured to communication trough XMLRPC). I mean that you should take care about the performance but if you are not using complex functionality as closing accounting year you should be OK.
What is an alternative?
If you are integrating from Python code the alternative is NetRPC. It's faster but seems to be Python specific as the protocol is mostly based on serialization of Python objects.

Is OpenERP intended to be used in this way?
OpenERP is an ERP software. so it would be preferable to use OpenERP as software, instead of framework. OpenERP is providing customisation of its web client, So you can customise it as per your requirements instead of developing new one.
Will the OpenERP & its XMLRPC gateway scale well enough as a web backend?
Yes. You can create XMLRPC connector, to access OpenERP server side methods.
e.g : example OPENERP: XML-RPC WEB SERVICES
Hope, this will be helpful.

Related

How to add user interface design in microservice architecture

I'm building small vue.js microservice application and I have few doubts. Firstly I'm using mongoDB as my database, and I'm using express. After I want to use Docker and Kubernetes to deploy the application.
I want to use 5 microservices:
Basic publishing and product catalog
Commenting inside the post
Products can be added to cart
Paying the certain products after the cart
User authentification (login and register)
So the problem is how to add user interface design if the microservices which I want to use are backend based. How to exactly add the frontend if it can't be part of microservices. Or maybe should I use React and implement HTML/CSS things inside javascript code? Is it even possible because I want to use just MongoDB for every database needed in a microservice and write every microservice in Vue?
It's always upto you what you are good and requirement.
There is no specific best practice with microservices to follow certain languages together, people use the different languages in microservice like Ruby, Node, with React as front or one Python service managing the user auth.
It's depends on you what you are good with and familiar with.
You can create the Python app as a user interface or react or HTML which call backend services over API calls or grpc.
There is one example in the Istio repo : https://github.com/istio/istio/tree/master/samples/bookinfo
It's a book info app in Node, Ruby, Python using databases like MySQL, MongoDB etc.
https://cloud.google.com/service-mesh/docs/deploy-bookinfo
Update :
For Vue base, this blog and repo might be helpful vue-microfrontend
https://itnext.io/setup-a-micro-frontend-architecture-with-vue-and-single-spa-2c89528bf72f
Repo : https://github.com/vue-microfrontends

Server Architecture .net/cocoa app

I'm planing on creating an native .net app for Windows as well as a native OSX application with swift.
These two applications should be able to communicate with the same server. With that I mean writing and reading from the same SQL Database, and have REST communication with the server.
Now I'm struggling to come up with a solution for the backend. I'm looking into Serverless backends like Azure or Google Cloud, but I'm not sure that I can use these Services with both my applications. Both Azure and Google Cloud have SDKs for .Net but I've never found one for Swift or Objective-C.
Are there such Services that allow me to communicate or should I just develop my own?
Do you have any good solutions for my problem? Or what is the best server architecture to use for this kind of problem? Any inputs are appreciated!
If your servers vend a REST API, no vendor SDKs should be required. REST is platform- and vendor-agnostic. All you need is an HTTP client, which Swift/ObjC most definitely do have. I use a serverless (AWS Lambda) setup from Swift, and it's easy. Though, I have done this kind of thing before :)
What I would do is setup a simple test server, and expose an API endpoint. Make sure you can reach it with curl from your machine. Then, take a look at the NSURLSession APIs in Foundation. They'll help you make an HTTP request similar to what curl can do. From there, you'll need to investigate serialization (like JSON), which Swift can also do easily (as of Swift 4, I believe).
Good luck!

Is it possible to consume Odoo inventory via the Web Service API?

Is it possible for an external application to update inventory items tracked within Odoo and mark them as shipped to a specific customer?
If so, what's the best way to do that? Via the XML-RPC web service API? Is there a REST API?
The XML-RPC web API seems to imply that this is possible, but it doesn't list the database entities upon which the API is allowed to act. Can this API act on any DB entity?
Thanks in advance for your time.
From what I've seen, there isn't a standing RESTful API for Odoo. There is an API for communicating with Odoo which can be found here. As well as tutorials on how to implement these features here.
If you are in need of a RESTful API then I would provision your own server and have it act as a reverse proxy which communicates through the RESTful model. This way you could dynamically connect multiple clients to multiple DB instances from one point. If you're comfortable with nodejs here is an npm module which just makes HTTP posts to the database with Remote Procedure Calls which have been JSON-ified. This combined with express would offer you a quick solution for an Odoo RESTful API.
That module, however, doesn't seem extensively maintained but the logic is relatively easy to follow and you could fabricate your own quickly.
You can try with the XML-RPC API of the object stock.quant
You will have to provide the location_id and request the product_id and quantity.

Creating a content hub and client application using Piranha CMS

First off, I need to mention that I'm not sure if what I'm trying to achieve is even supported by Piranha CMS (that's partly what I'm trying to determine here). They mention the ability to create a standalone content hub on their website, but my assumptions of what is possible with that model might be incorrect. What I've already done is created an ASP.NET MVC application that is hosting Piranha CMS and I've published it to Azure websites for testing purposes--that part works as expected. The content management interface is the only user facing piece here--it is meant only to serve as the content hub for the client application (just the one for now as this is just proof of concept work).
I am now trying to build a client ASP.NET MVC application that pulls content from the hub. This is where I'm thinking that my assumptions may have been wrong. I was thinking that I'd be able to install the Piranha CMS nuget package(s) on the client as well, and I'd be able to configure the framework to get content from the hub in the same way that it would if the content were hosted on the client site. I realize that I could get the content from the hub using Piranha's REST api, but what I want to do is to be able to use the more friendly entity model based api for this.
So my question is whether it is possible (within reason) to setup Piranha CMS in the way that I've described. If it is, how exactly do I configure the client such that it is aware of the location of the content hub?
There are currently no .net client api consuming the rest services as the simplest scenario would be to deploy .net applications together with the server. In the setups I've done native apps & html5 knockout/angular applications have used the rest api's for getting json data. You should however be able to white such a module, performing the HTTP calls and the deserializing the json without any problems.
Regards
HÃ¥kan

Is there any solution for generating the restfual api code both for client and server

The functions for operating the restful api is quite same. Is there any project that can generate the source code for different platform such android,ios and backend stuff.
I suggest you to use API description languages such Swagger ou RAML.
After having described your RESTful application with a language like this, you will be able to generate things like server skelekons and client sdks with different technologies and languages. You can even generate documentations.
With Swagger, swagger-codegen will do that. swagger-ui may also interest you for the documentation part.
To finish, I would like to mention the Restlet studio that allows to define graphically and quickly the structure of RESTful applications and generate then the corresponding Swagger and RAML contents. The APISpark plaform provides a mecanism to introspect Restlet applications and generate the corresponding contents with these languages. It also allow you to generate a set of server skelekons and client sdks.
Hope it helps you.
I will suggest you to use Spring RESTful webservices starter kit. Which will manage your back-end with centralized database. Also Spring has its own android libs to communicate with REST Apis.