[7.0] bug when creating budget lines

Bug #1204082 reported by Houssine
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Undecided
OpenERP Publisher's Warranty Team

Bug Description

Hi,

I've encoured an error while trying to define a budget in OpenERP 7.0 with the latest sources.

To reproduce :

- create a budget
- create a budget line
- for the budget line define a analytical account, amount, dates from/ to, budgetary position(don't assign accounts for budgetary position)

If you forgot to assign accounts to budgetary position saving your line will block your budget. You won't be able anymore to edit it.

You should receive an error but it should allow you to correct or to assign account afterward. So this bug is blocking your are unable to continue creating the budget.

Thanks for you help,
Houssine

Tags: maintenance

Related branches

Revision history for this message
Houssine (houssine-bakkali) wrote :

here is the stack trace shown in the logs

2013-07-23 12:25:10,500 6752 ERROR vlabus2 openerp.netsvc: Error!
The Budget 'IT' has no accounts!
Traceback (most recent call last):
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\service\web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\orm.py", line 3724, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\osv\fields.py", line 1133, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\addons\account_budget\account_budget.py", line 139, in _prac
    res[line.id] = self._prac_amt(cr, uid, [line.id], context=context)[line.id]
  File "C:\Documents and Settings\BE007199\workspace\openerp_server_7_0_20130715\openerp\addons\account_budget\account_budget.py", line 119, in _prac_amt
    raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
except_osv: (u'Error!', u"The Budget 'IT' has no accounts!")

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
status: New → In Progress
Revision history for this message
Chandni Machchhar(OpenERP) (cac-openerp) wrote :

Hello,

 It has been fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-595714-chandni branch.

 Revision No. : 9338
 Revision ID. : <email address hidden>

 It will be available in 7.0 soon.

Thanks,
Chandni.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Houssine (houssine-bakkali) wrote :

Hi Guys,

could we have some progress getting this merged please? Anything blocking somewhere?

Thanks
Houssine

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Houssine, you linked this bug to OCB. As per project policy, in that case we expect you to port an available fix (tested by you) to the ocb project and propose a merge. If you are not planning to do so, you should unlink the ocb-project from this bug. Thanks!

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I see the bug is still linked to ocb, and even set to fix-committed. There is no ocb-branch linked to this bug and I have not been able to find one so I am unlinking this bug from ocb-addons.

no longer affects: ocb-addons/7.0
no longer affects: ocb-addons
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.