odoo学习

odoo视图对应模型:model="ir.ui.view">

<record id="mrp_workcenter_view_light_inherit" model="ir.ui.view">
<field name="name">mrp.workcenter.form.inherit</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
<field name="arch" type="xml">
<field name="resource_calendar_id" position="after">
<field name="demo" />
</field>
</field>
</record>

odoo中action对应模型:model="ir.actions.act_window">

 <record id="auto_demo_001_action" model="ir.actions.act_window">
<field name="name">auto demo 001</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">auto.demo.001</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
<!-- Add Text Here -->
</p><p>
<!-- More details about what a user can do with this object will be OK -->
</p>
</field>
</record>

  

odoo中sequence中对应模型:model="ir.sequence">

<record id="seq_test_box" model="ir.sequence">
<field name="name">test Box</field>
<field name="code">test.box</field>
<field name="prefix">RT</field>
<field name="padding">6</field>
<field name="company_id" eval="False"/>
</record>

  

ODOO任意模块设置默认值:model="test.data"

 <record id="zimo_test_data_01" model="test.data"> --------》  默认值模型
<field name="name">PD001</field> --------》 默认字段与 值
</record> <record id="zimo_test_data_02" model="test.data">
<field name="name">PD002</field>
</record>
上一篇:【LeetCode】Anagram


下一篇:OpenStack控制节点上搭建Q版keystone服务(step3)