~philemon-core-editors/philemon/trunk

« back to all changes in this revision

Viewing changes to donation/test/validate.yml

  • Committer: Alexis de Lattre
  • Date: 2015-02-18 20:38:01 UTC
  • Revision ID: alexis@via.ecp.fr-20150218203801-djcar2cax4uteast
Add support for in-kind donations
Add in-kind and tax-receipt options in donation report
Add copyright notice in some XML files

Show diffs side-by-side

added added

removed removed

Lines of Context:
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'
 
41
-
 
42
  Validate donation4
 
43
-
 
44
  !function {model: donation.donation, name: validate}:
 
45
    - eval: "[obj(ref('donation4')).id]"
 
46
-
 
47
  Donation4 Check that no account move has been generated (full in-kind donation)
 
48
-
 
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)'
 
53
-
 
54
  Validate donation5
 
55
-
 
56
  !function {model: donation.donation, name: validate}:
 
57
    - eval: "[obj(ref('donation5')).id]"
 
58
-
 
59
  Donation5 Check that an account move has been generated (partial in-kind donation)
 
60
-
 
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'