diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 6a64d5700b7..011e6f87a42 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -24,7 +24,7 @@ from osv import fields import os import tools from tools.translate import _ - +import base64 class multi_company_default(osv.osv): """ @@ -85,7 +85,8 @@ class res_company(osv.osv): 'logo' : fields.binary('Logo'), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), 'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'), - 'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users') + 'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users'), + 'account_no':fields.char('Account No.', size=64), } def search(self, cr, uid, args, offset=0, limit=None, order=None, @@ -179,6 +180,11 @@ class res_company(osv.osv): level -= 1 return True + def _get_logo(self, cr, uid, ids): + file_data = open('../pixmaps/openerp-header.png','rb').read() + return base64.encodestring(file_data) + + def _get_header2(self,cr,uid,ids): return """
@@ -240,7 +246,8 @@ class res_company(osv.osv): _defaults = { 'currency_id': _get_euro, 'rml_header':_get_header, - 'rml_header2': _get_header2 + 'rml_header2': _get_header2, + 'logo':_get_logo } _constraints = [