hi , i am new to openerp as well as python their exists an error while installing. please help me. my code was here.
from openerp.osv import osv, fields
class mymod(osv.Model):
_name = 'mymod.mymod'
_columns = {
'name': fields.char('Name', size = 100),
'dob': fields.date('Date of birth'),
'father_name': fields.char('Father Name', size = 100),
'state': fields.selection([
('new','New'),
('assigned','Assigned'),
('negotiation','Negotiation'),
('won','Won'),
('lost','Lost')], 'Stage', readonly=True),
}
def mymod_new(self, cr, uid, ids):
self.write(cr, uid, ids, {'state': 'new'})
return True
def mymod_assigned(self, cr, uid, ids):
self.write(cr, uid, ids, {'state': 'assigned'})
return True
def mymod_negotiation(self, cr, uid, ids):
self.write(cr, uid, ids, {'state': 'negotiation'})
return True
def mymod_won(self, cr, uid, ids):
self.write(cr, uid, ids, {'state': 'won'})
return True
def mymod_lost(self, cr, uid, ids):
self.write(cr, uid, ids, {'state': 'lost'})
return True
mymod()
i am studying the workflow example pls help me.. The error is IndentationError: unexpected indent
try removing all tabs and indenting again...