Browse Source

remove references to fiscalyear in code

pull/196/head
Leonardo Pistone 8 years ago
parent
commit
7c1e748eae
  1. 11
      account_financial_report_qweb/report/common.py
  2. 3
      account_financial_report_qweb/report/general_ledger.py

11
account_financial_report_qweb/report/common.py

@ -65,8 +65,6 @@ class CommonFinancialReport(models.AbstractModel):
start_date = fields.Date()
end_date = fields.Date()
fiscalyear = fields.Many2one('account.fiscalyear')
centralize = fields.Boolean()
target_move = fields.Char()
@ -89,9 +87,6 @@ class CommonFinancialReport(models.AbstractModel):
domain = [('centralized', '=', False)]
start_date = self.start_date
end_date = self.end_date
if self.fiscalyear:
start_date = self.fiscalyear.start_date
end_date = self.fiscalyear.end_date
if start_date:
domain += [('date', '>=', start_date)]
if end_date:
@ -104,9 +99,3 @@ class CommonFinancialReport(models.AbstractModel):
domain += [('account_id', 'in', self.account_ids.ids)]
return domain
@api.multi
def _get_moves_from_fiscalyear(self, account, fiscalyear,
target_move):
return self._get_moves_from_dates(
account, fiscalyear.date_start, fiscalyear.date_end, target_move)

3
account_financial_report_qweb/report/general_ledger.py

@ -71,9 +71,6 @@ class GeneralLedgerReport(models.TransientModel):
for key, val in data.iteritems():
if key in self.MAPPING:
values[self.MAPPING[key]] = val
elif key == 'fiscalyear':
if val:
values[key] = val[0]
elif key == 'journal_ids':
if val:
values[key] = [(6, 0, val)]

Loading…
Cancel
Save