GithubHelp home page GithubHelp logo

it-projects-llc / saas-addons Goto Github PK

View Code? Open in Web Editor NEW
143.0 40.0 170.0 856 KB

Odoo modules for SaaS Businesses. Sale and manage Odoo databases.

Home Page: https://saas.it-projects.info

Python 91.51% HTML 1.73% CSS 1.07% JavaScript 5.69%

saas-addons's Introduction

saas-addons's People

Contributors

bykovvik avatar em230418 avatar gaeltorrecillas avatar i18n-bot avatar ilmir-k avatar itpp-bot avatar kaadevelop 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

saas-addons's Issues

Do not create a database locally

I would like to know if the module already allows the creation of a local database, if yes what is the procedure for creating a database locally.

I'm trying to create a local database and I can't,
the database is created in the saas.template.operator model but remains in the creating state, and when I try to build it I get the message "There are no ready template's deployments. Create new one or wait until it's done." as an answer.

I would appreciate your help on how to resolve this error in creating a database locally.

Migration to 16.0

Thank you for your excellent work for this contribution
Are you planning a migration to 16.0 and if so can we help?
I have already started to migrate... to version 16.0 but I will probably need the help of the community
Can you open a new 16.0 branch to contribute, or is that not in the goals?

Thanks

bug in backup

when i press on backup button this error happen

Traceback (most recent call last):
File "/mnt/extra-addons/queue_job/controllers/main.py", line 104, in runjob
self._try_perform_job(env, job)
File "/mnt/extra-addons/queue_job/controllers/main.py", line 36, in _try_perform_job
job.perform()
File "/mnt/extra-addons/queue_job/job.py", line 517, in perform
self.result = self.func(*tuple(self.args), **self.kwargs)
File "/mnt/extra-addons/saas_backups/models/saas_db_backup.py", line 57, in _create_backup_job
res = self.origin_build_id.operator_id._create_backup(self.origin_build_id.name)
File "/mnt/extra-addons/saas/models/saas_operator.py", line 183, in _create_backup
return self._create_backup_internal(db_name)
File "/mnt/extra-addons/saas/models/saas_operator.py", line 179, in _create_backup_internal
return cluster.create_backup(db_name)
File "/mnt/extra-addons/saas_cluster_simple/main.py", line 132, in create_backup
db.dump_db(db_name, f)
File "", line 2, in dump_db
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 41, in if_db_mgt_enabled
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 245, in dump_db
odoo.tools.exec_pg_command(*cmd)
File "/usr/lib/python3/dist-packages/odoo/tools/misc.py", line 133, in exec_pg_command
raise Exception('Postgres subprocess %s error %s' % (args2, rc))
Exception: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpfgx_f4u1/dump.sql', 'smart') error 1

Odoo Instance Creation Problem via Virtual Store

Hi everyone,

I would like to ask for help with a problem I am facing when creating Odoo instances via the Virtual Store.

I am using Odoo v15 on Ubuntu 20.04. When I create an instance as an administrator, it works perfectly. However, when I create one via the Virtual Store, in trial mode, it does not work.

I have tried creating one with a template and with an App, and the error is the same. The system creates the base that the client requested, but it remains in draft. When I access the "Job Queue" menu,
I see that the process has failed.

contract.contract._create_build contract.contract
Failed 13/09/2023 10:01:10
0,00

ValueError Invalid field res.users.is_excluded_from_limiting in leaf ('is_excluded_from_limiting', '=', False) b1843627-7ac7-4d9e-ac45-3f4347dd63be

PS. I added the code as per "Update auth_signup.py to fix #126 #132"
But the error persists

Error:

Exception Information
Exception:ValueError
Traceback (most recent call last):
File "/opt/wsolut/addons_queue-saas/queue_job/controllers/main.py", line 104, in runjob
self._try_perform_job(env, job)
File "/opt/wsolut/addons_queue-saas/queue_job/controllers/main.py", line 36, in _try_perform_job
job.perform()
File "/opt/wsolut/addons_queue-saas/queue_job/job.py", line 517, in perform
self.result = self.func(*tuple(self.args), **self.kwargs)
File "/opt/wsolut/addons-saas/saas_apps_signup/models/contract_contract.py", line 147, in _create_build
template_operator.create_db(
File "/opt/wsolut/addons-saas/saas/models/saas_template.py", line 238, in create_db
build.create_db(
File "/opt/wsolut/addons-saas/saas/models/saas_db.py", line 32, in create_db
self.state = 'done'
File "/opt/wsolut/odoo/fields.py", line 1242, in set
records.write({self.name: write_value})
File "/opt/wsolut/addons-saas/saas_limit_max_users/models/saas_db.py", line 26, in write
return super(SaasDb, self).write(vals)
File "/opt/wsolut/addons-saas/saas_domain_names/models/saas_db.py", line 39, in write
res = super(SaasDb, self).write(vals)
File "/opt/wsolut/addons-saas/saas_build_admin/models/saas_db.py", line 21, in write
return super(SaasDb, self).write(vals)
File "/opt/wsolut/addons-saas/saas/models/saas_db.py", line 59, in write
self.refresh_data()
File "/opt/wsolut/addons-saas/saas/models/saas_db.py", line 66, in refresh_data
vals = record.read_values_from_build()
File "/opt/wsolut/addons-saas/saas_apps_signup/models/saas_db.py", line 36, in read_values_from_build
vals = super(SaasDb, self).read_values_from_build()
File "/opt/wsolut/addons-saas/saas_limit_max_users/models/saas_db.py", line 59, in read_values_from_build
users_count=self.execute_kw(
File "/opt/wsolut/addons-saas/saas/models/saas_db.py", line 81, in execute_kw
return self.operator_id.build_execute_kw(self, model, method, args, kwargs)
File "/opt/wsolut/addons-saas/saas/models/saas_operator.py", line 151, in build_execute_kw
return self._build_execute_kw(build.name, model, method, args, kwargs)
File "/opt/wsolut/addons-saas/saas/models/saas_operator.py", line 145, in _build_execute_kw
return cluster.execute_kw(db_name, model, method, args, kwargs)
File "/opt/wsolut/addons-saas/saas_cluster_simple/main.py", line 126, in execute_kw
return execute(db_name, SUPERUSER_ID, model, method, *args, **kwargs)
File "/opt/wsolut/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/wsolut/addons-saas/saas_cluster_simple/main.py", line 175, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/wsolut/odoo/service/model.py", line 160, in execute_cr
result = odoo.api.call_kw(recs, method, args, kw)
File "/opt/wsolut/odoo/api.py", line 460, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/opt/wsolut/odoo/api.py", line 433, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/wsolut/odoo/models.py", line 1787, in search_count
res = self.search(args, count=True)
File "/opt/wsolut/odoo/models.py", line 1810, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/opt/wsolut/odoo/addons/base/models/res_users.py", line 559, in _search
return super(Users, self)._search(args, offset=offset, limit=limit, order=order, count=count,
File "/opt/wsolut/odoo/models.py", line 4711, in _search
query = self._where_calc(args)
File "/opt/wsolut/odoo/models.py", line 4467, in _where_calc
return expression.expression(domain, self).query
File "/opt/wsolut/odoo/osv/expression.py", line 442, in init
self.parse()
File "/opt/wsolut/odoo/osv/expression.py", line 654, in parse
raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
ValueError: Invalid field res.users.is_excluded_from_limiting in leaf ('is_excluded_from_limiting', '=', False)

Domain doesn't pick correct database

Odoo v.14.0
Ubuntu v.20.04
Postgres
Nginx

Domain added in SaaS/Domains and added to the build.
Configuration:
A record pointing to the server IP
nginx as a proxy for dbfilter
dbfilter = ^%d$

When open domain it goes to: example.com/web/database/selector
At creating the build I gave it a random name. If the build is with the same name as the domain (respectively the database) the domain picks it correctly at open. Is that the correct way of creating build with domain?

In App Purchase

I would like to offer IAP to my users. However would not like to use Oddo server.
It is like SMS (To be specific messages/mails) credits of our own service.
I thought of putting that as a product so user can buy it.. like we have Number of Users.. It can be Number of Credits.. However it does not seem to be a right way to do it.

Is there any way to Create IAP for SaaS users?
Can the main server be used as IAP server for the same?

(I looked at https://github.com/OCA/server-tools/tree/14.0/iap_alternative_provider. However it is like creating another server. Can't it be done with saas-addons alone?)

Any pointer will be helpful.

Addons path

Hello

Can each database have different addons paths?

[15] type : Remote instance

Hi,

I noticed that there is the Remote instance function which is no longer available from version 15.
Will this feature come back? or it will no longer exist for future versions?

Saas 13 module create build no ready template's deployments.

Installed saas-addons odoo 13.

In templates screen "Create Build" button click the below message:-
There are no ready template's deployments. Create new one or wait until it's done.

  1. unable to create database, Template's Deployment tab database template state always in "Database Creating" not changing into ready state. How to make database template state to ready? what is the process to create saas database.

  2. Saas client database can create local instance or remote instance or both. Different client database can we create domain dynamic user interface or user ip address and port user can access?

Please let me know if any document or video available in the module.

i need to disable database manger

how to disable client to make a new database throw domain
anyone can go to my domain and like
extramile-egy.com
and write for example
T.extramile-egy.com
and create new DB
how to disable it
Screenshot 2023-09-20 at 9 01 43 AM

KeyError: 'operator_id'

When try to register new client

ERROR main_saas odoo.addons.auth_signup_verify_email.controllers.main: 'operator_id'
Traceback (most recent call last):
File "/odoo14/custom/saas/auth_signup_verify_email/controllers/main.py", line 59, in passwordless_signup
sudo_users.signup(values, qcontext.get("token"))
File "/odoo14/custom/saas/saas_apps_signup/models/res_users.py", line 31, in signup
return self.signup_to_try(values, *args, **kwargs)
File "/odoo14/custom/saas/saas_apps_signup/models/res_users.py", line 43, in signup_to_try
operator_id = int(values.pop("operator_id"))
KeyError: 'operator_id'

Slugify Not Found

Greetings,

I came across your solution and I would like to thank you first for this great effort.

I went through the steps to install, but I am getting this error:
"Unable to install module "saas" because an external dependency is not met: No module named slugify"

However, Slugify is installed:

"Requirement already satisfied: python-slugify in c:\program files (x86)\python37-32\lib\site-packages (from -r requirements.txt (line 1)) (3.0.3)
Requirement already satisfied: text-unidecode==1.2 in c:\program files (x86)\python37-32\lib\site-packages (from python-slugify->-r requirements.txt (line 1)) (1.2)

I am using the following parameters for testing:

  1. OS: Windows 10 Pro 64 Bit
  2. Odoo 12.0-20181022 (Community Edition)

Can you please advise me where I failed? also which is better for implementing Odoo and SaaS, Windows or Ubuntu?

Thanks in advance for your help.

Information for this repo

Hi all,

I ask you if this ripository is operational, if yes what is the possibility to have an operational version please, currently I am working with your ODOO V10 project odoo-saas-tools

thank you for your time

[14.0] jobs build_post_init, action_install errors db isn't exist

Hello,

We use saas on OCB 14.0 with this configuration on master (is odoo create others odoo):
workers: 4
max_cron_threads: 3

When we create one db, we have 3 jobs :
create_db
action_install_missing_mandatory_modules
build_post_init

The job create_db the software runs for a few minutes but the other jobs don't stay and raise error :
The db is not exist

And when create_db finish, we have the db

do you know how i can fix this problem?

Access Template Database

After creating a template how can I access it? , I access the build instance via entering 'auth_quick.master' and auth_quick.build at creating the build!

How to Install

Can someone please guide or point to the documentation on how to use this on Odoo 14 or 15?
The video link (http://runbot.it-projects.info/demo/saas-addons/14.0 under SaaS directory) does not work.

What I have done:
I have installed (locally on windows) odoo 14 (& also tried with 15). Then added all the modules by enabling the developer mode. the dependent modules are also downloaded & added.
However now I do not know how to create plan, saas user and its associated db. I saw some templates, build etc in SaaS tab. I tried to create build, but it is still in draft.
(Also tried to follow at https://github.com/it-projects-llc/saas-addons/blob/12.0/saas/doc/index.rst, but in vein)
Not sure if I have to do extra things.

There is some documentation on its predecessor (https://odoo-saas-tools.readthedocs.io/), but not sure if that is still valid.

[14.0] demo data with localhost

hello,

Thank you for the migration v14.
I tested SAAS odoo 14 on my personal computer, with localhost. (branch 14.0)
When I checked the menu SAAS, I saw demo data, Do you have a documentation or video for the localhost demo configuration?

saas_runbot

We plan to implement runbot-like feature via SaaS system. While original runbot makes single build for a specific odoo version, the saas_runbot will allow to make personal build for each tester.

The full workflow as follows:

  • Developer send a Pull-Request to some repository (e.g. https://github.com/it-projects-llc/pos-addons )

  • Github shows status check with a link:
    screenshot-github com-2019 09 01-12_06_14

  • The links opens a build information page with the following info:

    • Logs for template database creation

    • Button to make personal build, which opens new page that has:

      • Button "Log in as Admin"
      • Button "Log in as Demo"
      • Build Logs

If are interested to have such Fast Runbot, consider to sponsor the development via bountysource


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

My saas module was working fine but I don't know if someone has made any chages in server configuration I am facing an this issue:

My saas module was working perfectly fine on before one week but I don't kniw if someone has made any changes in nginx. I am facing this issue when I try to sync server
_```
raise Warning('Reason: %s \n Message: %s' % (res.reason, res.content))
Warning: Reason: NOT FOUND
Message: b'\n<title>404 Not Found</title>\n

Not Found



I have almost tried everything:
1) I have restarted nginx server 
2)My DB filter is = dbfilter = ^%h$
3)My main db config file:
_[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo12
db_password = odoo
xmlrpc_port = 8016
logfile = /var/log/odoo/odoo12e_robin_saas.log
addons_path=/opt/odoo-12.0.post20181119/odoo/addons,/opt/odoo12enterprise/enterprise,/opt/odoo-12.0.post20181119/odoo/robin/RobinEnterpriseSaas
longpolling_port = 8072
dbfilter = ^%h$
limit_time_cpu = 6000
limit_time_real = 12000_


4) My /etc/nginx/sites-available/default details:

_server {
listen 80 ;
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;
proxy_read_timeout 300000;
location /longpolling {
proxy_pass http://127.0.0.1:8072;
}

#location /front_office_management {
                # Backend server to forward requests to/from
#                proxy_pass          http://127.0.0.1:8060/web/?db=front_office_management;
#                proxy_http_version  1.1;

                # adds gzip
#                gzip_static on;

#        }


location / {
proxy_pass http://127.0.0.1:8011;
}
    location ~ \.php$ {
               include snippets/fastcgi-php.conf;

               # With php-fpm (or other unix sockets):
               fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
	        # With php-cgi (or other tcp sockets):
               #fastcgi_pass 127.0.0.1:9000;
        }

    root /var/www/vmi222655.contaboserver.net;
    server_name *.planet-odoo.in planet-odoo.in; # managed by Certbot
    listen 443 ssl; # managed by Certbot
#    ssl_certificate /etc/letsencrypt/live/vmi222655.contaboserver.net/fullchain.pem; # managed by Certbot
#    ssl_certificate_key /etc/letsencrypt/live/vmi222655.contaboserver.net/privkey.pem; # managed by Certbot

    ssl_certificate /etc/nginx/ssl/server.bundle;
    ssl_certificate_key /etc/nginx/ssl/server.key;
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    
    if ($scheme != "https") {
        return 301 https://$host$request_uri;
            } # managed by Certbot

}_


5) My main /etc/nginx/nginx.conf is:
_user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##
        client_max_body_size 20M;
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings

	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log	;

        ##
        # Gzip Settings
        ##
	 gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}
#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
# 
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}_



<bountysource-plugin>

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/90869416-my-saas-module-was-working-fine-but-i-don-t-know-if-someone-has-made-any-chages-in-server-configuration-i-am-facing-an-this-issue?utm_campaign=plugin&utm_content=tracker%2F109082179&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F109082179&utm_medium=issues&utm_source=github).
</bountysource-plugin>

upstream request timeout

Sometimes the site work fine but sometimes this error
upstream request timeout
How to increase the timeout ?

saas.operator model's generate_db_name() function error

I got the following exception when I was testing SaaS public.

2022-06-22 16:36:21,878 24079 INFO launch werkzeug: 112.134.158.124 - - [22/Jun/2022 16:36:21] "GET /saas_public/2/create-fast-build HTTP/1.0" 500 - 9 0.002 0.010
2022-06-22 16:36:21,881 24079 ERROR launch werkzeug: Error on request:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 806, in dispatch
r = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/odoo/custom/saas-addons/saas_public/controllers/saas_public.py", line 14, in create_fast_build
return self._redirect_to_build(template, kwargs)
File "/odoo/custom/saas-addons/saas_public/controllers/saas_public.py", line 19, in _redirect_to_build
build = template_operator_id.create_db(kwargs, with_delay=False)
File "/odoo/custom/saas-addons/saas/models/saas_template.py", line 212, in create_db
db_name = self.operator_id.generate_db_name()
File "/odoo/custom/saas-addons/saas/models/saas_operator.py", line 123, in generate_db_name
return "fast-build-{unique_id}".db_name_template.format(unique_id=sequence)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/odoo/odoo-server/odoo/service/wsgi_server.py", line 111, in application
return ProxyFix(application_unproxied)(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/middleware/proxy_fix.py", line 232, in call
return self.app(environ, start_response)
File "/odoo/odoo-server/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1328, in call
return self.dispatch(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1294, in call
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/middleware/shared_data.py", line 220, in call
return self.app(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1518, in dispatch
result = ir_http._dispatch()
File "/odoo/odoo-server/addons/website_sale/models/ir_http.py", line 15, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/odoo/odoo-server/addons/website/models/ir_http.py", line 183, in _dispatch
response = super(Http, cls)._dispatch()
File "/odoo/odoo-server/addons/auth_signup/models/ir_http.py", line 19, in _dispatch
return super(Http, cls)._dispatch()
File "/odoo/odoo-server/addons/web_editor/models/ir_http.py", line 21, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/odoo/odoo-server/addons/utm/models/ir_http.py", line 29, in _dispatch
response = super(IrHttp, cls)._dispatch()
File "/odoo/odoo-server/addons/http_routing/models/ir_http.py", line 512, in _dispatch
result = super(IrHttp, cls)._dispatch()
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 241, in _dispatch
return cls._handle_exception(e)
File "/odoo/odoo-server/addons/utm/models/ir_http.py", line 34, in _handle_exception
response = super(IrHttp, cls)._handle_exception(exc)
File "/odoo/odoo-server/addons/http_routing/models/ir_http.py", line 602, in _handle_exception
return super(IrHttp, cls)._handle_exception(exception)
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 209, in _handle_exception
return request._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 744, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'str' object has no attribute 'db_name_template' - - -

The problem is in the below function which tries to access a property db_name_template from a string value.

def generate_db_name(self):
        self.ensure_one()
        sequence = self.env['ir.sequence'].next_by_code('saas.db')
        return "fast-build-{unique_id}".db_name_template.format(unique_id=sequence)

Solution

def generate_db_name(self):
        self.ensure_one()
        sequence = self.env['ir.sequence'].next_by_code('saas.db')
        return "fast-build-{unique_id}".format(unique_id=sequence)

Sign up additional fields problem v14

When the user goes to try now the form is correct and it is working properly
When the user goes for buy now the lists of Languages and Country are missing

404 Not Found

After creating the build click on Connect to the Build 404 Not Found error arises
image

I can't install xmlrpclib

ERROR: Could not find a version that satisfies the requirement xmlrpclib (from versions: none)
ERROR: No matching distribution found for xmlrpclib

Architecture Design

I have being testing the Saas Addons and I would like to be discuss some of design concepts.

  1. When the build are created this database are created always based on a template database right?
  2. If 1. is the case, it means we are always restricted to a database template. How would this work for a Kubernetes operator? This design will always force you to have all databases in a single PostgreSQL Pod or server, while we can have each database and odoo in a Pod.
  3. This design also have an issue when we need to have a client with self-service portal like odoo. Because Build only install modules that come from template. I think what would be good is that the build have their own modules. So when the build is created it takes the template modules + their own modules. Template modules would be just a base to force specific modules like access.

My questions are just to understand what is you design concept for the future. We have being developed the kubernete and we are already able to create Pods from Odoo.

Regards


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

contract.contract._create_build

I'm doing the scenario where user choose apps with try now. Database draft is created but contract creation is failing whit the following error:

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/http.py", line 1470, in _dispatch_nodb
result = request.dispatch()
File "/odoo14/odoo14-server/odoo/http.py", line 808, in dispatch
r = self._call_function(**self.params)
File "/odoo14/odoo14-server/odoo/http.py", line 362, in _call_function
return self.endpoint(*args, **kwargs)
File "/odoo14/odoo14-server/odoo/http.py", line 914, in call
return self.method(*args, **kw)
File "/odoo14/odoo14-server/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/odoo14/custom/saas/queue_job/controllers/main.py", line 73, in runjob
self._try_perform_job(env, job)
File "/odoo14/custom/saas/queue_job/controllers/main.py", line 32, in _try_perform_job
job.perform()
File "/odoo14/custom/saas/queue_job/job.py", line 516, in perform
self.result = self.func(*tuple(self.args), **self.kwargs)
File "/odoo14/custom/saas/saas_apps_signup/models/contract_contract.py", line 163, in _create_build
build = template_operator.create_db(
File "/odoo14/custom/saas/saas/models/saas_template.py", line 232, in create_db
build.create_db(
File "/odoo14/custom/saas/saas/models/saas_db.py", line 32, in create_db
self.state = 'done'
File "/odoo14/odoo14-server/odoo/fields.py", line 1129, in set
records.write({self.name: write_value})
File "/odoo14/custom/saas/saas_limit_max_users/models/saas_db.py", line 26, in write
return super(SaasDb, self).write(vals)
File "/odoo14/custom/saas/saas_domain_names/models/saas_db.py", line 39, in write
res = super(SaasDb, self).write(vals)
File "/odoo14/custom/saas/saas_build_admin/models/saas_db.py", line 21, in write
return super(SaasDb, self).write(vals)
File "/odoo14/custom/saas/saas/models/saas_db.py", line 59, in write
self.refresh_data()
File "/odoo14/custom/saas/saas/models/saas_db.py", line 66, in refresh_data
vals = record.read_values_from_build()
File "/odoo14/custom/saas/saas_apps_signup/models/saas_db.py", line 36, in read_values_from_build
vals = super(SaasDb, self).read_values_from_build()
File "/odoo14/custom/saas/saas_limit_max_users/models/saas_db.py", line 59, in read_values_from_build
users_count=self.execute_kw(
File "/odoo14/custom/saas/saas/models/saas_db.py", line 80, in execute_kw
return self.operator_id.build_execute_kw(self, model, method, args, kwargs)
File "/odoo14/custom/saas/saas/models/saas_operator.py", line 148, in build_execute_kw
return self._build_execute_kw(build.name, model, method, args, kwargs)
File "/odoo14/custom/saas/saas_operator_remote/models/saas_operator.py", line 98, in _build_execute_kw
return super(SaasOperator, self)._build_execute_kw(
File "/odoo14/custom/saas/saas/models/saas_operator.py", line 142, in _build_execute_kw
return cluster.execute_kw(db_name, model, method, args, kwargs)
File "/odoo14/custom/saas/saas_cluster_simple/main.py", line 124, in execute_kw
return execute(db_name, SUPERUSER_ID, model, method, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/service/model.py", line 175, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/odoo14/odoo14-server/odoo/service/model.py", line 159, in execute_cr
result = odoo.api.call_kw(recs, method, args, kw)
File "/odoo14/odoo14-server/odoo/api.py", line 395, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/odoo14/odoo14-server/odoo/api.py", line 368, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/models.py", line 1685, in search_count
res = self.search(args, count=True)
File "/odoo14/odoo14-server/odoo/models.py", line 1708, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/odoo14/odoo14-server/odoo/addons/base/models/res_users.py", line 539, in _search
return super(Users, self)._search(args, offset=offset, limit=limit, order=order, count=count,
File "/odoo14/odoo14-server/odoo/models.py", line 4514, in _search
query = self._where_calc(args)
File "/odoo14/odoo14-server/odoo/models.py", line 4270, in _where_calc
return expression.expression(domain, self).query
File "/odoo14/odoo14-server/odoo/osv/expression.py", line 442, in init
self.parse()
File "/odoo14/odoo14-server/odoo/osv/expression.py", line 654, in parse
raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/odoo14/odoo14-server/odoo/service/server.py", line 441, in app
return self.app(e, s)
File "/odoo14/odoo14-server/odoo/service/wsgi_server.py", line 113, in application
return application_unproxied(environ, start_response)
File "/odoo14/odoo14-server/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/odoo14/odoo14-server/odoo/http.py", line 1307, in call
return self.dispatch(environ, start_response)
File "/odoo14/odoo14-server/odoo/http.py", line 1273, in call
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/middleware/shared_data.py", line 220, in call
return self.app(environ, start_response)
File "/odoo14/odoo14-server/odoo/http.py", line 1499, in dispatch
result = _dispatch_nodb()
File "/odoo14/odoo14-server/odoo/http.py", line 1472, in _dispatch_nodb
return request._handle_exception(e)
File "/odoo14/odoo14-server/odoo/http.py", line 746, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/odoo14/odoo14-server/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field res.users.is_excluded_from_limiting in leaf ('is_excluded_from_limiting', '=', False) - - -

No information in how to configure auth_quick

How to configure auth_quick properly?

This info I found, but I don't understand where the parameters should be configured
Create following key-value records:

auth_quick.master -- url to master server.
auth_quick.build -- reference for this database

I'm testing this locally, which database should I put the parameter and who is master and build database.

Installation documentation

Hi there,
Thank you for doing a great job.
I am trying to install saas-adons through uploading the folder to odoo addons path, and I add the path to the addon_path key in odoo.conf, restart the services, and update app list, however I failed !

could you please mention any documentation source for installing saas-addons v15 ?
By the way,
Should I modify mainfest files for each module to be ( "installable": True, "application": True,) and maybe modify the category ?
Should I do any changes in my system, run commands ..etc ?

FYI, I am running odoo v15 CE on debian.

Thanks In Advance

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.