Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
17513 Weergaven

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.

Avatar
Annuleer

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.

Beste antwoord

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>

Avatar
Annuleer
Beste antwoord

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.


Avatar
Annuleer