Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

OpenERP 7.0 and NetRPC

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
7.06.0
1 Odpowiedz
6118 Widoki
Awatar
Assem

Hello,

I have a php application that connect to a 6.0 version of OpenERP using netrpc. I'm now trying to check if I can use the same code to connect my application to a 7.0 version. After analysing the code, I found that it's based on socket communications, so I prepared this code to make somme tests:

import socket
import cPickle
msg = ('common', 'login', 'db_name', 'admin', 'secret')
msg = cPickle.dumps([msg,None])
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print sock.connect_ex(('localhost', 8070))
sock.sendall('%8d%s%s' % (len(msg), True and "1" or "0", msg))
#buf=''
#print sock.recv(8 - len(buf))
#print "put"


def read(socket, size):
    buf=''
    while len(buf) < size:
        print "innn"
        try:
            chunk = socket.recv(size - len(buf))
            print "cunk ", chunk
            if chunk == '':
                raise RuntimeError, "socket connection broken"
            buf += chunk
        except Exception, e:
            print e
            
    return buf

size = int(read(sock, 8))
buf = read(sock, 1)
exception = buf != '0' and buf or False
res = cPickle.loads(read(sock, size))

if isinstance(res[0],Exception):
    if exception:
        raise TinySocketError(ustr(res[0]), ustr(res[1]))
    raise res[0]
else:
    print "res ",res[0]

When I run this code whyle a 6.0 server is running, I got an answer. But with a 7.0 server running, I have a Timeout problem (and I see openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070 in the log so the netrpc service must be running). So I digged a litte in the OpenERP net-rpc code, and I found that the netrpc server is runned via the netrcp_server.py. After that I discovered that the difference between 6.0 and 7.0 is that in the first one, the function TinySocketServerThread.run was called, but in the second, it wasn't, witch means (If I'm not wrong) that there was no client socket waiting for connection witch explain why I don't get an answer.

So, is there anything wrong with my analysis? Did someone tested to use net rpc with a 7.0 of openerp? Did I miss something to make the netrpc work properly?

Thanks,

Assem.

0
Awatar
Odrzuć
Awatar
Assem
Autor Najlepsza odpowiedź

Well, 

After more checking I found this: in the 6.0 version, the netrpc and other service are runned by calling

netsvc.Server.startAll()

In openerp-server.py. In 7.0 version, this function is not called nowere, so I added :

netrpc_server.Server.startAll()

In the __init__.py under the service folder in the end of the start_services function : after that, the thread was lunched and I can see that the server did receive the socket call. But I found another problem: in TinySocketClientThread.run function, this line 

ts = openerp.server.netrpc_socket.mysocket(self.sock)

must be replaced by this one

ts = openerp.service.netrpc_socket.mysocket(self.sock)

After that, it worked fine. 

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Human Resource Module - Employee Expense - change journal?
7.0
Awatar
Awatar
1
lip 18
4648
How to change number visual days in Gant Chart
7.0
Awatar
0
wrz 15
4553
We wanted to turn off customer portal, so we uncheck the box... But then
7.0
Awatar
Awatar
Awatar
Awatar
6
kwi 15
7908
Problems accessing openerp 7.0
7.0
Awatar
1
mar 15
6587
how to slove the internal server prblem
7.0
Awatar
Awatar
1
mar 15
364
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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