openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #07115
[Bug 932054] [NEW] account - can not validate invoice
Public bug reported:
./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)
** Affects: openobject-addons
Importance: Undecided
Status: New
--
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):
New
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
Follow ups
References