diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2010-06-23 17:23:49 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2010-06-23 17:23:49 +0530 |
| commit | d2cb81281449f500743dab06257f2ea848b2b3e7 (patch) | |
| tree | d726fe49f656510717e293b52e2b4007ec5e04fb /addons/document/document.py | |
| parent | 312681ccd58e754220bfcdf073a144ab9060aa90 (diff) | |
[IMP] document: add new field company_id in document and directory model
bzr revid: hmo@tinyerp.com-20100623115349-ik8webt0myj6l43l
Diffstat (limited to 'addons/document/document.py')
| -rw-r--r-- | addons/document/document.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/document/document.py b/addons/document/document.py index 5d3075f7a4a..aa893b617c3 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -98,6 +98,7 @@ class document_file(osv.osv): ('binary','Binary'), ],'Type', help="Type is used to separate URL and binary File"), + 'company_id': fields.many2one('res.company', 'Company'), } def __get_def_directory(self, cr, uid, context=None): @@ -105,6 +106,7 @@ class document_file(osv.osv): return dirobj._get_root_directory(cr, uid, context) _defaults = { + 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'ir.attachment', context=c), 'user_id': lambda self, cr, uid, ctx:uid, 'file_size': lambda self, cr, uid, ctx:0, 'store_method': lambda *args: 'db', |
