ผลต่างระหว่างรุ่นของ "Openerp/module 3"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) |
Jittat (คุย | มีส่วนร่วม) |
||
แถว 1: | แถว 1: | ||
− | == | + | == Template: view == |
+ | === module_view.xml === | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
แถว 9: | แถว 10: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | === list view === | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<record model="ir.ui.view" id="view_MODULE_MODEL_tree"> | <record model="ir.ui.view" id="view_MODULE_MODEL_tree"> | ||
แถว 21: | แถว 23: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | === form view === | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<record model="ir.ui.view" id="view_MODULE_MODEL_form"> | <record model="ir.ui.view" id="view_MODULE_MODEL_form"> | ||
แถว 33: | แถว 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | === action === | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
− | + | <record model="ir.actions.act_window" id="action_MODULE_MODEL"> | |
+ | <field name="name">MODEL</field> | ||
+ | <field name="res_model">MODULE.MODEL</field> | ||
+ | <field name="view_type">form</field> | ||
+ | <field name="view_mode">tree,form</field> | ||
+ | <field name="context">{'search_default_open_true':True}</field> | ||
+ | <field name="help" type="html"> | ||
+ | <p class="oe_view_nocontent_create"> | ||
+ | Click to add a .............. | ||
+ | </p> | ||
+ | </field> | ||
+ | </record> | ||
</syntaxhighlight> | </syntaxhighlight> |
รุ่นแก้ไขเมื่อ 03:25, 4 ธันวาคม 2556
Template: view
module_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
</data>
</openerp>
list view
<record model="ir.ui.view" id="view_MODULE_MODEL_tree">
<field name="name">MODULE.MODEL.tree</field>
<field name="model">MODULE.MODEL</field>
<field name="arch" type="xml">
<tree string="MODELNAME">
<field name="xxxxxxxxx"/>
</tree>
</field>
</record>
form view
<record model="ir.ui.view" id="view_MODULE_MODEL_form">
<field name="name">MODULE.MODEL.form</field>
<field name="model">MODULE.MODEL</field>
<field name="arch" type="xml">
<form string="MODEL">
<field name="xxxxxxxxxxx"/>
</form>
</field>
</record>
action
<record model="ir.actions.act_window" id="action_MODULE_MODEL">
<field name="name">MODEL</field>
<field name="res_model">MODULE.MODEL</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_open_true':True}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a ..............
</p>
</field>
</record>