Skip to content
Snippets Groups Projects
Commit 8cb9274d authored by Amit Patel's avatar Amit Patel
Browse files

improve code

bzr revid: apa@tinyerp.com-20101015121513-o8dsvcfgbr67ytzc
parent b741536d
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ class tax_report(rml_parse.rml_parse):
'get_company': self._get_company,
'get_currency': self._get_currency,
'get_lines': self._get_lines,
'get_years': self.get_years,
'get_years': self.get_years,
})
......@@ -51,12 +51,12 @@ class tax_report(rml_parse.rml_parse):
if form['periods']:
periods_l = self.pool.get('account.period').read(self.cr, self.uid, form['periods'], ['name'])
for period in periods_l:
if res['periods']=='':
res['periods'] = period['name']
else:
res['periods'] += ", "+ period['name']
if res['periods']=='':
res['periods'] = period['name']
else:
res['periods'] += ", "+ period['name']
return res
def _get_lines(self, based_on, period_list, company_id=False, parent=False, level=0, context={}):
res = self._get_codes(based_on, company_id, parent, level, period_list, context=context)
......
......@@ -27,12 +27,12 @@ class account_vat_declaration(osv.osv_memory):
_inherit = "account.common.account.report"
_columns = {
'based_on': fields.selection([('invoices','Invoices'),
('payments','Payments'),],
'Based On', required=True),
('payments','Payments'),],
'Based On', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
'fiscalyear': fields.many2many('account.fiscalyear','vat_fiscal_rel','fiscal_id','Fiscal Year',required=True),
}
}
def _get_company(self, cr, uid, context={}):
user_obj = self.pool.get('res.users')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment