Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
  2. result=super(account_invoice, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
  3. if(view_type=='form'):
  4. invoice=self.pool.get('account.invoice')
  5. active_id=context.get('active_id',False)
  6. current_state=invoice.browse(cr,uid,active_id).state
  7. if current_state=="paid":
  8. result['arch']='''<form string="Invoice" edit="false" ....................></form>'''
  9. return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement