[FIX] Account : Invoice with Invoice line of price 0.0 should be allowed for validati...
authorJay (OpenERP) <jvo@tinyerp.com>
Thu, 4 Nov 2010 08:15:41 +0000 (13:45 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Thu, 4 Nov 2010 08:15:41 +0000 (13:45 +0530)
lp bug: https://launchpad.net/bugs/615268 fixed

bzr revid: jvo@tinyerp.com-20101104081541-wx0nu7mvoad5bohe

addons/account/account_move_line.py

index ef6f3aa..7bfa536 100644 (file)
@@ -835,7 +835,7 @@ class account_move_line(osv.osv):
     def _update_check(self, cr, uid, ids, context={}):
         done = {}
         for line in self.browse(cr, uid, ids, context):
-            if line.move_id.state<>'draft':
+            if line.move_id.state<>'draft' and (not line.journal_id.entry_posted):
                 raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields !'))
             if line.reconcile_id:
                 raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry ! Please note that you can just change some non important fields !'))