|
Hi everybody!
I would like to implement graphic view of element hierarchy in my module. For examle: ELECTRONICS - (category) NOUTBOOKS - (subcategory) - elem 1 - elem 2
PLASMA TV (subcategory) - elem 1 - elem 2
I would like the user can add new category or element by mouse.
In OpenERP we have a class ir_ui_menu() .......... _columns = { 'name': fields.char('Menu', size=64, required=True, translate=True), 'sequence': fields.integer('Sequence'), 'child_id' : fields.one2many('ir.ui.menu', 'parent_id','Child IDs'), 'parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', select=True), 'groups_id': fields.many2many('res.groups', 'ir_ui_menu_group_rel', 'menu_id', 'gid', 'Groups', help="If you have groups, the visibility of this menu will be based on these groups. "\ "If this field is empty, OpenERP will compute visibility based on the related object's read access."), 'complete_name': fields.function(_get_full_name, method=True, string='Complete Name', type='char', size=128), 'icon': fields.selection(tools.icons, 'Icon', size=64), 'icon_pict': fields.function(_get_icon_pict, method=True, type='char', size=32), 'web_icon': fields.char('Web Icon File', size=128), 'web_icon_hover':fields.char('Web Icon File (hover)', size=128), 'web_icon_data': fields.function(_get_image_icon, string='Web Icon Image', type='binary', method=True, readonly=True, store=True, multi='icon'), 'web_icon_hover_data':fields.function(_get_image_icon, string='Web Icon Image (hover)', type='binary', method=True, readonly=True, store=True, multi='icon'), ...... }
It seems to be the proper object to implement the graphical view of element.
But i dont know how to use it, how this class will be represent in VIEW.xml, where user can add category or new element...
Anybody implement similar functionality in your module ?? In standard modules (sales, HR) i dont find the examples of such feature...
Thanks for advice.
|