Skip to content

Commit

Permalink
[IMP] sale_order_type: fix problem when making a supplier refund
Browse files Browse the repository at this point in the history
  • Loading branch information
oihane committed May 19, 2017
1 parent a47e82b commit 70a71a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sale_order_type/models/account_invoice.py
Expand Up @@ -17,7 +17,8 @@ def _prepare_refund(self, invoice, date=None, period_id=None,
description=None, journal_id=None):
values = super(AccountInvoice, self)._prepare_refund(
invoice, date, period_id, description, journal_id)
if invoice.origin:
if invoice.type in ['out_invoice', 'out_refund'] and\
invoice.origin:
orders = self.env['sale.order'].search(
[('name', '=', invoice.origin)])
journal = False
Expand Down

0 comments on commit 70a71a0

Please sign in to comment.