it-projects-llc / odoo-saas-tools

Odoo SaaS Tools — tools for SaaS Businesses. Sale and manage Odoo databases.
https://saas.it-projects.info
GNU Lesser General Public License v3.0
558 stars 577 forks source link

Unable to create new database #254

Open dalareo opened 8 years ago

dalareo commented 8 years ago

I'm able to install the app and appears to run nice but... no database can be created using:

http://saas-portal-9.local/page/start

No error is thrown in the terminal. I am using Odoo last version from official Github repo and Ubuntu 15.10

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/33202037-unable-to-create-new-database?utm_campaign=plugin&utm_content=tracker%2F3643037&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F3643037&utm_medium=issues&utm_source=github).
yelizariev commented 8 years ago

Try http://saas-portal-9.local/page/start?plan_id=1

dalareo commented 8 years ago

I enter that URL in the browser and choose "client-001" as the database name. In the terminal I get:

4/May/2016 16:27:44] "GET /page/start?plan_id=1&base_saas_domain=saas-portal-9.local¬odoo_db_name=client-001 HTTP/1.0" 200 -

But no database is created and I still get the same content on the screen ;((

dalareo commented 8 years ago

I don't know it it can help but when accesing with admin:admin credentials to http://saas-portal-9.local I check SaaS menu and get this error when trying to create a client:

Odoo Server Error

Traceback (most recent call last): File "/home/usuario/Software/odoo/openerp/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/usuario/Software/odoo/openerp/http.py", line 680, in dispatch result = self._call_function(_self.params) File "/home/usuario/Software/odoo/openerp/http.py", line 316, in _call_function return checked_call(self.db, args, _kwargs) File "/home/usuario/Software/odoo/openerp/service/model.py", line 118, in wrapper return f(dbname, _args, _kwargs) File "/home/usuario/Software/odoo/openerp/http.py", line 309, in checked_call result = self.endpoint(_a, _kw) File "/home/usuario/Software/odoo/openerp/http.py", line 959, in call return self.method(_args, _kw) File "/home/usuario/Software/odoo/openerp/http.py", line 509, in response_wrap response = f(_args, _kw) File "/home/usuario/Software/odoo/addons/web/controllers/main.py", line 892, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/usuario/Software/odoo/addons/web/controllers/main.py", line 884, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, _kwargs) File "/home/usuario/Software/odoo/openerp/api.py", line 250, in wrapper return old_api(self, _args, _kwargs) File "/home/usuario/Software/odoo/openerp/api.py", line 381, in old_api result = method(recs, _args, _kwargs) File "/home/usuario/Software/odoo/openerp/models.py", line 6062, in onchange newval = record[name] File "/home/usuario/Software/odoo/openerp/models.py", line 5739, in getitem return self._fields[key].get(self, type(self)) File "/home/usuario/Software/odoo/openerp/fields.py", line 831, in get self.determine_draft_value(record) File "/home/usuario/Software/odoo/openerp/fields.py", line 944, in determine_draft_value self._compute_value(record) File "/home/usuario/Software/odoo/openerp/fields.py", line 880, in _compute_value getattr(records, self.compute)() File "/home/usuario/Software/odoo/openerp/api.py", line 248, in wrapper return new_api(self, _args, *_kwargs) File "/home/usuario/Software/odoo-saas-tools/saas_portal_sale/models/saas_portal.py", line 56, in _handle_paid_invoices client_obj.expiration_datetime = datetime.strptime(client_obj.create_date, DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(hours=client_obj.plan_id.expiration) # for trial TypeError: strptime() argument 1 must be string, not bool

yelizariev commented 8 years ago

Probably you need to set expiration field in Plan

dalareo commented 8 years ago

Plan state is "draft" and I cannot find the way to activate it. Changing expiration hours from 0 (default value) to 10 throws the same error. I am using last Odoo 9 version from Github.

yelizariev commented 8 years ago

@iledarn check the this error, because it's related to your module saas_portal_sale

iledarn commented 8 years ago

@dalareo ,

Try to create new Plan by following this https://github.com/iledarn/odoo-saas-tools/blob/9.0/docs/install.rst. Plan shouldn't be 'draft'. I really don't see why client_obj.create_date should be bool as it has stated in the log. I have tried myself and everything works.

dalareo commented 8 years ago

I will definetively follow with exquisite detail all the indications here (https://github.com/yelizariev/odoo-saas-tools) and will come back with the results.