[ADD] Added HTML view for Form view (example module).
bzr revid: noz@tinyerp.com-20100309131718-dhhb1j7m09rleosw
This commit is contained in:
parent
b4c290acd2
commit
86a2ba5547
|
@ -0,0 +1 @@
|
|||
import html_view
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name" : "Html View",
|
||||
"version" : "1.1",
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Inventory Control",
|
||||
"depends" : ['base'],
|
||||
"init_xml" : ['html_view.xml'],
|
||||
"demo_xml" : [],
|
||||
"description": """
|
||||
This is the test module which shows html tag supports in normal xml form view.
|
||||
""",
|
||||
'update_xml': ['html_view.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
|
||||
from osv import osv, fields
|
||||
|
||||
class html_view(osv.osv):
|
||||
_name = 'html.view'
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True, select=True),
|
||||
'comp_id': fields.many2one('res.company', 'Company', select=1),
|
||||
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
|
||||
}
|
||||
|
||||
html_view()
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="html_view_form" model="ir.ui.view">
|
||||
<field name="name">htmlform</field>
|
||||
<field name="model">html.view</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Html Example">
|
||||
<html>
|
||||
<h2>This is Test Html Page </h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Name :
|
||||
</td>
|
||||
<td>
|
||||
<field name="name"/>
|
||||
</td>
|
||||
<td>
|
||||
Company :
|
||||
</td>
|
||||
<td>
|
||||
<field name="comp_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<field name="bank_ids"/>
|
||||
</html>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_html_view_form" model="ir.actions.act_window">
|
||||
<field name="name">Html Test</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">html.view</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem action="action_html_view_form" id="html_form" parent="base.menu_address_book" sequence="20"/>
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue