[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:
Jay (Open ERP) 2009-11-12 14:44:53 +05:30
parent 35c3a054c2
commit 820e9b3893
1 changed files with 6 additions and 0 deletions

View File

@ -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):