From 80dc65aeea74a1e5a0cf6b40bcfeaa73681a40d2 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier <> Date: Mon, 28 Nov 2011 10:39:38 +0530 Subject: [PATCH] [FIX] account : Create Monthly Periods : unique key violation on Opening Periods lp bug: https://launchpad.net/bugs/894707 fixed bzr revid: mdi@tinyerp.com-20111128050938-5e2vizusnvq8zbth --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 8aa1569520e..f766b5871a8 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -880,7 +880,7 @@ class account_fiscalyear(osv.osv): for fy in self.browse(cr, uid, ids, context=context): ds = datetime.strptime(fy.date_start, '%Y-%m-%d') period_obj.create(cr, uid, { - 'name': _('Opening Period'), + 'name': "%s %s" % (_('Opening Period'), ds.strftime('%Y')), 'code': ds.strftime('00/%Y'), 'date_start': ds, 'date_stop': ds,