How to synchronize odoo database with another odoo database? - postgresql

I have two databases in my postgesql, one for the client and another one for the administration, we have these legal texts created in the administration database. What I need to do is to create a button "synchronize" in the client side to allow him to add new legal texts (if there is new legal texts) to his database. I don't know how to do it, or how to access another database from the current one.

you may want to take a look at this page Web service api odoo provid you with a couple of webservice allow you to performe search or read data or create or update almost everything you need in here so if you want to create some record in the other odoo instance use xml-rpc and you can create or update anything you want if you have acces rights.
https://www.odoo.com/documentation/9.0/api_integration.html
read it carefully it's so easy to understand and the example works fine in the online version you need it

Related

How to implement security on a local database created with Entity Framework (6.1)?

We have a desktop application that uses a local database (SQL Server 2012 LocalDb).
We do not want the end user to be able to modify the database directly, and we want to restrict viewing the database contents to certain users.
Moreover, we want to restrict certain actions that can be performed from within the applications depending on the authorization level of the user that is logged in.
How can the first requirement be fulfilled? Is it possible through code-first?
Can the second requirement be integrated with the first?
Currently this is not supported out of the box, however since EF 6 you can create your own migration steps this way you could encapsulate granting rights to certain users and this way you can manage the user rights with migration steps.
About creating a migration step you can read this post: http://dolinkamark.wordpress.com/2014/05/03/creating-a-custom-migration-operation-in-entity-framework/
and you can find a post which has an example closer to your question: http://romiller.com/2013/02/27/ef6-writing-your-own-code-first-migration-operations/

Run multiple sites on the same GWT application

Can someone please point me to the right direction.
I need to be able to host my GWT application in a way that it allows multiple clients to use the same application which could be separated by url's but internally using the same application.
the different sites would probably be seperated by different configurations. eg. different database, different log path etc, etc,
any ideas.?
You could use the following way to arrange your projects :
- my.application.core.project : it holds all the business logic and views for the application except for the entry point
-my.application.customerX.project : it holds only the entry point and the property files used for having the connection to the db, probably customerX specific theme
-my.application.customerY.project : it holds only the entry point and the property files used for having the connection to the db, probably customerY specific theme
Such an organization of the projects would allow you to have a common core that is distributed to each of the customers and also the ability to build on top of the core customer-specific impelementations.
The url's per client can be done with URL rewriting. Be it with an apache server in front of your application and/or in combination with a Filter in your web application.
As for the configuration, logging, and/or database per client you want a solution that doesn't store a file per client on the file system next to your application. Preferable you store client specific settings in one database and have an admin interface to manage it. For the client's data you also don't want a separate database per client, because it doesn't scale well, and would be a maintenance mess if you need to upgrade your application and databases to a newer version. Look for a multitenant architecture.
I admit this is a vague answer, but without specific system and software descriptions it's kind of hard to give a concrete answer. Nevertheless I hope this answer does give you some direction.
I have successfully achieved this by setting up separate directories in tomcat for different clients and then creating soft-links to the main application within that folder. when it comes to database connection properties and other configuration properties, instead of pointing them to the main application I just created them separately.

How to Learn/Create a Database iPhone App?

I have a rather simple idea for an iPhone app. What I need to accomplish:
Allow login of users (which means I'll have to store usernames, passwords, and other account info).
Allow users to submit strings that other users can view.
Attributes attached to each string that must be tracked (i.e. "votes, views, comments, etc.).
As such, I assume I'll need to start learning about databases and working between a server and client. I've gotten my feet wet in OSX/iOS programming (specifically Objective-C) before. I want to learn how one can accomplish a data-based application and the needs I listed above.
I've done some light research and discovered something called SQLite (free and open-source is always good). Is this the right path to achieve what I want to do? I'm a total "noob" when it comes to this field of server/client/data "stuff".
Your help is greatly appreciated.
SQLLite is more like a local database. Really, the database that you will use is unimportant. It sounds like a project with webservices. Inside your webservices, you might connect to a Microsoft SQL Server or anything you want.
I think you should study how to setup a webservice that can be accessed in your code. Webservices is not an Objective-C topic, it applies to any platform. Your project is more like a web development project.
You can save user's credentials in keychain.
#Kinderchocolate is right about introducing database into your project.
It hears about a app which need transmitting data among clients.It means your need server database and local database.
For server database,I recommend you to use Parse.Parse is a platform which provide a convenient way to use their server database with Objective-c in your app.This tool will save many times and energy(it's not necessary to learn PHP,Apache,Mysql).Parse is not free of course,but it has a free period and enough for you to examine your idea.
Here's Parse!.
For local database,I recommend you to use Core Data,Which is provided by XCode.Core data is so strong to meet your need.You can find a way to use Core Data in many books.
Go try Firebase for database in the cloud. (On the server). In Swift 4 there is complete support for Firebase and SQLite

Is there an updated guide to the eu_ldap extension for the typo 3?

I am trying to simulate an intranet CMS and installed the eu_ldap extension for typo3. Unfortunately the downloaded guide is out of date, and the current manual is of very little use to a typo 3 beginner.
Is it possible to create nodes from within the extension or it has to be defined in the ldap server? Or can users can be created within typo3 then be authenticated via ldap or whether it has to be done on the OS. I'd like to build an intranet system and create users who can create resources using other extensions but I would like to structure access control also. In short I don't understand which functionalities are delegated to the extension and which have to be structured on the server side.
At the moment my best guess as to how to create the domains is to create a domain object with each page that acts as a domain root which will correspond to a node within the ldap (e.g. ou=Members) then create an ldap server object in typo 3 on that page, assuming this works (if it is the way to go about it) how can users be created and given acls? then added to this domain for instance?
The extension just provides the authentication service. So can connect the TYPO3 to your ldap by providing the connection data in the extension and then every login attempt is not checked on the TYPO3 side, but redirected to the ldap system. This just sends back whether the user is allowed to login and may provide some more information about the user and the assigned groups.
The ldap system does not know anything about the structure inside your TYPO3, but you can use the groups for access restrictions.
Most of the ldap extensions work like that and depending on whether you want to provide login to frontend, backend or both, there may also be better extensions for your case. You have to be a little more specific on
I'd like to build an intranet system and create users who can create resources using other extensions but I would like to structure access control also.
What kind of resources do you want them to create? Does that mean frontend or backend? What exactly do you want to have an access control for? Pages or content or plugins/extensions or backend modules?

Populating a UITable with info from a website (mySQL database)

I'm looking to write an iPhone app that populates a UITable with information from a field in a database that is stored online, and when selected shows more information from the database.
For example, a list of names that when tapped will show a bio for the person, some basic stats, and a picture.
OR
Is it possible to use CoreData, and have it populate itself on start up with the information from the online mySQL database? This would give the best of both worlds - the uptodate nature of the web and the offline access...
I would suggest using something like PHP to talk to the MySQL database and creating your app to talk to the PHP via a web address. Bit of a security risk to have an app talk directly with a database due to the database not being behind a firewall and your database details being stored in the program and being sent across non authed means.