I am using odoo 12
sale_individual.py file
from odoo import fields, models
class SaleIndividual(models.Model):
_name = 'sale.individual'
_inherit = 'res.users'
name = fields.Char()
email = fields.Char()individual_description = fields.Char()
And the view file is sale_individual_view.xml<?xml version="1.0"?>
<odoo>
<record id="view_form_sale_custom_individual" model="ir.ui.view">
<field name="name">Individual Form</field>
<field name="model">sale.individual</field>
<field name="arch" type="xml">
<form string="Individual"> <group>
<field name="name" />
<field name="email" />
<field name="individual_description" />
</group>
</form>
</field>
</record>
<record id="view_tree_sale_custom_individual" model="ir.ui.view">
<field name="name">Individual Form</field>
<field name="model">sale.individual</field>
<field name="arch" type="xml">
<tree>
<field name="individual_description" />
</tree>
</field>
</record>
</odoo>After writing this code, I am getting the error.
"You cannot create a new user from here.
To create new user please go to configuration panel."But I want to create the new user on the new view sale_individual_view itself and want my data to enter table sale_individual in db
why do u want to inherit res.users? why dont you just create a seperate model and write a function to create res.user record,link it your model and call that function on create()
odoo inheritance: https://goo.gl/fGNfBY