Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
- result=super(account_invoice, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
- if(view_type=='form'):
- invoice=self.pool.get('account.invoice')
- active_id=context.get('active_id',False)
- current_state=invoice.browse(cr,uid,active_id).state
- if current_state=="paid":
- result['arch']='''<form string="Invoice" edit="false" ....................></form>'''
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement