~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to account_activable/test/account_activable.yml

  • Committer: jf
  • Date: 2011-05-16 09:55:17 UTC
  • mfrom: (129.1.1 unifield-wm)
  • Revision ID: jf@tempo4-20110516095517-giuzv2mouka39jb8
UF-270 Advance return in a currency that is not the functional currency

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
-
24
24
  !python {model: account.account}: |
25
25
    ac = self.browse(cr, uid, ref("account_1"))
26
 
    import datetime
27
 
    from dateutil.relativedelta import relativedelta
28
 
    assert  ac.activation_date == (datetime.datetime.today() + relativedelta(months=-3)).strftime('%Y-%m-%d'), "Wrong activation date"
 
26
    from mx import DateTime
 
27
    assert  ac.activation_date == (DateTime.now()+DateTime.RelativeDateTime(months=-3)).strftime('%Y-%m-%d'), "Wrong activation date"
29
28
 
30
29
-
31
30
  I create an analytical journal, ...
50
49
    type: cash
51
50
    view_id: journal_view_1
52
51
    analytic_journal_id: analytic_journal_1
53
 
    default_debit_account_id: account_1
54
 
    default_credit_account_id: account_1
55
52
-
56
53
  ...a fiscal year, ...
57
54
-
111
108
    try:
112
109
      self.write(cr, uid, ref('move_line_test'), vals={'account_id': ref('account_1'), 'date': '%s-03-01' %(datetime.datetime.now().year + 2)})
113
110
    except Exception as exception:
114
 
      assert exception.value.startswith("The selected account is not active:"), "Date out"
 
111
      assert exception.value == "The account selected is not active.", "Date out"