[FIX] Subscription : Disallowed to change the Object linked to the document type.
lp bug: https://launchpad.net/bugs/435298 fixed bzr revid: jvo@tinyerp.com-20091112091453-wus13ocpep0rmgmp
This commit is contained in:
parent
35c3a054c2
commit
820e9b3893
|
@ -40,6 +40,12 @@ class subscription_document(osv.osv):
|
|||
_defaults = {
|
||||
'active' : lambda *a: True,
|
||||
}
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if 'model' in vals:
|
||||
raise osv.except_osv(_('Error !'),_('You cannot modify the Object linked to the Document Type!\nCreate another Document instead !'))
|
||||
return super(subscription_document, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
subscription_document()
|
||||
|
||||
class subscription_document_fields(osv.osv):
|
||||
|
|
Loading…
Reference in New Issue