From 76a1b53c389a115ebb24a836f4675fd437d02f8e Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Wed, 22 Jul 2015 15:25:24 +0500 Subject: [PATCH] [IMP] automatically sync server before creating new database --- README.md | 1 - saas_portal/models/saas_portal.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85dabbe47..e88d84ef4 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,6 @@ Usage 8. Try to create database from template * open SaaS/Saas/Plans - select plan - * click [Sync Server] * click [Create Client] * set DB Name, e.g. client-x.odoo.local * click [Create] diff --git a/saas_portal/models/saas_portal.py b/saas_portal/models/saas_portal.py index 991b0b213..f35e54358 100644 --- a/saas_portal/models/saas_portal.py +++ b/saas_portal/models/saas_portal.py @@ -172,6 +172,8 @@ def _create_new_database(self, scheme='http', dbname=None, client_id=None, partn if not server: server = self.env['saas_portal.server'].get_saas_server() + server.action_sync_server() + vals = {'name': dbname or self.generate_dbname()[0], 'server_id': server.id, 'plan_id': self.id,