I want to create my custon and simple app and I need to import phone_validation module. These module is correctly installed. The module is correctly installed, in fact in Database Structure -> Model is reported as phone.validation.mixin. But when I try to install my custom module the system informs me that the phone_validation_mixin is not present in the
system. What am I doing wrong?
This is the code
mybooking_view.xml
<?xml version="1.0" encoding="UTF-8"?>mybooking_menu.xml
<odoo>
<record model="ir.ui.view" id="mybooking_task">
<field name="name">My booking Task Form</field>
<field name="model">mybooking.task</field>
<field name="inherit_id" ref="res.company.view.form.phone_validation" />
<field name="priority" eval="15"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='Name']" position="before">
<field name="name"/>
</xpath>
<xpath expr="//field[@name='Surname']" position="before">
<field name="surname"/>
</xpath>
<xpath expr="//field[@name='Data']" position="after">
<field name="data"/>
</xpath>
<xpath expr="//field[@name='Treatment required']" position="after">
<field name="treatment"/>
</xpath>
<xpath expr="//field[@name='Additional notes']" position="after">
<field name="additionalNotes"/>
</xpath>
</field>
</record>
</odoo>
<?xml version="1.0" encoding="UTF-8"?>mybooking_model.py
<odoo>
<act_window id="action_mybooking_task"
name="My booking validation"
res_model="mybooking.task"
view_mode="tree,form" />
<menuitem id="menu_mybooking_task"
name="Booking"
action="action_mybooking_task" />
</odoo>
# coding: utf8
from odoo import models, fields
class MyBooking(models.Model):
_name = 'mybooking.task'
_description = 'my custom booking task'
_inherit = 'phone.validation.mixin'
name = fields.Char('Name', required=True)
surname = fields.Char('Surname', required=True)
data = fields.Datetime('Data', default=fields.Datetime.now())
treatment = fields.Text('Treatment required')
additionalNotes = fields.Text('Additional notes')
Please help me!