-
-
-
-
-
-
\ No newline at end of file
+
+
diff --git a/saas_pricing/__init__.py b/saas_pricing/__init__.py
index 65221e1f9..bff786c08 100644
--- a/saas_pricing/__init__.py
+++ b/saas_pricing/__init__.py
@@ -1,2 +1 @@
-import controllers
-import models
\ No newline at end of file
+import models
diff --git a/saas_pricing/__openerp__.py b/saas_pricing/__openerp__.py
index 638566163..81e3eabae 100644
--- a/saas_pricing/__openerp__.py
+++ b/saas_pricing/__openerp__.py
@@ -11,6 +11,6 @@
'installable': True,
'description': '''
- Module to define plans pricing
+ Module to define plans pricing
''',
}
diff --git a/saas_pricing/models/saas_pricing.py b/saas_pricing/models/saas_pricing.py
index 7e5904d1f..9104726d0 100644
--- a/saas_pricing/models/saas_pricing.py
+++ b/saas_pricing/models/saas_pricing.py
@@ -16,7 +16,7 @@ class SaasPricingPrice(models.Model):
trial_period_days = fields.Char('Stripe trial period days')
class SaasPricingPlan(models.Model):
- _inherit = 'saas_portal.plan'
+ _inherit = 'saas_server.plan'
pricing_ids = fields.Many2many('saas_pricing.price', 'saas_pricing_plan')
diff --git a/saas_pricing/views/saas_pricing.xml b/saas_pricing/views/saas_pricing.xml
index 201b19dd1..814c17ef5 100644
--- a/saas_pricing/views/saas_pricing.xml
+++ b/saas_pricing/views/saas_pricing.xml
@@ -36,8 +36,8 @@
- saas_portal.plans.form.inherit
- saas_portal.plan
+ saas_server.plans.form.inherit
+ saas_server.plan
diff --git a/saas_server/models/saas_server.py b/saas_server/models/saas_server.py
index 54e32e9ca..a943ef731 100644
--- a/saas_server/models/saas_server.py
+++ b/saas_server/models/saas_server.py
@@ -4,6 +4,7 @@
from openerp.addons.saas_utils import connector, database
import psycopg2
+
def get_size(start_path='.'):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
diff --git a/saas_support/__init__.py b/saas_support/__init__.py
new file mode 100644
index 000000000..bfeac55da
--- /dev/null
+++ b/saas_support/__init__.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010, 2014 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
diff --git a/saas_support/__openerp__.py b/saas_support/__openerp__.py
new file mode 100644
index 000000000..7814ee02b
--- /dev/null
+++ b/saas_support/__openerp__.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010, 2014 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+{
+ 'name': 'Saas Support',
+ 'version': '0.1',
+ 'author': 'OpenJAF',
+ 'website': 'http://www.openjaf.com',
+ 'category': 'Integration',
+ 'description': """
+ Live support
+ """,
+ 'depends': [],
+ 'data': [
+ 'view/support.xml',
+ ],
+ 'installable': True
+}
diff --git a/saas_support/view/support.xml b/saas_support/view/support.xml
new file mode 100644
index 000000000..a2c77e06a
--- /dev/null
+++ b/saas_support/view/support.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/saas_utils/connector.py b/saas_utils/connector.py
index 3acdc2578..fa792ca33 100644
--- a/saas_utils/connector.py
+++ b/saas_utils/connector.py
@@ -27,4 +27,4 @@ def call(dbname, model, method, *args, **kwargs):
with instance.cursor() as cr:
obj = instance.get(model)
if hasattr(obj, method):
- return getattr(obj, method)(cr, SUPERUSER_ID, *args)
+ return getattr(obj, method)(cr, SUPERUSER_ID, *args, **kwargs)
diff --git a/saas_utils/database.py b/saas_utils/database.py
index b54d76b8c..1dd977737 100644
--- a/saas_utils/database.py
+++ b/saas_utils/database.py
@@ -27,7 +27,7 @@
def db_monodb(httprequest=None):
db = db_monodb_org(httprequest)
if not db:
- return httprequest.host.replace('www.', '').replace('.', '_')
+ return httprequest.host.replace('.', '_')
return db
http.db_monodb = db_monodb
@@ -42,5 +42,6 @@ def get_market_dbs(with_templates=True):
dbs += [d['template'] for d in data]
icp = request.registry.get('ir.config_parameter')
bd = icp.get_param(request.cr, SI, 'saas_portal.base_saas_domain')
- dbs += [db for db in http.db_list(force=True) if db.endswith('_%s' % bd)]
+ dbs += [db for db in http.db_list(force=True)
+ if db.endswith('_%s' % bd.replace('.', '_'))]
return dbs