From 073f324dfe64d6759ff6f6e5d7f484b8dbcc9f17 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Mon, 9 May 2016 10:54:56 +0200 Subject: [PATCH] [FIX] remove method on object because it's the same as in file --- account_fiscal_year/models/date_range.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/account_fiscal_year/models/date_range.py b/account_fiscal_year/models/date_range.py index 46b70e7a4..a5eb978a6 100644 --- a/account_fiscal_year/models/date_range.py +++ b/account_fiscal_year/models/date_range.py @@ -3,27 +3,11 @@ # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, _, exceptions -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT class DateRange(models.Model): _inherit = 'date.range' - def find_daterange_fy_start(self, date): - """ - try to find a date range with type 'fiscalyear' - with @param:date <= date_start - """ - fy_id = self.env.ref('account_fiscal_year.fiscalyear') - date_str = date.strftime(DEFAULT_SERVER_DATE_FORMAT) - s_args = [ - ('type_id', '=', fy_id.id), - ('date_start', '<=', date_str), - ('company_id', '=', self.company_id.id), - ] - date_range = self.env['date.range'].search(s_args) - return date_range.date_start - @api.multi def unlink(self): """