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

TypeError: __init__() takes exactly 3 arguments (2 given) ?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
v6.1
2 Odpowiedzi
18836 Widoki
Awatar
BATEL Amina

Hello! I used the software "Dia" to develop a module with OpenERP and I had this error, "TypeError: __init__() takes exactly 3 arguments (2 given)" and I do not see why

Here is my code with python:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

from osv import fields,osv

class Recrutement_ONAEA(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.ONAEA'
    _columns = {
        'Nom': fields.char('ONAEA',size="64"),
        'Adresse': fields.char('1bp 251, 37 Chemain Bachir El Ibrahimi-El Biar',size="64",),
        'NumTelephone': fields.char('021 92 13 03/04',size="64",,
        'WilayaOffice': fields.one2many('Recrutement.Annexe','Wilaya','Office annexe'),
    }
Recrutement_ONAEA()

class Recrutement_Annexe(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.Annexe'
    _columns = {
        'Adresse': fields.char(''),
        'NumTelephone': fields.char(''),
        'Wilaya': fields.many2one('Recrutement.ONAEA','Annexe Office'),
        'WialayaCand': fields.one2many('Recrutement.Candidat','WilayaCandidat','Annexe candidat'),
    }
Recrutement_Annexe()

class Recrutement_Candidat(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.Candidat'
    _columns = {
        'Nom': fields.char('Nom',size="10"),
        'Prenom': fields.char('Prénom',size="20"),
        'DateNaissance': fields.date(),
        'WilayaCandidat': fields.many2one('Recrutement.Annexe','Candidat annexe'),
        'Adresse': fields.text(),
        'CodePostal': fields.char('NNNNN',size="5"),
        'EMail': fields.char(),
        'NumTel': fields.char(size="10"),
    }
Recrutement_Candidat()

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

If someone can help me I would be very grateful.

Thank you in advance.

0
Awatar
Odrzuć
Awatar
Med Said BARA
Najlepsza odpowiedź

There is a missing closing parenthesis at the end line before comma: 'NumTelephone': fields.char('021 92 13 03/04',size="64"),

An extra comma after "size = "64" : 'Adresse': fields.char('1bp 251, 37 Chemain Bachir El Ibrahimi-El Biar',size="64",),

But that's not all !

You have to review all your code, beginning with naming conventions...

0
Awatar
Odrzuć
BATEL Amina
Autor

Thank you Med Said BARA I corrected the error, but the problem persists :(

Med Said BARA

Post the new code in your answer. And post more lines from your log

Med Said BARA

Which is the line 28 in your file ?

BATEL Amina
Autor

(wrote in italic)

Awatar
BATEL Amina
Autor Najlepsza odpowiedź
from osv import fields,osv

class Recrutement_ONAEA(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.ONAEA'
    _columns = {

(LINE 28) 'Nom': fields.char('ONAEA',size="64"),`

            'Adresse': fields.char('1bp 251, 37 Chemain Bachir El Ibrahimi-El Biar',size="64"),
            'NumTelephone': fields.char('021 92 13 03/04',size="64"),
            'WilayaOffice': fields.one2many('Recrutement.Annexe','Wilaya','Office annexe'),
        }
Recrutement_ONAEA()

class Recrutement_Annexe(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.Annexe'
    _columns = {
        'Adresse': fields.char(''),
        'NumTelephone': fields.char(''),
        'Wilaya': fields.many2one('Recrutement.ONAEA','Annexe Office'),
        'WialayaCand': fields.one2many('Recrutement.Candidat','WilayaCandidat','Annexe candidat'),
    }
Recrutement_Annexe()

class Recrutement_Candidat(osv.osv):
    """(NULL)"""
    _name = 'Recrutement.Candidat'
    _columns = {
        'Nom': fields.char('Nom',size="10"),
        'Prenom': fields.char('Prénom',size="20"),
        'DateNaissance': fields.date(),
        'WilayaCandidat': fields.many2one('Recrutement.Annexe','Candidat annexe'),
        'Adresse': fields.text(),
        'CodePostal': fields.char('NNNNN',size="5"),
        'EMail': fields.char(),
        'NumTel': fields.char(size="10"),
    }
Recrutement_Candidat()

and this is the same problem :

  File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\Diagramme2\Diagramme2.py", line 28, in Recrutement_ONAEA
TypeError: __init__() takes exactly 3 arguments (2 given)
0
Awatar
Odrzuć
Med Said BARA

'Nom': fields.char('ONAEA', size=64),

BATEL Amina
Autor

I just saw on another forum, and they say it gets between two quotes "" And in all cases, the problem persists (sorry, I have bad English)

Med Said BARA

Try to restart your server

BATEL Amina
Autor

I rebooted the server , but in vain :(

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ść
눈Volaris Contacto Numero눈¿Cómo hablar con un asesor de Volaris?
v6.1
Awatar
0
lis 25
9
Manufacturing to delivery, how are scheduled MRP operations?
v6.1
Awatar
1
cze 24
4208
Domain one2many field? Rozwiązane
v6.1
Awatar
Awatar
Awatar
Awatar
Awatar
5
cze 23
36779
[Solved] Close window on button press Rozwiązane
v6.1
Awatar
1
gru 23
20481
How open an edit form with a button ?
v6.1
Awatar
1
lip 15
6147
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