Error while trying to make a refund
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Unassigned | ||
openerp-icm |
Fix Committed
|
High
|
Sandy Carter (http://www.savoirfairelinux.com) |
Bug Description
I have made an order and did the whole process of delivering the articles and making an invoice.
Now I go to the invoice which has been paid. On top of the screen is a button "Refund Invoice".
When I click on it, a small screen appears to get some information from the user. As reason I type "Manco" (without quotes) and click on "Create Refund".
This generates the following error:
OpenERP Server Error
Client Traceback (most recent call last):
File "/usr/lib/
response[
File "/usr/lib/
action = self._call_kw(req, model, method, args, {})
File "/usr/lib/
return getattr(
File "/usr/lib/
result = self.proxy.
File "/usr/lib/
result = self.session.
File "/usr/lib/
raise xmlrpclib.
Server Traceback (most recent call last):
File "/usr/lib/
return openerp.
File "/usr/lib/
result = ExportService.
File "/usr/lib/
res = fn(db, uid, *params)
File "/usr/lib/
return self.execute(db, uid, obj, method, args, *kw or {})
File "/usr/lib/
return f(self, dbname, args, *kwargs)
File "/usr/lib/
res = self.execute_cr(cr, uid, obj, method, args, *kw)
File "/usr/lib/
return getattr(object, method)(cr, uid, args, *kw)
File "/usr/lib/
return self.compute_
File "/usr/lib/
refund_id = inv_obj.refund(cr, uid, [inv.id], date, period, description, journal_id, context=context)
File "/usr/lib/
context=
File "/usr/lib/
invoice_lines = self._refund_
TypeError: _refund_
I have installed the latest version of V7 from nightly.
I am using Ubuntu 12.04.2, 64 bit.
Related branches
- Maxime Chambreuil (http://www.savoirfairelinux.com): Approve (test)
- Jenkins Savoir-faire Linux (community): Approve (test)
- Guewen Baconnier @ Camptocamp: Approve (code review)
-
Diff: 1633 lines (+504/-528)12 files modifiedsale_commission/__init__.py (+2/-3)
sale_commission/__openerp__.py (+25/-27)
sale_commission/invoice.py (+61/-56)
sale_commission/partner.py (+7/-8)
sale_commission/partner_agent.py (+43/-43)
sale_commission/partner_view.xml (+1/-1)
sale_commission/sale_agent.py (+30/-29)
sale_commission/sale_order.py (+66/-64)
sale_commission/settled.py (+235/-249)
sale_commission/stock_picking.py (+23/-26)
sale_commission/wizard/__init__.py (+1/-1)
sale_commission/wizard/wizard_invoice.py (+10/-21)
affects: | account-invoicing → openobject-addons |
Changed in openerp-icm: | |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) |
Changed in openerp-icm: | |
status: | Confirmed → Fix Committed |
Issue caused by the usage of an additional module (sale_commission), which redefined the method account_ invoice. _refund_ cleanup_ lines, but without the usage of context. In the redefined method super is called, without context as well.
After changing the definition and adding the possible passed context to super, the refund is working.
So this bug can be closed.