Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
17508 Переглядів

psycopg2.ProgrammingError: column ailsaodoo_session.color does not exist

LINE 2: ...ailsaodoo_session".id) AS "course_id_count" , sum("ailsaodoo...

^




actually I have define the color in .py file and use it in xml file

.py:

color = fields.Integer()

.xml

<kanban default_group_by="course_id">    
    <field name="color"/>
    ...
</kanban>

However, I fixed the problem by manually adding the column to database. I still want to know how to solve this by coding.

Аватар
Відмінити

Make sure that in the code, you have added the field color in the same model and also check whether the file is called in init.

Найкраща відповідь

That is because the model is load after the inherit model, you can force load before and the database update use the next script:

odoo-bin -c <odoo.config.file> -d <database.name> -u <your.model.name>

Аватар
Відмінити
Найкраща відповідь

I had the same problem and doing as follow fix the issue:

  1. Stop your server
  2. Run this command at first:  python3 odoo-bin --update=purchase_request
  3. Reload your localhost in browser
  4. Upgrade your module
  5. Stop server again
  6. Now, using the old command (The command you use always) start server again
  7. Upgrade your module again
  8. Done.


Аватар
Відмінити