Skip to content

Commit

Permalink
Update after review
Browse files Browse the repository at this point in the history
  • Loading branch information
acsonefho authored and lmignon committed Oct 31, 2019
1 parent 784c170 commit 1d51e7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions shopinvader_invoice/tests/test_invoice_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,21 @@ def _make_payment(self, invoice, journal=False, amount=False):
:return: bool
"""
ctx = {"active_model": invoice._name, "active_ids": invoice.ids}
wizard_obj = self.register_payments_obj.with_context(ctx)
wizard_obj = self.register_payments_obj.with_context(**ctx)
register_payments = wizard_obj.create(
{
"payment_date": fields.Date.today(),
"journal_id": self.bank_journal_euro.id,
"payment_method_id": self.payment_method_manual_in.id,
}
)
values = {}
if journal:
register_payments.write({"journal_id": journal.id})
values.update({"journal_id": journal.id})
if amount:
register_payments.write({"amount": amount})
values.update({"amount": amount})
if values:
register_payments.write(values)
register_payments.create_payment()

def test_get_invoice_logged(self):
Expand Down

0 comments on commit 1d51e7f

Please sign in to comment.