openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #07220
[Bug 932054] Re: account - can not validate invoice
Hello,
We have already improved the code with top_common = None line #1340 of
account.py.
Would you please check the revno of 6370.5.2 rco@openerp. So this
issue does not effect anymore.
Thank you!
** Changed in: openobject-addons
Status: New => Invalid
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/932054
Title:
account - can not validate invoice
Status in OpenERP Addons (modules):
Invalid
Bug description:
./account/account.py
UnboundLocalError: local variable 'top_common' referenced before
assignment
def button_validate(self, cursor, user, ids, context=None):
for move in self.browse(cursor, user, ids, context=context):
top = None
acc_line = None
acc_top = None
for line in move.line_id:
account = line.account_id
top_account = account
while top_account.parent_id:
top_account = top_account.parent_id
if not top_common:
top_common = top_account
elif top_account.id != top_common.id:
raise osv.except_osv(_('Error !'),
_('You cannot validate this journal entry because account "%s" does not belong to chart of accounts "%s"!') % (account.name, top_common.name))
return self.post(cursor, user, ids, context=context)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/932054/+subscriptions
References