Search code examples
odooodoo-11

Odoo 11.0 How let res.partner about module tutorial being usable?


I'm pretty new about odoo, and starting from Build a Module with odoo 11.0.

All fine untill the tutorial point Inheritance that let me create a new Partener.py file that extend res.parter...

I followed and re-read the tutorial a lot of times and all it's same. Why i get error:

psycopg2.ProgrammingError: column res_users.notification_type does not exist

LINE 1: ... "share","res_users"."partner_id" as "partner_id","res_users...

This is partner.py

# -*- coding: utf-8 -*-
from odoo import fields, models


class Partner(models.Model):
    _inherit = 'res.partner'

    # Add a new column to the res.partner model, by default partners are not
    # instructors

    instructor = fields.Boolean("Instructor", default=False)

    session_ids = fields.Many2many('openacademy.session',
                                   string="Attended Sessions", readonly=True)

Solution

  • Solved by generate a configuration file for odoo because the session that i start used the db of the last project so he don't have table inside db.

    -s Path/odoorc_nameConfig -s --dev=xml,pdb,qweb
    

    And add a dbfilter for see the proper db!

    After that in the tutorial remind to add the depends 'sale' inside manifest!

    'depends': ['base',
                'sale',
                    ],
    

    And now you can continue tutorial with Odoo 11.0 because they don't say that you need a depends with 'sale' for inherit class res.partner!