summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2010-06-23 17:23:49 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-06-23 17:23:49 +0530
commitd2cb81281449f500743dab06257f2ea848b2b3e7 (patch)
treed726fe49f656510717e293b52e2b4007ec5e04fb /addons/document/document.py
parent312681ccd58e754220bfcdf073a144ab9060aa90 (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.py2
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',