[6.1] account demo data - wrong periods' definition for field special

Bug #924200 reported by Yannick Vaucher @ Camptocamp
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Low
OpenERP Publisher's Warranty Team

Bug Description

Hello,

In 6.1 revno 6453

In account/demo/account_demo.xml

Demo data have no opening period and all periods are set to special.

There must be 1 special (opening period) and 12 standard periods.

Here is a patch to fix this.

Regards,
Yannick

Tags: maintenance

Related branches

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Leonardo Pistone (lepistone) wrote :

Yes, that was reported in the past but I can't find the original bug.
The issue here is that they break the c2c financial reports (i'm sure you know that :))). It is a bug anyway IMO. The problem is that OpenERP allows special periods to overlap, and making all the sample ones special is an intentional hack to make the automated tests work. A cleaner solution would be nice, though.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Thanks for pointing that out.

I think you are talking about this forgotten bug report in 6.0:
https://bugs.launchpad.net/openobject-addons/+bug/713562

Still a solution is needed in 6.1.

Having demo data that aren't as if they were generated by "Create Month period" of fiscal year make those data wrong :-/
As it is now we cannot test code with those data when we have to exclude opening entries.

Maybe the config wizard should give a warning in case of demo data presence and erase those datas if present. (might be a big erasing dues to related data to descent though everything)
Otherwise, if the purpose of demo data is to be present as the same time as real data a boolean could be needed in open-object to define if it is a demo data or not and having a separared context for each.

Regards,
Yannick

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Yannick Vaucher,

Thanks for reporting and contribution. The solution for this bug is proposed in the branch : https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-924200-mdi/

with following Revision ID and Number.

Revision ID : <email address hidden>
Revision Number : 6456

But, we cannot accept special=False, according to the comment #6 by qdp on this https://bugs.launchpad.net/openobject-addons/+bug/713562 bug.

Thanks and Regards,

Divyesh Makwana(MDI)

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

The demo data should not prevent to recreate real periods for the current fiscal year. That's why we use the "special" field in the demo data. Note that these demo periods are necessary for other demo data...

You should not load the demo data on an actual production database.

Changed in openobject-addons:
status: Fix Committed → Won't Fix
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

So theorically you have either demo data or prod data ?

In that case creating real periods could allow to erase previous periods data.
(A check could even be done to know if demo data were loaded, in order to know if the user is doing a mistake or if he is configuring his erp.)

Still, in my opinion, the current period demo data are invalid to make real tests.
This mostly in case of code that is using "special" field to find a special period. This code cannot be tested correctly.

Yannick

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

I thinkg that having all special periods with a special flag is a non-sense. (even if I understand why you did that)
This flag is not just a special flag which allows the overlap, it is also a flag which indicates it is an Opening period.
Reassure me, the yaml tests does not use this periods, does them ?

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP Publisher's Warranty Team (openerp-opw)
status: Won't Fix → New
tags: added: maintenance
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.