İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Replace Session Store of odoo/werkzeug

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
postgresqlsessioncore
8 Cevaplar
19529 Görünümler
Avatar
Christoph

We are running odoo on two dedicated servers with the same database. A load balancer distribute the requests to both servers. The problem is that both servers don't know the user sessions of each other server because the sessions are saved on the filesystem (werkzeug.contrib.sessions.FilesystemSessionStore, see openerp/http.py -> Root -> session_store). So I thought I overwrite this session with an own postgres session store by a new module (which I want to contribute if it's done).

Ok, this is the theory and it works - at least if the module is already installed and the database is known at the start of odoo (e.g. with -d <database>). The problem is that the module file is only loaded if the module is installed (what is good). But if this file is loaded to late then other functions have already fetched the session store. So my overwritings are too late.

Here is an minimized example of my module:

from openerp.http import OpenERPSession, Root
from openerp.tools.func import lazy_property
from werkzeug.contrib.sessions import SessionStore


class PostgresSessionStore(SessionStore):
# some functions which are already implemented

@lazy_property
def session_store(self):
return PostgresSessionStore(session_class=OpenERPSession)

Root.session_store = session_store

Now is my question: Do you know a better way to replace the session store without overwriting the odoo core so that the session store is replaced if the module is installed later or database is given later? I thought about some hacks like in [1] but I think this is not the good way.

[1] https://benkurtovic.com/2015/01/28/python-object-replacement.html

7
Avatar
Vazgeç
Miku Laitinen

I'm also very interested in this. I created a simple module that stores the sessions in Redis, but got stuck in the same place as you. I think the proper way would be to create a parameter to Odoo configuration file (eg. session_store = werkzeug.contrib.sessions.FilesystemSessionStore), modify http.py to read the session storage class from the configuration file and file a pull request to Odoo 8.0. I just don't know if Odoo S.A. will accept such pull requests, but maybe we should at least try.

Christoph
Üretici

@Miku: This idea sounds good. How is your process? Did you achieved something like this? Or should I try my luck on this?

Christoph
Üretici

I created a PR for this: https://github.com/odoo/odoo/pull/7937

Axel Mendoza

Hi @Miku Laitinen
I did the same in OpenERP v7. There was no other way to do it when you config workers

Avatar
Axel Mendoza
En İyi Yanıt

In Odoo this can be implemented as a command and used to run Odoo with the needed calls to the bootstrap code and changes to http.py before been loaded because for commands the modules are loaded ok. The default command is server who bootstrap the Odoo server using the config options. Your command need to do pretty much the same but with changes in the right places

1
Avatar
Vazgeç
Avatar
jeffery
En İyi Yanıt

i have integrate redis to store odoo session.    thanks for https://gist.github.com/carlopires/1451947


you can try it use this branch  https://github.com/jeffery9/odoo/tree/odoo8-session-in-redis

0
Avatar
Vazgeç
Avatar
Doğan ALTUNBAY
En İyi Yanıt

I have two suggestions

1 - Why not use nfs to share session_dir?

2 - Implement a custom start script instead of odoo.py and reassign openerp.http.root to your override.

class NewRoot(openerp.http.Root)
    @lazy_property
    def session_store(self):
        return <your session store instance>

Then in your main method

def main()
import openerp
openerp.http.root = NewRoot() #override here
openerp.cli.main()
0
Avatar
Vazgeç
Isabelle Richard

Hi, We had some trouble using NFS. It seems that there are locks on the files, resulting to page loading very slowly.

Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
How to close postgres cursor or set session time-out !?
postgresql session currentsession
Avatar
0
Mar 15
5923
Server Action to correct POS session opening and closing date
session
Avatar
Avatar
1
May 25
1955
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
Şub 25
2747
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
Oca 25
9820
Odoo backend to Google Data Studio Çözüldü
postgresql
Avatar
Avatar
2
Oca 24
10139
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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