Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-576006-rha into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576006-rha/+merge/111182

Hello,

Wrong period is picked when we create invoice on 1st day of the fiscal year.

When we create invocie on 1st day of the year, then it automatically choose 
'Opening Period'
which is one day period. That period should be used at a time of closing the 
fiscal year and
create initial entries with that.

Steps to produce:
1. Install account module without demo data
2. create any invoice and provide date as 1st January
3. validate invoice, 'Opening Period ' will be automatically
   picked instead of '01/****'

Please review this fix.

Regards,
Rifakat Haradwala
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576006-rha/+merge/111182
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-576006-rha.
=== modified file 'account/account.py'
--- account/account.py	2012-03-22 12:24:19 +0000
+++ account/account.py	2012-06-20 10:07:30 +0000
@@ -1050,6 +1050,9 @@
         ids = self.search(cr, uid, args, context=context)
         if not ids:
             raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt)
+        for period in self.browse(cr, uid, ids, context=context):
+            if period.date_start == period.date_stop:
+                ids.remove(period.id)
         return ids
 
     def action_draft(self, cr, uid, ids, *args):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to