mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] try to find a FY start date according to the start date from
choosen period [IMP] date fields required in ledger wizard
This commit is contained in:
committed by
Simone Orsi
parent
5b5ff9830c
commit
f577f3f8da
@@ -3,7 +3,7 @@
|
||||
# Copyright 2016 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from openerp import models
|
||||
from openerp.tools import (DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||
|
||||
|
||||
class DateRange(models.Model):
|
||||
@@ -15,7 +15,7 @@ class DateRange(models.Model):
|
||||
with @param:date <= date_start
|
||||
"""
|
||||
fy_id = self.env.ref('account_fiscal_year.fiscalyear')
|
||||
date_str = date.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
date_str = date.strftime(DEFAULT_SERVER_DATE_FORMAT)
|
||||
s_args = [
|
||||
('type_id', '=', fy_id.id),
|
||||
('date_start', '<=', date_str),
|
||||
|
||||
Reference in New Issue
Block a user