ir.attachment: mark 'type' and 'company_id' with change_defaults
authorP. Christeas <p_christ@hol.gr>
Tue, 23 Nov 2010 15:31:59 +0000 (17:31 +0200)
committerP. Christeas <p_christ@hol.gr>
Tue, 23 Nov 2010 15:31:59 +0000 (17:31 +0200)
Other fields of attachments (like the directories, in document) should
have their default properties depending on these.

bzr revid: p_christ@hol.gr-20101123153159-wpus8bxls1q03ks9

bin/addons/base/ir/ir_attachment.py

index fb621ea..b536ae1 100644 (file)
@@ -114,11 +114,11 @@ class ir_attachment(osv.osv):
         'url': fields.char('Url', size=512, oldname="link"),
         'type': fields.selection(
                 [ ('url','URL'), ('binary','Binary'), ],
-                'Type', help="Binary File or external URL", required=True),
+                'Type', help="Binary File or external URL", required=True, change_default=True),
 
         'create_date': fields.datetime('Date Created', readonly=True),
         'create_uid':  fields.many2one('res.users', 'Owner', readonly=True),
-        'company_id': fields.many2one('res.company', 'Company'),
+        'company_id': fields.many2one('res.company', 'Company', change_default=True),
     }
     
     _defaults = {