Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

wizard basic don't show form

By
Nguyễn Xuân Huy
on 7/26/13, 5:42 AM 912 views

Hi , all ! i can't create a module use wizard inherit (osv.osv_memory) or (wizard.interface) , i use openerp 6.1 it run but don't show form ! code python: import wizard import pooler from osv import osv

def _action_open_window(self,cr,uid,data,context): view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'res.users', 'wizard_abc_password') return { 'type': 'ir.actions.act_window', 'name': 'user', 'view_mode': 'form', 'view_type': 'form', 'res_model': 'res.users', 'nodestroy': 'true', 'res_id': 1, # assuming the many2one is (mis)named 'student' 'views': [(False, 'form')], 'target':'new', 'view_id':view_id }

class abc_user(wizard.interface): name="abc.user" description="abc" abc_user_password_form = ''' <form string="Enter New Password"> <field name="pass"/> </form>''' abc_user_password_fields = { 'pass': {'string': 'New Password', 'type': 'char', 'required':True, 'size': 64, 'invisible' :True}, }

states = {
  'init': {
  'actions': [],

'result': {'type':'form', 'arch':abc_user_password_form, 'fields':abc_user_password_fields, 'state':[('end','Cancel','gtk-cancel'),('open','Open margins','gtk-ok')]} } 'open':{ 'actions':[], 'result':{'type':'action','action':_action_onpen_window,'state':'end'} } } abc_user_password('abc.user')

xml:

<openerp> <data>

<wizard string="Change Password" model="abc.user" name="abc_user" menu="False" id="wizard_abc_password"/>

<menuitem name="ABC/User/Change Password" id="menu_abc_password" type="wizard" action="wizard_abc_password"/>

</data> </openerp>

help me ! thanks all !

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/26/13, 5:42 AM
Seen: 912 times
Last updated: 3/16/15, 8:10 AM