This question has been flagged
1 Reply
6607 Views

Hi all,

I have an issue on a custom system with partner payments and the payment terms.

 

When I try to validate a payment for invoices and refunds, the system raise this error:

"Erreur!

You cannot validate a non-balanced entry.
Make sure you have configured payment terms properly.
The latest payment term line should be of the "Balance" type."

 

All the payment terms are correct (balance is the last line), the records that I tried to validate have no payment terms on them, I tried to desactivate all the payment terms but the error is still there.

 

Do you have any idea what I'm doing wrong?

 

Thanks.

Julien.

Avatar
Discard

Have you checked whether the Partner involved has Payment Term specified?

Author Best Answer

The partner, the SO, the invoices and the refund have no payment terms specified.

 

By the way thanks for the anwer.

Avatar
Discard

Than it is a bit strange because the account.voucher code automatically balance the entry, AFAIK. Can you provide the log when the error happen?

Author

Here is the log: 2014-11-13 19:28:55,480 9745 INFO DB_NAME werkzeug: 127.0.0.1 - - [13/Nov/2014 19:28:55] "POST /web/dataset/call_kw HTTP/1.1" 200 - 2014-11-13 19:28:55,953 9745 ERROR DB_NAME openerp.tools.safe_eval: Cannot eval u'proforma_voucher()' Traceback (most recent call last): File "/opt/openerp7dev/git/odoo/openerp/tools/safe_eval.py", line 287, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in File "/opt/openerp7dev/git/odoo/openerp/osv/orm.py", line 378, in function_proxy return attr(self._cr, self._uid, [self._id], *args, **kwargs) File "/opt/openerp7dev/bzr/canada/l10n_ca_account_check_writing/account_voucher.py", line 141, in proforma_voucher return super(account_voucher, self).proforma_voucher(cr, uid, ids, context=context) File "/opt/openerp7dev/git/odoo/addons/account_voucher/account_voucher.py", line 942, in proforma_voucher self.action_move_line_create(cr, uid, ids, context=context) File "/opt/openerp7dev/bzr/pallet-delivery/writeoff_lot_tracking/account.py", line 171, in action_move_line_create move_pool.post(cr, uid, [move_id], context={}) File "/opt/openerp7dev/git/odoo/addons/account/account.py", line 1290, in post raise osv.except_osv(_('Error!'), _('You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.')) except_osv: (u'Erreur!', u'You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.') 2014-11-13 19:28:55,955 9745 ERROR DB_NAME openerp.netsvc: Erreur! You cannot validate a non-balanced entry. Make sure you have configured payment terms properly. The latest payment term line should be of the "Balance" type. Traceback (most recent call last): File "/opt/openerp7dev/git/odoo/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp7dev/git/odoo/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp7dev/git/odoo/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp7dev/git/odoo/openerp/osv/osv.py", line 222, in exec_workflow res = self.exec_workflow_cr(cr, uid, obj, signal, *args) File "/opt/openerp7dev/git/odoo/openerp/osv/osv.py", line 215, in exec_workflow_cr return object._workflow_signal(cr, uid, [res_id], signal)[res_id] File "/opt/openerp7dev/git/odoo/openerp/osv/orm.py", line 4033, in _workflow_signal result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr) File "/opt/openerp7dev/git/odoo/openerp/workflow/wkf_service.py", line 119, in trg_validate res2 = instance.validate(cr, id, ident, signal) File "/opt/openerp7dev/git/odoo/openerp/workflow/instance.py", line 43, in validate workitem.process(cr, witem, ident, signal, force_running, stack=stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 60, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 175, in _split_test _join_test(cr, t[0], t[1], ident, stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 183, in _join_test create(cr,[activity], inst_id, ident, stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 40, in create process(cr, res, ident, stack=stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 52, in process result = _execute(cr, workitem, activity, ident, stack) File "/opt/openerp7dev/git/odoo/openerp/workflow/workitem.py", line 106, in _execute returned_action = wkf_expr.execute(cr, ident, workitem, activity) File "/opt/openerp7dev/git/odoo/openerp/workflow/wkf_expr.py", line 67, in execute return _eval_expr(cr, ident, workitem, activity['action']) File "/opt/openerp7dev/git/odoo/openerp/workflow/wkf_expr.py", line 57, in _eval_expr ret = eval(line, env, nocopy=True) File "/opt/openerp7dev/git/odoo/openerp/tools/safe_eval.py", line 287, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in File "/opt/openerp7dev/git/odoo/openerp/osv/orm.py", line 378, in function_proxy return attr(self._cr, self._uid, [self._id], *args, **kwargs) File "/opt/openerp7dev/bzr/canada/l10n_ca_account_check_writing/account_voucher.py", line 141, in proforma_voucher return super(account_voucher, self).proforma_voucher(cr, uid, ids, context=context) File "/opt/openerp7dev/git/odoo/addons/account_voucher/account_voucher.py", line 942, in proforma_voucher self.action_move_line_create(cr, uid, ids, context=context) File "/opt/openerp7dev/bzr/pallet-delivery/writeoff_lot_tracking/account.py", line 171, in action_move_line_create move_pool.post(cr, uid, [move_id], context={}) File "/opt/openerp7dev/git/odoo/addons/account/account.py", line 1290, in post raise osv.except_osv(_('Error!'), _('You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.')) except_osv: (u'Erreur!', u'You cannot validate a non-balanced entry.\nMake sure you have configured payment terms properly.\nThe latest payment term line should be of the "Balance" type.') 2014-11-13 19:28:55,960 9745 INFO DB_NAME werkzeug: 127.0.0.1 - - [13/Nov/2014 19:28:55] "POST /web/dataset/exec_workflow HTTP/1.1" 200 -

Julien, I'm afraid I would not be able to help you further. From the log you used pallet-delivery/writeoff_lot_tracking/account.py that I'm not well versed in. My suspicion will be something from that module. I'm also not well versed with l10n_ca_account_check_writing/account_voucher.py, but seeing the code it seems to be "safe" enough as it only writes value to another field. You might want to check this is the "clean" environment containing only Odoo official modules and see if it works.

Author

Hi Ivan, we have finnaly find the solution. If in your journal the constraint "Skip 'Draft' State for Manual Entries" is checked, the system will raise this message if you are want to do a paiement with negative write-off. It wants to validate a non-balanced entry so error message. Thanks.

Glad that you find the solution Julien.