I use the command create a custom app
"c:\Program Files (x86)\Odoo 11.0\python\python.exe" "c:\Program Files (x86)\Odoo 11.0\server\odoo-bin" scaffold custom4 "C:\Users\user1\Downloads\1"
and run succeffaully. But I see the custom4/models.py as below:
class 'custom4(models.Model):
_name = 'custom4.'custom4
I want to modify the class name as mymodel
class mymodel(models.Model):
_name = 'custom4.mymodel'
and include the custom4/views/views.xml
I replace the custom4.custom4 with custom4.mymodel.
After modify the model class name, I upgrade the custom app. It cause the Odd Server Error.
Model not found: custom4.mymodelError context:
View `custom4 list`
[view_id: 1479, xml_id: custom4.list, model: custom4.mymodel, parent_id: n/a]
None" while parsing file:/c:/users/user1/downloads/1/custom4/views/views.xml:5, near
<record model="ir.ui.view" id="custom4.list">
<field name="name">custom4 list</field>
<field name="model">custom4.mymodel</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="value"/>
<field name="value2"/>
</tree>
</field>
</record>I wish to know how to modify the class name in the python of custom4/models.py.Does somebody know how to achieve this goal?