Giter Club home page Giter Club logo

odoo-saas-tools's Introduction

odoo-saas-tools's People

Contributors

bassn avatar borgoat avatar cmsalmeida avatar dhbahr avatar em230418 avatar englishrain avatar ffernandez-planetatic avatar hahgx avatar ilmir-k avatar jbustio avatar jeffery9 avatar kaerdsar avatar l547116382 avatar lasley avatar repodevs avatar rusllan avatar saltonmassally avatar sergiocorato avatar ufaks avatar vkhalil avatar w360s avatar ychavda avatar yelizariev avatar ygol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odoo-saas-tools's Issues

Security related addons to be ported to 8.0

@yelizariev which of these are not compatible with 8.0

ir_rule_protected - makes impossible for non-superuser admin edit\delete protected ir.rule
access_restricted - makes impossible for administrator set (and see) more access rights (groups) than he already have. (follow the link for more description)
hidden_admin - makes admin (user and partner) invisible
access_apps - allows to have administrators which don't have access to Apps
access_settings_menu - allows to show settings menu for non-admin

Cannot create client from plan

Hi, when I set the client db name and click create there's this error.
Before this, I have been able to create one client but when I clicked Log In the OAuth unique ID error was present.
Any thoughts?

Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 939, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 927, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 363, in old_api
    result = method(recs, *args, **kwargs)
  File "/mnt/odoo-saas-tools/saas_portal/models/wizard.py", line 120, in apply
    url = wizard.plan_id.create_new_database(dbname=wizard.name, partner_id=wizard.partner_id.id)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 397, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/mnt/odoo-saas-tools/saas_portal/models/saas_portal.py", line 206, in create_new_database
    server.action_sync_server()
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 397, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/mnt/odoo-saas-tools/saas_portal/models/saas_portal.py", line 116, in action_sync_server
    url = self._request_server(path='/saas_server/sync_server', state=state, client_id=self.client_id)[0]
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 397, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/mnt/odoo-saas-tools/saas_portal/models/saas_portal.py", line 86, in _request_server
    access_token = access_token[0].token
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5554, in __getitem__
    return self._browse(self.env, (self._ids[key],))
IndexError: tuple index out of range```

issue installation addon SaaS Portal - /page/start

I can not install addon SaaS Portal - /page/start in SaaS Tool for Odoo 9.

Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 599, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 636, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/odoo/openerp/http.py", line 315, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 308, in checked_call
result = self.endpoint(_a, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 887, in call
return self.method(_args, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 465, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 975, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 963, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/addons/base/module/module.py", line 459, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/opt/odoo/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/addons/base/module/module.py", line 533, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/odoo/odoo/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 337, in load_modules
loaded_modules, update_module)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/opt/odoo/odoo/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 852, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 939, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 802, in parse
self.parse(rec, mode)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 805, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 778, in _tag_template
return self._tag_record(cr, record, data_node)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 701, in _tag_record
f_val = self.id_get(cr, f_ref)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 783, in id_get
res = self.model_id_get(cr, id_str, raise_if_not_found)
File "/opt/odoo/odoo/openerp/tools/convert.py", line 794, in model_id_get
raise_if_not_found=raise_if_not_found)
File "/opt/odoo/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/addons/base/ir/ir_model.py", line 966, in xmlid_to_res_model_res_id
return self.xmlid_lookup(cr, uid, xmlid)[1:3]
File "/opt/odoo/odoo/openerp/api.py", line 232, in wrapper
return old_api(self, _args, *_kwargs)
File "", line 2, in xmlid_lookup
File "/opt/odoo/odoo/openerp/tools/cache.py", line 85, in lookup
value = d[key] = self.method(_args, *_kwargs)
File "/opt/odoo/odoo/openerp/addons/base/ir/ir_model.py", line 956, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: website.theme" while parsing None:6, near




saas_portal: certificate verify failed

Hello @yelizariev, instances of requests.get(url) fail when using a self-signed SSL or in my case one from Godaddy.

Do you think it is a good idea to stop requests.get from verifying certificates by setting verify=False?

What are your thoughts on this

[9.0] installation fail to inherit "product.variants_template_tree_view" (not in v9)

I believe "product.variants_template_tree_view" in (website_sale/views/views.xml) is not anymore in V9.

ParseError: "External ID not found in the system: product.variants_template_tree_view" while parsing /opt/odoo/custom/odoo-saas-tools/saas_portal_sale/views/product_view.xml:14, near
<record id="saas_variants_template_tree_view" model="ir.ui.view">
            <field name="name">saas_variants.template.tree</field>
            <field name="model">product.attribute.value</field>
            <field name="inherit_id" ref="product.variants_template_tree_view"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='name']" position="after">
                    <field name="saas_code_value"/>
                </xpath>
            </field>
        </record>

access rights on saas Client

I've developed set of modules on access rights (modules are not ported to 8.0 yet):

https://github.com/yelizariev/addons-yelizariev/tree/9.0/ir_rule_protected

  • makes impossible for non-superuser admin edit\delete protected ir.rule

https://github.com/yelizariev/addons-yelizariev/tree/9.0/access_restricted

  • The module makes impossible for administrator set (and see) more access rights (groups) than he already have. (follow the link for more description)

https://github.com/yelizariev/addons-yelizariev/tree/9.0/hidden_admin

  • makes admin invisible

I suggest to add ir_rule_protected and access_restricted to saas_client's dependencies and delete this rule: https://github.com/yelizariev/odoo-saas-tools/blob/f5174ed5102ef374ccef22b1acfcd9382fca505f/saas_client/security/rules.xml#L5-L11

I prefer to add hidden_admin too, but this is discussable.

LGPL License on 8.0 Branch

First, thank you to all of the developer's working on this repository, especially Ivan Yelizariev. Very happy with the features and to see the active development. We will hopefully be able to add a developer / features in the future.

The license file listed in the 8.0 branch is LGPLv3. Odoo 8.0 is released under the AGPLv3 license. LGPLv3 is NOT compatible with AGPLv3. The only license compatible with AGPLv3 is AGPLv3 and GPLv3

For AGPLv3 and GPLv3 compatibility see:
https://en.wikipedia.org/wiki/Affero_General_Public_License
Section 13 of the AGPLv3 (http://www.gnu.org/licenses/agpl.html)

Highly recommend changing the 8.0 branch license to GPLv3 and keeping the 9.0 branch LGPLv3


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ImportError: No module named exceptions

On branch 8.0-dev #a29cc4a
File "/opt/openerp-8.0/odoo-saas-tools/saas_portal/controllers/init.py", line 1, in
import main
File "/opt/openerp-8.0/odoo-saas-tools/saas_portal/controllers/main.py", line 8, in
from openerp.addons.saas_base.exceptions import MaximumDBException
ImportError: No module named exceptions

Create template DB button error: False werkzeug

Hi!

We have the following setup:
domain.com and sub.domain.com proxied by nginx to the same Odoo instance but each running their own database.

Configuration file:

[options]
admin_passwd = <PASS>
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons
logfile = /var/log/odoo/odoo-server.log
addons_path=/opt/odoo/odoo-server/addons,/opt/odoo/custom/addons
dbfilter = %h
smtp_server = False

Nginx configuration:

server {
    listen 80;
    server_name sub.domain.com;
    location / {
        proxy_pass http://sub.domain.com:8069;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

After I press the red "Create template DB" button in the 6th step - "Create Plan" I get "Warning: Status Code - 500
Reason - INTERNAL SERVER ERROR".
Error also appears without Nginx proxy.

Log excerpt:

2015-11-26 12:07:22,493 28769 INFO test_14 werkzeug: 10.0.1.2 - - [26/Nov/2015 12:07:22] "GET /saas_server/new_database?access_token=YT5DobJ3rVobuN3a2bHDI9B2hdCVMZ&expires_in=3600&token_type=Bearer&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+%22Europe%2FBerlin%22%2C+%22d%22%3A+%22test_14%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fsub.domain.com%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=24695098-9436-11e5-81eb-00155dfe7603&scope=userinfo+force_login+trial+skiptheuse HTTP/1.0" 200 -
2015-11-26 12:07:22,506 28769 INFO domain.com requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): sub.domain.com
2015-11-26 12:07:22,513 28769 INFO sub.domain.com openerp.addons.saas_server.controllers.main: sync_server post: {'access_token': u'PviQZ2TWQ0MgoP6NelSbOq0GlxcO0h', 'expires_in': u'3600', 'token_type': u'Bearer', 'state': u'{"d": "sub.domain.com", "client_id": "5f49c05e-8ed6-11e5-8003-00155dfe7603"}', 'redirect_uri': u'http://sub.domain.com:80/web', 'response_type': u'token', 'client_id': u'5f49c05e-8ed6-11e5-8003-00155dfe7603', 'scope': u'userinfo force_login trial skiptheuse'}
2015-11-26 12:07:22,531 28769 INFO domain.com werkzeug: 10.0.1.2 - - [26/Nov/2015 12:07:22] "GET /oauth2/tokeninfo?access_token=PviQZ2TWQ0MgoP6NelSbOq0GlxcO0h HTTP/1.0" 200 -
2015-11-26 12:07:22,542 28769 INFO t1.domain.com openerp.modules.loading: loading 1 modules...
2015-11-26 12:07:22,550 28769 INFO t1.domain.com openerp.modules.loading: 1 modules loaded in 0.01s, 0 queries
2015-11-26 12:07:22,560 28769 INFO t1.domain.com openerp.modules.loading: loading 24 modules...
2015-11-26 12:07:22,567 28769 INFO t1.domain.com openerp.modules.loading: 24 modules loaded in 0.01s, 0 queries
2015-11-26 12:07:22,839 28769 INFO t1.domain.com openerp.modules.loading: Modules loaded.
2015-11-26 12:07:22,852 28769 INFO False werkzeug: 10.0.1.2 - - [26/Nov/2015 12:07:22] "GET /saas_server/sync_server?access_token=PviQZ2TWQ0MgoP6NelSbOq0GlxcO0h&expires_in=3600&token_type=Bearer&state=%7B%22d%22%3A+%22sub.domain.com%22%2C+%22client_id%22%3A+%225f49c05e-8ed6-11e5-8003-00155dfe7603%22%7D&redirect_uri=http%3A%2F%2Fsub.domain.com%3A80%2Fweb&response_type=token&client_id=5f49c05e-8ed6-11e5-8003-00155dfe7603&scope=userinfo+force_login+trial+skiptheuse HTTP/1.0" 500 -
2015-11-26 12:07:22,853 28769 ERROR domain.com openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/opt/odoo/odoo-server/openerp/http.py", line 537, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo-server/openerp/http.py", line 574, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo-server/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-server/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-server/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/custom/addons/saas_portal/models/saas_portal.py", line 288, in create_template
    return self.action_sync_server()
  File "/opt/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 416, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/opt/odoo/custom/addons/saas_portal/models/saas_portal.py", line 292, in action_sync_server
    self.server_id.action_sync_server()
  File "/opt/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 416, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/opt/odoo/custom/addons/saas_portal/models/saas_portal.py", line 109, in action_sync_server
    raise Warning(msg)
Warning: Status Code - 500
Reason - INTERNAL SERVER ERROR
URL - http://sub.domain.com:80/saas_server/sync_server?access_token=PviQZ2TWQ0MgoP6NelSbOq0GlxcO0h&expires_in=3600&token_type=Bearer&state=%7B%22d%22%3A+%22sub.domain.com%22%2C+%22client_id%22%3A+%225f49c05e-8ed6-11e5-8003-00155dfe7603%22%7D&redirect_uri=http%3A%2F%2Fsub.domain.com%3A80%2Fweb&response_type=token&client_id=5f49c05e-8ed6-11e5-8003-00155dfe7603&scope=userinfo+force_login+trial+skiptheuse

2015-11-26 12:07:22,855 28769 INFO domain.com werkzeug: 10.0.1.2 - - [26/Nov/2015 12:07:22] "POST /web/dataset/call_button HTTP/1.0" 200 -
2015-11-26 12:07:22,864 28769 ERROR False werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/service/server.py", line 290, in app
    return self.app(e, s)
  File "/opt/odoo/odoo-server/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/http.py", line 1290, in __call__
    return self.dispatch(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo-server/openerp/http.py", line 1437, in dispatch
    result = ir_http._dispatch()
  File "/opt/odoo/odoo-server/addons/website/models/ir_http.py", line 148, in _dispatch
    resp = super(ir_http, self)._dispatch()
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_http.py", line 175, in _dispatch
    return self._handle_exception(e)
  File "/opt/odoo/odoo-server/addons/website/models/ir_http.py", line 196, in _handle_exception
    return super(ir_http, self)._handle_exception(exception)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_http.py", line 145, in _handle_exception
    return request._handle_exception(exception)
  File "/opt/odoo/odoo-server/openerp/http.py", line 666, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_http.py", line 171, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo-server/openerp/http.py", line 684, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo/odoo-server/openerp/http.py", line 310, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/http.py", line 307, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-server/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-server/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/custom/addons/saas_server/controllers/main.py", line 233, in stats
    request.env['saas_server.client'].update_all()
  File "/opt/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/custom/addons/saas_server/models/saas_server.py", line 188, in update_all
    self.sudo().search([]).update()
  File "/opt/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 416, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/opt/odoo/custom/addons/saas_server/models/saas_server.py", line 193, in update
    registry = self.registry()[0]
  File "/opt/odoo/odoo-server/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/api.py", line 416, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/opt/odoo/custom/addons/saas_server/models/saas_server.py", line 58, in registry
    return m.get(self.name, **kwargs)
  File "/opt/odoo/odoo-server/openerp/modules/registry.py", line 339, in get
    update_module)
  File "/opt/odoo/odoo-server/openerp/modules/registry.py", line 356, in new
    registry = Registry(db_name)
  File "/opt/odoo/odoo-server/openerp/modules/registry.py", line 60, in __init__
    self._db = openerp.sql_db.db_connect(db_name)
  File "/opt/odoo/odoo-server/openerp/sql_db.py", line 623, in db_connect
    db, uri = dsn(to)
  File "/opt/odoo/odoo-server/openerp/sql_db.py", line 597, in dsn
    if db_or_uri.startswith(('postgresql://', 'postgres://')):
AttributeError: 'bool' object has no attribute 'startswith'

Bug on template creation

Hi, first of all, thanks for your awesome work, I just discovered this 1 week ago and I'm testing for the first time today.

I have problems when my first template is created, when I click log in, there isn't any modules that shows in menu :
screen shot 2015-10-02 at 18 43 04

and when i force the settings menu with local modules to open and try to install one, Odoo says that I haven't the rights to do this :

screen shot 2015-10-02 at 18 45 05

am I doing anything wrong?

Best regards

Better Exception Handling for saas_portal and saas_server

At the moment exceptions raised by actions within saas_portal produces unhelpful error reporting with mostly "Internal Server Error" + unhelpful stack trace being shown and captured by logging.

Can we discuss how we can firstly:

  • Ensure that proper message is sent to the UI
  • Python logging captures the actual error raised on the server side

Cannot cleanly delete a client instance

I have tried to 'Edit' a client and change the status from 'In Progress' to 'Deleted' the saving.
Thereafter if click on 'Sync Server' it reverts back to 'In Progress'.
Why is this?

When I manually delete the records in the SaaS Server and SaaS Portal, I usually get the following error:

File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5554, in __getitem__ return self._browse(self.env, (self._ids[key],)) IndexError: tuple index out of range


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Create a Docker image

Hi, I've been trying to work with this repo for a while, but as it's a complex and important one, I think we should try to have a more straightforward way to start using it.

In my experience, Docker helps to avoid dependencies or OS misconfiguration problems and a common base that avoids problems for different versions of programs or plataform.

So, I'd like to propose the creation of a Dockerfile and then a Docker image that we all can share an use.

If you like, I can create the first dockerfile and do a PR, or you can create a dummy file that I can fill in.

What do you think?

Daniel.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

SaaS Stats

Extend saas to gather statistics from client databases, and keep history to build reports by hour/day/week and so on.

Suggested statistics:

  • Count users: users_len (existent)
  • File storage (MB): file_storage (existent)
  • DB storage (MB): db_storage (existent)
  • Data in: input_data_transfer (we are using nginx maybe better to get from it, but check alternatives)
  • Data out: output_data_transfer
  • DB requests: db_requests
  • Installed modules: modules_number, number of installed modules

Gather statistics:

  • This statistics should be created by each client, and gathered in main saas database:
    • periodically by scheduler, or ...
    • or... receiving from each client by event

Reports

  • Create a Report Dashboard to show relevant graphs and reports in client side
  • Create a Report Dashboard to show relevant graphs and reports in main database

Suggestions and guidelines?

WIP in ThinkOpen Solutions fork...

Portal_templates calls create_new_database

After selecting a plan at: domain.etc/saas_portal_templates/select-template there is a redirect to: saas_portal_templates/new_database?plan_id=XX

and error occurs: SaasPortal (extended by SaasPortalDemo, SaasPortal' object has no attribute 'create_new_database'
file: ....../addons/saas_portal_templates/controllers/main.py", line 32:
return self.create_new_database(plan_id)

tested on V9, but probably same at V8 too, as I've seen in the code that create_new_database was moved to SaasPortalPlan by commit yelizariev@b31ebf7

also when when user is not signed in, then "return login_redirect() at line 28" is not yet working too.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

'OAuth UID must be unique per provider'

I also receive the "Status Code - 404
Reason - NOT FOUND URL - http://s1.odoo.local:8069/saas_server/new_database?" error when I click the create template database.

I have followed Ivan's instruction and read all the support docs including the "issue in step6 (https://github.com/yelizariev/odoo-saas-tools/issues/14#issuecomment-134554742)" religiously, but still cannot solve the problem.

It was told that we may "....changed the apache config so that it will pass host header and it works." but I have change and try so many settings based on the instruction (http://httpd.apache.org/docs/2.2/vhosts/examples.html) but still getting the same error:

I try modify apache's /site-available/000-default.conf by adding

ProxyPreserveHost On
ProxyPass / http://0.0.0.0:8069/
ProxyPassReverse / http://0.0.0.0:8069/
ServerName localhost

I replace the server name with ip or real domain name, also the 0.0.0.0 with ip address or real domain name, adding different port 8069, 8070 etc, or add /saas_server/new_database to the list and etc but none of them working. I still getting the same 404 not found.

Is it possible to add the web server setting into this instruction? Thank you.

Error message when try to save the template database:

File "/opt/odoo/addons/saas_portal/models/saas_portal.py", line 292, in create_template
raise Warning(msg)
Warning: Status Code - 404
Reason - NOT FOUND
URL - http://s1.odoo.local:8069/saas_server/new_database?access_token=FiR3IICuQe93NFC8OdjtTluHFD1FhM&expires_in=3600&token_type=Bearer&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+false%2C+%22d%22%3A+%22t2.paulfan.net%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fs1.paulfan.net%3A8069%2Fsaas_server%2Fnew_database&response_type=token&client_id=e593331c-6167-11e5-8546-04016e5a6f01&scope=userinfo+force_login+trial+skiptheuse

I also skipped the step 6 through 9 and go directly went to the "page/start" page on the URL, then doing that, I got the 500 Internal Server error:

500: Internal Server Error
Error
Error message:
There is no plan configured
Traceback

I think this is because the template database cannot be saved on the previous steps / or something else. I appreciate if you could help on this. Thank you very much in advance : )

error with the saas client module

once we have the saas client module installed or once it installed automatically on creating new client we encounter the error below and it does not enable us to open the settings menu.

Uncaught TypeError: Cannot read property 'push' of undefined
http://mic-db.thrivecloud.com.ng/web/content/264-cc12905/web.assets_backend.js:4046
Traceback:
TypeError: Cannot read property 'push' of undefined
at OdooClass.dashboard.Dashboard.include.init (http://mic-db.thrivecloud.com.ng/web/content/264-cc12905/web.assets_backend.js:4046:234)
at OdooClass.init (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:2535:616)
at OdooClass.Class (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:2533:65)
at Object.ir_actions_common.widget (http://mic-db.thrivecloud.com.ng/web/content/264-cc12905/web.assets_backend.js:3128:57)
at Object. (http://mic-db.thrivecloud.com.ng/web/content/264-cc12905/web.assets_backend.js:3125:191)
at Object. (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:650:681)
at fire (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:644:299)
at Object.self.add as done
at Array. (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:650:649)
at Function.jQuery.extend.each (http://mic-db.thrivecloud.com.ng/web/content/261-a23fc50/web.assets_common.js:473:767)

this error shows once you click on the settings menu. We installed the saas client module from the 9.0dev..

Thanks

Async jobs

I'm going to add async jobs for database creation and server syncronysation. Odoo connector https://github.com/OCA/connector is the best tool to do it, but it force us to use agpl license

What are your thoughts?

As for me I agree to switch to agpl

new branches

Dear developers.
Thank you for your contribution.

I'd like to inform you, that now repo has 3 branches:

Regards,
Ivan

saas_client javascript

I pushed a commit with a variant to show well the message in a fresh database. There is a little problem, the javascript functions can't be inherited because the addon saas_client is server_wide and loads first than the addon mail. We can call the mail javascript function first but later will be executed again. Tell me if you want we look for a more elegant solution to this issue.

issue in step 6: Create plan

I've done configuration upto step 5. but in step 6 whenever i try to Create template DB then new window will open and it gives 404 not found error.
odoo log:
2015-08-24 07:54:43,938 30006 INFO odoo.local werkzeug: 127.0.0.1 - - [24/Aug/2015 07:54:43] "GET /oauth2/auth?scope=userinfo+force_login+trial+skiptheuse&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+%22Asia%2FCalcutta%22%2C+%22d%22%3A+%22t1.odoo.local%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fs1.odoo.local%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=1b62941e-4a35-11e5-b08b-00e04c049539 HTTP/1.1" 302 -
2015-08-24 07:54:43,954 30006 INFO None werkzeug: 127.0.0.1 - - [24/Aug/2015 07:54:43] "GET /saas_server/new_database HTTP/1.1" 404 -

XML-RPC for server-wide connection

I think we can use built-in xmlrpc to Portal->Server request instead of current GET request with oauth2 authentication.

XMLRPC use raw login-password authentication, but over https it should be safe enough.

Such refactoring allows to check access rights in Portal side rather than in Servers. Also it should simplify code in general.

Technically, we have to move most code from saas_server/controllers/main.py to saas_server/models/saas_server.py and in saas_portal make calls like this:

url = <insert server URL>
db = <insert database name>
username = 'admin'
password = <insert password for your admin user (default: admin)>
import xmlrpclib
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
models.execute_kw(db, uid, password,
    'saas_server.client', 'new_database',
    args, kwargs)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

saas_server.saas_oauth_provider

I have a bad feeling about reference for oauth provider.
It's created in saas_server module

<data noupdate="1">
    <record id="saas_oauth_provider" model="auth.oauth.provider">
        <field name="name">SaaS</field>
        <field name="auth_endpoint">http://odoo.local/oauth2/auth</field>
        <field name="scope">userinfo</field>
        <field name="validation_endpoint">http://odoo.local/oauth2/tokeninfo</field>
        <field name="data_endpoint"></field>
        <field name="css_class">zocial openerp</field>
        <field name="body">Log in via SaaS Portal</field>
        <field name="enabled" eval="True"/>
    </record>
</data>

Then we copy it with the same ID to template DB:

        client_env['ir.model.data'].create({
            'name': 'saas_oauth_provider',
            'module': 'saas_server',
            'noupdate': True,
            'model': 'auth.oauth.provider',
            'res_id': oauth_provider.id,
        })

And then use it in Client database

_defaults = {
    'oauth_provider_id': lambda self,cr,uid,ctx=None: self.pool['ir.model.data'].xmlid_to_res_id(cr, SI, 'saas_server.saas_oauth_provider')
}

If someone occasionally install saas_server in template or client database and then uninstall one, the record saas_server.saas_oauth_provider would be deleted too.

The purpose of saas_pricing

@yelizariev I am yet to understand the purpose of saas_pricing; I am working on integrating accounting and invoicing with saas_portal and would like to base it off saas_pricing. Can you please explain the thought process behind this addon. thanks

[9.0] [Query] client expiration & email validation

I saw two different validation in odoo saas on odoo.com.

  1. They give free trial for 4 hours & wait for email validation.
  2. Once email is validated they give 15 days trial.

Now on this repo with 9.0 branch i can find logic for expiration which affects to client expiration.
My question is where can i find feature of 'email validation trial' for specific hours? If it's not there, do you have any plan to do so?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

expiration datetime

The expiration datetime is setted to a new client from the saas_portal.plan data. The command /saas_server/synch_data only get data, don't update the server. Exists any case where you need to modify the expiration_datetime of a client from saas_portal to update in saas_server?

Multiple Log In Session Expired

Hello,

Two different people are not allowed to enter client db using same OAuth.

One of the sessions gets expired.

However if we give a password to the user and enter without using OAuth this doesn't happen.

Best regards,

SaaS Base

I'm working on a saas_base addon to collect base models in saas solution.

Maybe we need also a saas_server.database model because a template database is not a client, it's just a database. Anyway it has a client_id field like saas_portal.database. The difference is we don't have an oauth.application on a server.

We have 3 concepts:

  • Client for authentication
  • Physical database
  • Client in SaaS

Maybe we can join oauth.application and saas_x.database in a single model and on saas_portal create the specific _get_last_connection method. I can create in saas_base module 3 or 2 AbstractModels and in saas_portal and saas_server use the AbstractModels to create the local models. This allow to put in one place the common fields and also some behaviour.

I'm testing now on my code, it can do it quickly. Tell me if your consider something different about this design. I reached this point trying to call _create_new_database from create_template in saas_portal.plan as you request me. Also I'm still doing a review to many lines of code you created and I'm discovering now.

[8.0] Error in step 6

Hi, I have got error when executing step 6, here is the error

ConnectionError: HTTPConnectionPool(host='s1.mydomain.com', port=80): Max retries exceeded with url: /saas_server/new_database?access_token=IjOZGEFNs0EtM5lpE38wokyZ70h7sr&expires_in=3600&token_type=Bearer&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+false%2C+%22d%22%3A+%22t1.mydomain.com%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fs1.mydomain.com%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=8681a668-cbe0-11e5-9cc4-001851ac713c&scope=userinfo+force_login+trial+skiptheuse (Caused by <class 'socket.error'>: [Errno 111] Connection refused)

any help will be appreciated

Migrate to the OCA repositories

Hi, my name is Daniel and I'm the OCA representative for Ecuador.

I'd like to invite you to join us and migrate your code to the OCA repos. Here you will gain exposure to your project and more important, you will get help from other OCA members and a wide comunity.

Would you like to join us?

Daniel.

ConnectionError

When I click the button "Sync Server":

Traceback (most recent call last):
File "/opt/openerp/server/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/openerp/server/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/openerp/server/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/openerp/server/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/openerp/server/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/openerp/server/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/openerp/server/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/openerp/server/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/openerp/server/openerp/api.py", line 394, in old_api
result = new_api(recs, _args, *_kwargs)
File "/opt/openerp/server/openerp/api.py", line 398, in new_api
result = [method(rec, _args, *_kwargs) for rec in self]
File "/opt/openerp/oscg/saas/saas_portal/models/saas_portal.py", line 97, in action_sync_server
res = requests.get(url)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', BadStatusLine("''",))

idea how to impove SaasConfig

Instead of field database_id in saas.config model

database_id = fields.Many2one('saas_portal.client', string='Database', default=_default_database_id)

it could be

line_ids = fields.One2many('saas.config.line', string='Databases')

Where

SaasConfigLine(models.Model):
     base_id = fields.Many2one('saas.config')
     database_id = fields.Many2one('saas_portal.client', string='Database', default=_default_database_id)

So, administrator will be able to configure several database at once.

questions?

please check attach screenshot
http://awesomescreenshot.com/06a593xw0c

i have created one template and running successfully,

what i have to select in that drop down to create other templates so that oauth works? whatever i am selecting in the dropdown it is applying that outh id to database uuid and conflicting in duplicate UUID?

what am i doing wrong? even in your instructions you have not listing anything about that dropdown?

SaaS Portal sale shop flow

The shop sale flow is not straight, from start to creation of client database. The way it is requires client to remember to go back to shop at some point to finish process.
I've done a drawing explaining that.
I'll create a WIP PR...

Error while sync server and creating template db

I'm getting error while sync server and creating template db.
I've used db-filter=%d.
create two database:
portal-> domain: portal.odoo.local
server->domain: server.odoo.local
I've installed all the required modules according to database.(either server or portal) and
change the config form Apache to nginx.(as per last issue: issue in step 6: Create plan #14 )
my odoo log:

Odoo Server Error
Traceback (most recent call last):
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/home/mrugank/odoo-dev/odoo/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/home/mrugank/odoo-dev/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 363, in old_api
result = method(recs, _args, *_kwargs)
File "/home/mrugank/odoo-dev/working_saas/odoo-saas/saas_portal/models/saas_portal.py", line 286, in create_template
res = requests.get(url, verify=(plan.server_id.request_scheme == 'https' and plan.server_id.verify_ssl))
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get
return request('get', url, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
r = adapter.send(request, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
raise ConnectionError(e)
ConnectionError: HTTPConnectionPool(host='server', port=80): Max retries exceeded with url: /saas_server/new_database?access_token=0T3M5u1L8C8q1EYslD5tPN5hwV3IEZ&expires_in=3600&token_type=Bearer&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+%22Asia%2FCalcutta%22%2C+%22d%22%3A+%22template%22%2C+%22demo%22%3A+1%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fserver%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=ba45bd2a-594b-11e5-84a5-00e04c049539&scope=userinfo+force_login+trial+skiptheuse (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)

Is this module compatible with db-filter : %d.
because in portal database under settings/Configuration/SaaS Portal Setting I've specified Base SaaS domain as portal.odoo.local(in your example it was odoo.local).

Template DB inheritance Mechanism

Template DBs can grow very complex but much to often I find out that I have 5 or so steps common with the setting up of these DB. I think a cool feature would be for template DB to inherit from another template DB... what are your thoughts on this and how best do you think it could be implemented

Error installing Saas Server module

Trying to install in Ubuntu 14.04 64bit
This is the bug report:

OpenERP Server Error

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 500, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 517, in dispatch
result = self._call_function(*_self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 283, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 280, in checked_call
return self.endpoint(_a, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 733, in call
return self.method(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 376, in response_wrap
response = f(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 952, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
return old_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 450, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
return old_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 498, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 340, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 358, in load_modules
loaded_modules, update_module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 263, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 149, in load_module_graph
load_openerp_module(package.name)
File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 312, in load_openerp_module
import('openerp.addons.' + module_name)
File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 77, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/usr/lib/python2.7/dist-packages/openerp/addons/saas_server/init.py", line 2, in
import models
File "/usr/lib/python2.7/dist-packages/openerp/addons/saas_server/models/init.py", line 1, in
import saas_server
File "/usr/lib/python2.7/dist-packages/openerp/addons/saas_server/models/saas_server.py", line 16, in
print get_size()
File "/usr/lib/python2.7/dist-packages/openerp/addons/saas_server/models/saas_server.py", line 13, in get_size
total_size += os.path.getsize(fp)
File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
return os.stat(filename).st_size
OSError: [Errno 13] Permiso denegado: './etc/cron.d/.placeholder'

Warning: Status Code - 404

when I click create template DB
and the problem is

Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/addons/web/controllers/main.py", line 952, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/addons/web/controllers/main.py", line 940, in _call_kw
return checked_call(request.db, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 939, in checked_call
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 372, in old_api
result = method(recs, _args, *_kwargs)
File "/opt/odoo/addons/saas_portal/models/saas_portal.py", line 292, in create_template
raise Warning(msg)
Warning: Status Code - 404
Reason - Not Found
URL - http://s1.odoo.local:80/saas_server/new_database?access_token=YolFUqTObnLWNjeaMUv8g8KOFpoEaj&expires_in=3600&token_type=Bearer&state=%7B%22lang%22%3A+%22zh_CN%22%2C+%22tz%22%3A+false%2C+%22d%22%3A+%22ti.odoo.local%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fs1.odoo.local%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=0dc7b49a-716f-11e5-bafa-00155d17010f&scope=userinfo+force_login+trial+skiptheuse

how can I fix it

[9.0] 'oauth.application' object has no attribute '_get_access_token

Just being curious.. I've updated sources and after I've tried to add second test server to the portal, odoo raised an error:

Odoo Server Error
Traceback (most recent call last):
....
File "/opt/odoo/odoo/odoo-saas-tools/saas_portal/models/saas_portal.py", line 48, in create
self.oauth_application_id._get_access_token(create=True)
AttributeError: 'oauth.application' object has no attribute '_get_access_token'

Any idea why that can happen?

saas portal

when I try to install saas portal, the error of this in the attached image.
odoo erro

error when installing saas_portal

Hi, when I'm install saas_portal it gives me this error

Traceback (most recent call last):
File "/opt/odoo_saas/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo_saas/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo_saas/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo_saas/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo_saas/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo_saas/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/opt/odoo_saas/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo_saas/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo_saas/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo_saas/openerp/api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo_saas/openerp/addons/base/module/module.py", line 447, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/opt/odoo_saas/openerp/api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo_saas/openerp/addons/base/module/module.py", line 495, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/odoo_saas/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo_saas/openerp/modules/loading.py", line 355, in load_modules
loaded_modules, update_module)
File "/opt/odoo_saas/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/odoo_saas/openerp/modules/loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/opt/odoo_saas/openerp/modules/loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo_saas/openerp/tools/convert.py", line 901, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo_saas/openerp/tools/convert.py", line 987, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo_saas/openerp/tools/convert.py", line 853, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "/opt/odoo_saas/openerp/tools/convert.py", line 693, in _tag_record
model = self.pool[rec_model]
File "/opt/odoo_saas/openerp/modules/registry.py", line 102, in getitem
return self.models[model_name]
ParseError: "mail.template" while parsing /opt/odoo_saas/odoo-saas-tools/saas_portal/data/mail_template_data.xml:3, near

Send SaaS credentials to the buyer of the SaaS
${(object.user_id.email or '')|safe}
Credentials:
${object.partner_id.id}


${object.partner_id.lang}

        &lt;p&gt;Web:
        &lt;a href="http://${object.name}"&gt;http://${object.name}&lt;/a&gt;
        &lt;/p&gt;

        </field>
    </record>

Thanks before

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.