Hello, I encounter the following problem, when I try to extend the model 'res_users', this one does not take the extra fields,
Model:
class res_users(models.Model):
_inherit = 'res.users' consultation_place = fields.Many2one('oocular.place', string=_('Consultations Place'))
def __init__(self, pool, cr):
init_res = super(res_users, self).__init__(pool, cr) self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS) self.SELF_WRITEABLE_FIELDS.extend(['consultation_place']) return init_res
XML:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="add_to_user_preferences" model="ir.ui.view">
<field name="name">Inhetitance In Preference</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//page/group/field[@name='preferences']" position="after"> <field name="consultation_place" readonly="0"/> </xpath>
</field>
</record>
</data>
</openerp>
I do not understand from where my mistake can you orient me towards the solution?
Sorry and error :
ProgrammingError: column res_users.consultation_place does not exist
LINE 1: ... as "create_uid","res_users"."active" as "active","res_users...