Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

[ Suggestions required ] Instance wise Addons path + Database wise Addons path are feasible in Odoo ?

Odoberať

Get notified when there's activity on this post

This question has been flagged
addonsaddonconfigodooV8
9 Replies
8134 Zobrazenia
Avatar
Emipro Technologies Pvt. Ltd.

Hello All,

I am just seeking other Odoo expert's suggestions on whether following case may be possible/feasible or not in Odoo V8.  

We all very well know that, through Odoo conf file we can set Addons path. But sometimes, we don't want to show some modules in some specific databases. For example, in order to make invisible that module, if we delete module from module list, then also someone can easily make them available them via "Update Module List" menu. And sometimes, when we host Odoo for multiple customers in one server, then we don't want to show modules of customers to each other's.

Possible Way 1 :

So what I was thinking, that if somewhere in configuration parameter ( Settings >> Technical >> Parameters >> System Parameters menu), we can set addons path. Then at the time of database initialize from login screen, those specific modules also should be initialize.

So Odoo basic module's path will be taken from standard config file and customer specific modules will be taken from each database's configuration parameter. For example 3 paths specified in conf file and 1 path specified at configuration parameter under particular database then when you select the database at login time, from 4 paths, (3 from config, 1 for particular database) modules will be initialized.

Let me write some other alternative ways in case if above idea will not work. Other possible ways can be as follows,

Note : Generally end customers doesn't like to do any settings from py files so following ways would not be more suitable for end users. They like the policy "As more as from front end & as less as from back end". 

Possible Way 2 :

We can add one more attribute in "__openerp__.py" file like

in_databases : ['test1','test2']
So while doing "update module list" we will skip this module's visibility if current database is not in list of that parameter. Off course, in this custom module, there must be "auto_install" set to "True", otherwise someone can uninstall this module and our extended "update module list" method will not worked. ;) ;) ;)

Possible Way 3 :

We can add one more parameter in conf file which shall be kind of a dict ( "{}" ) in conf file.

addons_db_path = {'test1' : '/opt/odoo/test1_addons', 'test2' : '/opt/odoo/test2_addons'} 
so along with addons_path this new attribute will specify addons path for specific databse when some one click on "update module list"

Benefits of this kind of feature would be,

  • Database wise specific modules.

  • One database's specific modules will not be visible to any other database.

  • You can keep the same name but different features inside the modules.

  • You can easily manage different customer's modules into one single instance of Odoo.

  • Client specific modules will be total secured.

I am very keen and hopeful to get opinions of Odoo experts from this forum.


10
Avatar
Zrušiť
Avatar
Axel Mendoza
Best Answer

Hi @Empiro, this is very interesting topic, +1 for your question, I'd like to give you some ideas that I've managed since v7. 

In several terms it's not feasible right now to have a single Odoo instance for sharing modules to multiple database and it's due to your question topic, every database doesn't have/manage their own modules like in differents locations, meaning that you cannot have for the single instance database 1 using module A from /opt/odoo/repos/dev/A and database 2 using the same module A from /opt/odoo/repos/master/A since it will forget about one of those since the addons_path need to be composed of those two paths. Also like in your case databases 1 & 2 will have the modules specific of one visible to the other. And a module update could break one of the database without you know affecting the clients and normal use

Since Odoo need the modules loaded to do several computations and caches, the startup engine configure the threads/workers/process to use the modules loaded from the config addons_path. 

In my opinion the addons_path config need to be a triple like (worker, database, addons_path), something like if one worker get spawn it need to be database specific and needs to load the addons_path module code for that database, then you need to manage workers like a pool and also have a way to correctly use an specific addons_path code for assume requests to that database.

What I'm talking about is to have a worker/process/thread memory for addons_path isolation. In this case the database will have their own modules since the workers that managed it will be contains the specific addons_path and using Update module list will cause no harm. Using this approach the workers will be memory variables since they don't need to load all the modules for all the databases universe, they just need to load the specific database configuration. I think that a worker master for every database need to exist in order to spawn/destroy child workers for every database just with a fork but without been a fork of the main Odoo process, just using interprocess comunication with Odoo master process

- Odoo master process
    - Worker master for database 1
        - Worker child process for database 1
        - Worker child process for database 1
        - Worker child process for database 1
    - Worker master for database 2 
        - Worker child process for database 2
        - Worker child process for database 2
        - Worker child process for database 2

Because features like this are None, we are using the approach of create one instance of Odoo per database(normally a customer or using the same instance for others tests database of the development/production main one) but without having a big instance of modules for database 1 and 2. Using Nginx for dispatch to the needed instance. That way the database instance will manage only the modules of their specific addons cloned and managed specifically for the instance using fabric in combination with an Odoo UI deploy module tool

3
Avatar
Zrušiť
Emipro Technologies Pvt. Ltd.
Autor

Thanks @Axel, I will read and back to you with my thoughts. But +1 for your wonderful effort and time.

Axel Mendoza

To crazy my ideas?

Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Best Answer

Hi Emipro,

I was wondering why you would want to make these things so complex. Imagine building your in_databases like this:

in_databases : ['test1','test2']

Imagine that you have 20 customers on your server. This would mean that you would have to modify this code every time in your module. That sounds like a pain and sooner or later you will make errors in this. If I understand you correctly you basically don't want to show custom modules to all your customers/users. Wouldn't it be an option to create a new option in your __openerp__.py like this:

admin_only_module: 'True'

If the option is true the module will be visible in all databases but only for the superadmin user (id 1).
If the option is set to 'False' it will be visible to any database and any user.

Wouldn't this solve your problems?

Update: Now that you've added an extra response on my answer and your extra samples I would honestly say that your option two sounds the best. This sounds like a more flexible way then option 1. I would personally use option #2 if it was up to me.


Yenthe


3
Avatar
Zrušiť
Emipro Technologies Pvt. Ltd.
Autor

@yenthe this "admin_only_module" would not be good option, because of when you give demo database to your client obviously they will/should/must able to login via admin and they can easily view all the modules of other clients. I have write two alternative ways when the explanation of my main paragraph is not feasible. So by database wise addons path is not good way ? Please think on this. However we should also design system in so simple way that end customer, who don't know __openerp__.py file can easily configure their addons path. "More from frontend and less from backend". Appreciating your prompt response and that will lead to +1 upvote from me.

Emipro Technologies Pvt. Ltd.
Autor

@Yenthe By the way, there is very rare cases in which anyone needs to manage 20+ clients from single instance of Odoo.

Yenthe Van Ginneken (Mainframe Monkey)

@Emipro why would you give the admin account to any user at any time? You can create a new user with, I assume, all the rights and accesses that you'd ever need. Our customers never get access to the main admin account for a specific Odoo. Judging by your answers I would honestly say to go with option #2. Thats a pretty clean solution.

Emipro Technologies Pvt. Ltd.
Autor

@Yenthe its quite normal, we manage separate database for each customers then they might need admin account. In normal case or specially to our clients we are giving total database access to our clients. They can do anything inside their account. One of the simple example I would like to give you is suppose you host your database at Odoo itself. Now you won't need admin access to manage your database separately ???????????? Now in case if Odoo don't want to show Xyz customer's module to you then what is the available option ? That's what I am trying to figure out. ( This is just example, please don't say that Odoo don't allow to host any other community modules :D)

Axel Mendoza

In this case I go with option 1 or an external cache like Redis

Avatar
Solanki Shamji
Best Answer

Hello,

My suggestion is that

If you provide SAAS to the customer than dont give access of setting menu or module installation.

Give separate user for separate client and manage using access right.

Thanks.

Shamji


0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Error addons install in Odoo 13 versión comnunity
addons addon
Avatar
Avatar
2
apr 20
3831
addon install - what's the correct way to do it?
dms addons addon
Avatar
0
júl 21
4085
Odoo 11 - HOw can I get the Odoo Enterprise Addons
addons addon odoov11
Avatar
Avatar
2
dec 19
5763
"Update modules list" not finding newly added modules. What else can I try? Solved
modules addons config
Avatar
Avatar
Avatar
Avatar
Avatar
6
dec 23
26403
How do I import an addon module (from a python shell)? Solved
python addons addon
Avatar
1
mar 15
12067
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now