Config Wizard does not detect existing fiscal year if date_start <> 01/01/xxx

Bug #1139892 reported by Jerome Sonnet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

My company has a starting accounting yead on May the 1st.

I therefor configure a fiscal_year from 1/05 to 30/04.

In res_config.py in account module, one can find at line 274

fiscalyear_count = fiscalyear.search_count(cr, uid,
                [('date_start', '<=', config.date_start), ('date_stop', '>=', config.date_stop),
                 ('company_id', '=', config.company_id.id)],

where date_start and date_stop are defaulted to

        'date_start': lambda *a: time.strftime('%Y-01-01'),
        'date_stop': lambda *a: time.strftime('%Y-12-31'),

this leads to the config wizard to not detect the existing fiscal_year and corresponding period, then it tries to create new ones and complains there is a period overlap for the given company.

I would relax the test to see if there is one fiscal year for the company company, i.e.

  [('company_id', '=', config.company_id.id)],

This worked for me at the least.

I am on the 7.0 nightly build.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.