[FIX] res_company: fix method _get_rml_footer_by_line when rml_footer is empty

bzr revid: rco@openerp.com-20120907093643-wec8s0wvmvc68rj4
This commit is contained in:
Raphael Collet
2012-09-07 11:36:43 +02:00
parent 8c8e128d21
commit 329b7cdcfe
+2 -2
View File
@@ -168,8 +168,8 @@ class res_company(osv.osv):
return {'value': {'rml_footer': res, 'rml_footer_readonly': res}}
def _get_rml_footer_by_line(self, cr, uid, ids, rml_footer, line, context=None):
rml_footer_lines = rml_footer.split('\n')
return rml_footer_lines[line] if line < len(rml_footer_lines) else ""
rml_footer_lines = (rml_footer or '').split('\n')
return rml_footer_lines[line] if line < len(rml_footer_lines) else ''
def _search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False, access_rights_uid=None):