38
38
- move_id.date == time.strftime('%Y-%m-01')
39
39
- move_id.journal_id.id == ref('account.cash_journal')
40
40
- move_id.state == 'posted'
44
!function {model: donation.donation, name: validate}:
45
- eval: "[obj(ref('donation4')).id]"
47
Donation4 Check that no account move has been generated (full in-kind donation)
49
!python {model: donation.donation}: |
50
donation = self.browse(cr, uid, ref('donation4'), context=context)
51
assert donation.state == 'done', 'Donation has not been set to done (donation4)'
52
assert not donation.move_id, 'Donation should not have an account move (donation4)'
56
!function {model: donation.donation, name: validate}:
57
- eval: "[obj(ref('donation5')).id]"
59
Donation5 Check that an account move has been generated (partial in-kind donation)
61
!python {model: donation.donation}: |
62
donation = self.browse(cr, uid, ref('donation5'), context=context)
63
assert donation.state == 'done', 'Donation has not been set to done (donation5)'
64
assert donation.move_id, 'No account move generated (donation5)'
65
# How to make this check work when the company currency != EUR ?
66
assert donation.move_id.amount == 400, 'Wrong amount on account move'