[Trunk] bank reconciliation error with voucher without partner

Bug #1179762 reported by David Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 3
openerp-account_voucher_group
New
Undecided
Unassigned

Bug Description

Apparently, if you try to process a voucher that was imported in a bank statement reconciliation which does not have a partner set, there will be an error (see below). "Creating-a-voucher-without-a-partner" is not blocked in the voucher module, though. Maybe a partner could just be made mandatory, also in the GUI.

Reproduction: (please can anyone outside my system confirm?)
1. create a voucher without a partner
2. import it to the bank statment
3. validate the bank statment

openerp 7.0 - all up to date

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1083, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1497, in button_confirm_bank
    return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context=context)
  File "/opt/openerp/server/openerp/addons/account/account_bank_statement.py", line 427, in button_confirm_bank
    self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context)
  File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1519, in create_move_from_st_line
    wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
  File "/opt/openerp/server/openerp/workflow/wkf_service.py", line 119, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/opt/openerp/server/openerp/workflow/instance.py", line 43, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 60, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 40, in create
    process(cr, res, ident, stack=stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 52, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/opt/openerp/server/openerp/workflow/workitem.py", line 106, in _execute
    returned_action = wkf_expr.execute(cr, ident, workitem, activity)
  File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 67, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/opt/openerp/server/openerp/workflow/wkf_expr.py", line 57, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/opt/openerp/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/server/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 830, in proforma_voucher
    self.action_move_line_create(cr, uid, ids, context=context)
  File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1303, in action_move_line_create
    ml_writeoff = self.writeoff_move_line_get(cr, uid, voucher.id, line_total, move_id, name, company_currency, current_currency, context)
  File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 1230, in writeoff_move_line_get
    account_id = voucher_brw.partner_id.property_account_payable.id
AttributeError: 'NoneType' object has no attribute 'id'

Related branches

David Arnold (d-arnold)
description: updated
description: updated
affects: openobject-addons → openerp-account-voucher-group
David Arnold (d-arnold)
description: updated
description: updated
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I do not think that this involves any of the account_banking modules so I am removing the Banking Addons project from this bug. Looks like this bug is for openobject-addons. Please reply if you think I am wrong.

affects: account-banking → openobject-addons
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello David,

I have Investigated your Issue. But It's ambiguous to us regarding to step-1. so would you please elaborate more(create a voucher without a partner). and It's batter for us If you provide step or video for reproduce this Issue.

Thank you and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
David Arnold (d-arnold) wrote : Re: [Bug 1179762] Re: bank reconciliation error with voucher without partner
Download full text (5.2 KiB)

Hello Amit

Do you know a lean and simple screen recorder tool for that matter?

Best David

Am Freitag, 17. Mai 2013 schrieb Amit Bhavsar (Open ERP) <
<email address hidden>>:

> Hello David,
>
> I have Investigated your Issue. But It's ambiguous to us regarding to
> step-1. so would you please elaborate more(create a voucher without a
> partner). and It's batter for us If you provide step or video for
> reproduce this Issue.
>
> Thank you and waiting for your reply!
>
> ** Changed in: openobject-addons
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1179762
>
> Title:
> bank reconciliation error with voucher without partner
>
> Status in Voucher Group for OpenERP:
> New
> Status in OpenERP Addons (modules):
> Incomplete
>
> Bug description:
> Apparently, if you try to process a voucher that was imported in a
> bank statement reconciliation which does not have a partner set, there
> will be an error (see below). "Creating-a-voucher-without-a-partner"
> is not blocked in the voucher module, though. Maybe a partner could
> just be made mandatory, also in the GUI.
>
> Reproduction: (please can anyone outside my system confirm?)
> 1. create a voucher without a partner
> 2. import it to the bank statment
> 3. validate the bank statment
>
> openerp 7.0 - all up to date
>
> Client Traceback (most recent call last):
> File "/opt/openerp/server/openerp/addons/web/http.py", line 195, in
> dispatch
> response["result"] = method(self, **self.params)
> File "/opt/openerp/server/openerp/addons/web/controllers/main.py",
> line 1083, in call_button
> action = self._call_kw(req, model, method, args, {})
> File "/opt/openerp/server/openerp/addons/web/controllers/main.py",
> line 1071, in _call_kw
> return getattr(req.session.model(model), method)(*args, **kwargs)
> File "/opt/openerp/server/openerp/addons/web/session.py", line 43, in
> proxy
> result = self.proxy.execute_kw(self.session._db, self.session._uid,
> self.session._password, self.model, method, args, kw)
> File "/opt/openerp/server/openerp/addons/web/session.py", line 31, in
> proxy_method
> result = self.session.send(self.service_name, method, *args)
> File "/opt/openerp/server/openerp/addons/web/session.py", line 104, in
> send
> raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
>
> Server Traceback (most recent call last):
> File "/opt/openerp/server/openerp/addons/web/session.py", line 90, in
> send
> return openerp.netsvc.dispatch_rpc(service_name, method, args)
> File "/opt/openerp/server/openerp/netsvc.py", line 295, in dispatch_rpc
> result = ExportService.getService(service_name).dispatch(method,
> params)
> File "/opt/openerp/server/openerp/service/web_services.py", line 614,
> in dispatch
> res = fn(db, uid, *params)
> File "/opt/openerp/server/openerp/osv/osv.py", line 169, in execute_kw
> return self.execute(db, uid, obj, method, *args, **kw or {})
> File "/opt/openerp/server/openerp/osv/osv.py", line 123, in wrapper
> re...

Read more...

Revision history for this message
David Arnold (d-arnold) wrote :
Download full text (6.7 KiB)

Hello Amit

I can't reproduce on my test environment because accounts are not properly
set up. So I'll take screenshots and black out where necessary.

So first I created a voucher with no partner (supplier). (see screenshot 1)

I then importet this voucher to the bank reconsiliation and got the
descirbed error. (No screenshot available)

Only after I added (on the bank statement screen) a partner to the
line (see screenshot 2), I could process the bank satement successfully.

I hope this helps clarify...

Best David

[image: Inline-Bild 1]

[image: Inline-Bild 3]

*Mit freundlichen Grüßen*

David Arnold B.A. HSG
Geschäftsführer

DresMed UG (haftungsbeschränkt)*
*Merowingerstr. 24a
82166 Gräfelfing

T +41 77 415 2412
E <email address hidden>

Sitz: Gräfelfing | AG München, HRB 203 992 | Geschäftsführer: David Arnold**
 | USt.-ID: DE287850553

Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den
bezeichneten Adressaten bestimmt. Falls Sie nicht der angegebene Empfänger
sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender unverzüglich und löschen Sie diese
E-Mail sofort. Bitte beachten Sie, dass jede Form der Kenntnisnahme,
Veröffentlichung, Vervielfältigung oder Weitergabe dieser E-Mail unzulässig
ist. Die Sicherheit von Übermittlungen per E-Mail kann nicht garantiert
werden!

2013/5/17 David Arnold <email address hidden>

> Hello Amit
>
> Do you know a lean and simple screen recorder tool for that matter?
>
> Best David
>
> Am Freitag, 17. Mai 2013 schrieb Amit Bhavsar (Open ERP) <
> <email address hidden>>:
>
> Hello David,
>>
>> I have Investigated your Issue. But It's ambiguous to us regarding to
>> step-1. so would you please elaborate more(create a voucher without a
>> partner). and It's batter for us If you provide step or video for
>> reproduce this Issue.
>>
>> Thank you and waiting for your reply!
>>
>> ** Changed in: openobject-addons
>> Status: New => Incomplete
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1179762
>>
>> Title:
>> bank reconciliation error with voucher without partner
>>
>> Status in Voucher Group for OpenERP:
>> New
>> Status in OpenERP Addons (modules):
>> Incomplete
>>
>> Bug description:
>> Apparently, if you try to process a voucher that was imported in a
>> bank statement reconciliation which does not have a partner set, there
>> will be an error (see below). "Creating-a-voucher-without-a-partner"
>> is not blocked in the voucher module, though. Maybe a partner could
>> just be made mandatory, also in the GUI.
>>
>> Reproduction: (please can anyone outside my system confirm?)
>> 1. create a voucher without a partner
>> 2. import it to the bank statment
>> 3. validate the bank statment
>>
>> openerp 7.0 - all up to date
>>
>> Client Traceback (most recent call last):
>> File "/opt/openerp/server/openerp/addons/web/http.py", line 195, in
>> dispatch
>> response["result"] = method(self, **self.params)
>> File "/opt/openerp/server/openerp/addons/web/controllers/main.py",
>> line 1083, in call_button
>> act...

Read more...

summary: - bank reconciliation error with voucher without partner
+ [Trunk] bank reconciliation error with voucher without partner
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello David,

Yes, I have faced the same problem when import voucher without partner.

Thanks!

Changed in openobject-addons:
status: Incomplete → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Ishwar Malvi(OpenERP) (ima-openerp) wrote :

Hello,

  It has been fix committed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1179762-ishwar branch.
  Revision No: 8757.
  Revision ID: <email address hidden>

Thanks,
Ishwar Malvi

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Opinion
status: Opinion → Fix Committed
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.