Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

ODOO12 not creating db column?

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
postgresqlodoo12ORM
4 Antwoorden
3565 Weergaven
Avatar
Some ODOO newbie developer

Hello people. 

I am having a problem with ODOO 12, I am declaring a text field and it is simply not being created by ODOO, I have already enabled --log-level debug_sql, and at creation time it just skips the field without giving me any errors...

My code:

class Processo(models.Model): 

 _name = 'processo'
 _description = 'Processo'


name = fields.Char(string=u'Número do processo', readonly=True)

status = fields.Selection(selection=[
                ('tec','Análise Técnica'),            
                ('tecsup','Análise Técnica Superior'),
                ('pendencia','Pendência'),            
                ('indeferido','Indeferido'),            
                ('concluido','Concluído')],        
                string=u'Estados',        
                default='tec')    

is_tecsup = fields.Boolean( string='É análise superior?')

requerente_id = fields.Many2one( string='Requerente', comodel_name='res.partner', readonly=True)​

requerente_user_id = fields.Many2one( string='Requerente', comodel_name='res.users', readonly=True)

documentos_ids = fields.One2many(string='Documentos', comodel_name='documentos.protocolos', inverse_name='processo_id')    

protocolo_ids = fields.One2many( comodel_name='protocolo', inverse_name='processo_id', string='Protocolos')    

protocolo_id = fields.Many2one( comodel_name='protocolo', string=u'Protocolo')

data_aprovacao = fields.Date(string="Data do alvará")    

historico = fields.Text( string="Histórico")    

pendencia_processo = fields.Text( string="Pendência")​

pendencia = fields.Text(string="Pendencia") # <= field problem

This is the log at creation time:

2019-11-27 13:28:32,156 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "name" VARCHAR
2019-11-27 13:28:32,182 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."name" IS 'Número do processo'
2019-11-27 13:28:32,182 24061 DEBUG teste_all odoo.sql_db: query: SELECT 1 FROM "processo" LIMIT 1
2019-11-27 13:28:32,183 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_name_index"
2019-11-27 13:28:32,183 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "status" VARCHAR
2019-11-27 13:28:32,184 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."status" IS 'Estados'
2019-11-27 13:28:32,184 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_status_index"
2019-11-27 13:28:32,184 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "is_tecsup" bool
2019-11-27 13:28:32,185 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."is_tecsup" IS 'É análise superior?'
2019-11-27 13:28:32,185 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_is_tecsup_index"
2019-11-27 13:28:32,186 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "requerente_id" int4
2019-11-27 13:28:32,186 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."requerente_id" IS 'Requerente'
2019-11-27 13:28:32,187 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_requerente_id_index"
2019-11-27 13:28:32,187 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "requerente_user_id" int4
2019-11-27 13:28:32,187 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."requerente_user_id" IS 'Requerente'
2019-11-27 13:28:32,188 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_requerente_user_id_index"
2019-11-27 13:28:32,188 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "protocolo_id" int4
2019-11-27 13:28:32,189 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."protocolo_id" IS 'Protocolo'
2019-11-27 13:28:32,189 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_protocolo_id_index"
2019-11-27 13:28:32,191 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "data_aprovacao" date
2019-11-27 13:28:32,191 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."data_aprovacao" IS 'Data do alvará'
2019-11-27 13:28:32,191 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_data_aprovacao_index"
2019-11-27 13:28:32,191 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "historico" text
2019-11-27 13:28:32,192 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."historico" IS 'Histórico'
2019-11-27 13:28:32,192 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_historico_index"
2019-11-27 13:28:32,192 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "pendencia_processo" text
2019-11-27 13:28:32,192 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."pendencia_processo" IS 'Pendência'
2019-11-27 13:28:32,193 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_pendencia_processo_index"
2019-11-27 13:28:32,193 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "autorizador_id" int4
2019-11-27 13:28:32,193 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."autorizador_id" IS 'Autorizador'
2019-11-27 13:28:32,193 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_autorizador_id_index"
2019-11-27 13:28:32,194 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "create_uid" int4
2019-11-27 13:28:32,194 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."create_uid" IS 'Created by'
2019-11-27 13:28:32,194 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_create_uid_index"
2019-11-27 13:28:32,194 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "create_date" timestamp
2019-11-27 13:28:32,194 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."create_date" IS 'Created on'
2019-11-27 13:28:32,195 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_create_date_index"
2019-11-27 13:28:32,195 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "write_uid" int4
2019-11-27 13:28:32,195 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."write_uid" IS 'Last Updated by'
2019-11-27 13:28:32,195 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_write_uid_index"
2019-11-27 13:28:32,196 24061 DEBUG teste_all odoo.sql_db: query: ALTER TABLE "processo" ADD COLUMN "write_date" timestamp
2019-11-27 13:28:32,196 24061 DEBUG teste_all odoo.sql_db: query: COMMENT ON COLUMN "processo"."write_date" IS 'Last Updated on'
2019-11-27 13:28:32,196 24061 DEBUG teste_all odoo.sql_db: query: DROP INDEX IF EXISTS "processo_write_date_index"118/5000

Simply skips field "pendencia" creation without giving me any errors ... Does anyone know why? This is already giving me a headaches....


0
Avatar
Annuleer
Avatar
rehan
Beste antwoord

you need to declare it in xml views first i think :/

0
Avatar
Annuleer
Some ODOO newbie developer
Auteur

I did this, with or without declaration on xml views. If I declare the field on a views odoo just give me " field does not exist"...

What I did to "solve" was just declaring another text field and it worked as expected... I have no idea what is happening

Avatar
Muhammad Anees
Beste antwoord

pendencia_processo = fields.Text( string="Pendência")​
pendencia = fields.Text(string="Pendencia")

string looks same. Try to give different.

​


0
Avatar
Annuleer
Some ODOO newbie developer
Auteur

The string could be the problem?

Some ODOO newbie developer
Auteur

I changed the string, nothing happens.

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
How to connect Odoo with Postgresql? Opgelost
postgresql odoo12
Avatar
Avatar
Avatar
2
sep. 25
53570
Odoo closes connection to DB on GCP Cloud SQL for longpolling requests and Causing 404 Error Opgelost
postgresql odoo12
Avatar
Avatar
2
jul. 20
8134
How to connect Odoo with Postgresql
postgresql odoo12
Avatar
0
mrt. 19
5
PostgreSQL_for_Odoo can't run
postgresql odoo12 windows10
Avatar
Avatar
1
nov. 24
7286
Postgresql not connecting. Opgelost
postgresql beginner odoo12
Avatar
Avatar
1
feb. 19
9100
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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