In below example, I have written Python script to confirmation receipt through python code. Use below python code in your .py file :
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, required=True, states={'confirm':[('readonly', True)]}),
'partner_address_id': fields.many2one('res.partner.address', 'Contact Address', required=True, states={'confirm':[('readonly', True)]}),
'partner_contact': fields.char('Contact Name', size=64, required=True, states={'confirm': [('readonly', True)]}),
'partner_lang': fields.selection(_lang_get, 'Language', required=True, size=5, states={'confirm': [('readonly', True)]},
help="Documents will be printed in this language."),
'subject': fields.char('Subject', size=128, required=True, states={'confirm': [('readonly', True)]}),
'intro': fields.text('Intro', required=True, states={'confirm': [('readonly', True)]}),
'close': fields.text('Close', required=True, states={'confirm': [('readonly', True)]}),
0 Comment(s)