[IMP]:config wizard for company setup
bzr revid: nch@tinyerp.com-20100513115029-wqwc3q444d4icali
This commit is contained in:
parent
5ff73e4c64
commit
2ec25243c7
|
@ -24,7 +24,7 @@ from osv import fields
|
||||||
import os
|
import os
|
||||||
import tools
|
import tools
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
|
import base64
|
||||||
|
|
||||||
class multi_company_default(osv.osv):
|
class multi_company_default(osv.osv):
|
||||||
"""
|
"""
|
||||||
|
@ -85,7 +85,8 @@ class res_company(osv.osv):
|
||||||
'logo' : fields.binary('Logo'),
|
'logo' : fields.binary('Logo'),
|
||||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
|
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
|
||||||
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'),
|
'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,
|
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||||
|
@ -179,6 +180,11 @@ class res_company(osv.osv):
|
||||||
level -= 1
|
level -= 1
|
||||||
return True
|
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):
|
def _get_header2(self,cr,uid,ids):
|
||||||
return """
|
return """
|
||||||
<header>
|
<header>
|
||||||
|
@ -240,7 +246,8 @@ class res_company(osv.osv):
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'currency_id': _get_euro,
|
'currency_id': _get_euro,
|
||||||
'rml_header':_get_header,
|
'rml_header':_get_header,
|
||||||
'rml_header2': _get_header2
|
'rml_header2': _get_header2,
|
||||||
|
'logo':_get_logo
|
||||||
}
|
}
|
||||||
|
|
||||||
_constraints = [
|
_constraints = [
|
||||||
|
|
Loading…
Reference in New Issue