[trunk] Create Monthly Periods : unique key violation on Opening Periods

Bug #894707 reported by Guewen Baconnier @ Camptocamp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

Bug Description

Hello,

On 6.1, in the account module.

On the fiscal year form, there is a button to generate monthly periods en 3 months periods.
They generate 1 period per month or per 3 months plus a opening period.

The name of periods is unique per company.

The opening period is created with the name "Opening Period".
So it works one year, and no more when you want to create a new fiscal year again.

IntegrityError: duplicate key value violates unique constraint "account_period_name_company_uniq"
DETAIL: Key (name, company_id)=(Opening Period, 1) already exists.

Here is a patch to include the year in the period name to avoid this issue.

Thanks

Related branches

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
milestone: none → 6.1
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Guewen Baconnier,

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

with following Revision ID and Number.

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

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 :

Landed in trunk
revno: 5829 [merge]
revision-id: <email address hidden>

Changed in openobject-addons:
status: Fix Committed → Fix Released
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.