Skip to content

Commit

Permalink
[IMP] When you configure OpenERP, you need a full control on how to d…
Browse files Browse the repository at this point in the history
…isplay the footer and bank accounts
  • Loading branch information
fpodoo committed Jun 12, 2012
1 parent f7e2da3 commit c991a5a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions openerp/addons/base/res/res_company.py
Expand Up @@ -88,17 +88,6 @@ def _get_address_data(self, cr, uid, ids, field_names, arg, context=None):
return result return result




def _get_bank_data(self, cr, uid, ids, field_names, arg, context=None):
""" Read the 'address' functional fields. """
result = {}
for company in self.browse(cr, uid, ids, context=context):
r = []
for bank in company.bank_ids:
if bank.footer:
r.append(bank.name_get(context=context)[0][1])
result[company.id] = ' | '.join(r)
return result

def _set_address_data(self, cr, uid, company_id, name, value, arg, context=None): def _set_address_data(self, cr, uid, company_id, name, value, arg, context=None):
""" Write the 'address' functional fields. """ """ Write the 'address' functional fields. """
company = self.browse(cr, uid, company_id, context=context) company = self.browse(cr, uid, company_id, context=context)
Expand All @@ -120,7 +109,7 @@ def _set_address_data(self, cr, uid, company_id, name, value, arg, context=None)
'partner_id': fields.many2one('res.partner', 'Partner', required=True), 'partner_id': fields.many2one('res.partner', 'Partner', required=True),
'rml_header1': fields.char('Report Header / Company Slogan', size=200, help="Appears by default on the top right corner of your printed documents."), 'rml_header1': fields.char('Report Header / Company Slogan', size=200, help="Appears by default on the top right corner of your printed documents."),
'rml_footer1': fields.char('General Information Footer', size=200), 'rml_footer1': fields.char('General Information Footer', size=200),
'rml_footer2': fields.function(_get_bank_data, type="char", string='Bank Accounts Footer', size=250, help="This field is computed automatically based on bank accounts defined, having the display on footer checkbox set."), 'rml_footer2': fields.char('Bank Accounts Footer', size=250, help="Write here your bank accounts for customer payments."),
'rml_header': fields.text('RML Header', required=True), 'rml_header': fields.text('RML Header', required=True),
'rml_header2': fields.text('RML Internal Header', required=True), 'rml_header2': fields.text('RML Internal Header', required=True),
'rml_header3': fields.text('RML Internal Header', required=True), 'rml_header3': fields.text('RML Internal Header', required=True),
Expand Down

0 comments on commit c991a5a

Please sign in to comment.