ccount_cash_discount_61-7.0.0.7 - ERROR when paying a Supplier with a cash discount

Bug #1266981 reported by E.R. Spada II
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Camptocamp R&D Addons
New
Undecided
Unassigned

Bug Description

Hello,
I loaded account_cash_discount_61-7.0.0.7 and the entries seem to be correct but the invoice (Customer only) remains as an open balance unless a manual reconsiliation is done and then the amount needs to be written off again? Also since we define the income and expense account for the term discount, why is the write off account need to be specified? It should happen automatically based upon the account defaults set up in the cash discount?

The ERROR is when you try to PAY a Supplier invoice that has a cash discount, it will not work are creates the error, please see the trace:

VERSION: 7.0
(Build 27273)

    server (5189)
    addons (9737)
    web (4106)

Traceback (most recent call last):
  File "/opt/openerp/v7/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/v7/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/v7/addons/audittrail/audittrail.py", line 514, in execute_cr
    return fct_src(cr, uid, model, method, *args, **kw)
  File "/opt/openerp/v7/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/v7/addons/account_voucher/account_voucher.py", line 932, in button_proforma_voucher
    wf_service.trg_validate(uid, 'account.voucher', vid, 'proforma_voucher', cr)
  File "/opt/openerp/v7/server/openerp/workflow/wkf_service.py", line 119, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/opt/openerp/v7/server/openerp/workflow/instance.py", line 43, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 60, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 52, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/openerp/v7/server/openerp/workflow/workitem.py", line 106, in _execute
    returned_action = wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/openerp/v7/server/openerp/workflow/wkf_expr.py", line 67, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/openerp/v7/server/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/openerp/v7/server/openerp/tools/safe_eval.py", line 241, in safe_eval
    return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/openerp/v7/server/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/opt/openerp/v7/addons/account_voucher/account_voucher.py", line 936, in proforma_voucher
    self.action_move_line_create(cr, uid, ids, context=context)
  File "/opt/openerp/v7/server/openerp/addons/account_cash_discount_61/account.py", line 50, in action_move_line_create
    move_line_obj.reconcile_cash_discount(cr, uid, ids, voucher.move_id.id, lines, None, context)
  File "/opt/openerp/v7/server/openerp/addons/account_cash_discount_61/account.py", line 271, in reconcile_cash_discount
    raise osv.except_osv (_('Error !'), _('No write off account defined.'))
except_osv: (u'Error !', u'No write off account defined.')
TX,
ER, OPENERP Partner

Revision history for this message
Balaji Kannan (bkannan) wrote :

I am encountering the same issue. When I have a 1% 10 NET 30 terms and make a payment for 99% within 10 days, the balance is not written off automatically.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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