[REVIEW] account: correct YML of EDI
[odoo/odoo.git] / addons / account / test / account_fiscalyear_close.yml
1 -
2   In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear to which the entries will move
3 -
4   !record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}:
5     code: !eval "'FY%s'% (datetime.now().year+1)"
6     company_id: base.main_company
7     date_start: !eval "'%s-01-01' %(datetime.now().year+1)"
8     date_stop: !eval "'%s-12-31' %(datetime.now().year+1)"
9     name: !eval "'Fiscal Year %s' %(datetime.now().year+1)"
10 -
11   I create a period for the opening entries for the new fiscalyear
12 -
13   !record {model: account.period, id: account_period_jan11}:
14     company_id: base.main_company
15     date_start: !eval "'%s-01-01'% (datetime.now().year+1)"
16     date_stop: !eval "'%s-01-01'% (datetime.now().year+1)"
17     fiscalyear_id: account_fiscalyear_fiscalyear0
18     name: !eval "'OP %s' %(datetime.now().year+1)"
19     special: 1
20
21 -
22   I made modification in journal so it can move entries
23 -
24   !record {model: account.journal, id: account.close_journal}:
25     name: End of Year
26     code: NEW
27     type: situation
28     analytic_journal_id: sit
29     sequence_id: sequence_journal
30     default_debit_account_id: cash
31     default_credit_account_id: cash
32     company_id: base.main_company
33     view_id: account_journal_bank_view
34     centralisation: 1
35 -
36   I called the Generate Fiscalyear Opening Entries wizard
37 -
38   !record {model: account.fiscalyear.close, id: account_fiscalyear_close_0}:
39     fy2_id: account_fiscalyear_fiscalyear0
40     fy_id: account.data_fiscalyear
41     journal_id: account.close_journal
42     period_id: account_period_jan11
43     report_name: End of Fiscal Year Entry
44 -
45   I clicked on create Button
46
47 -
48   !python {model: account.fiscalyear.close}: |
49     self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US',
50       "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")],
51       "tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
52
53 -
54   I check the opening entries By using "Entries by Line wizard"
55 -
56   !record {model: account.move.journal, id: account_move_journal_0}:
57    {}
58 -
59   I clicked on Open Journal Button to check the entries
60
61 -
62   !python {model: account.move.journal}: |
63     self.action_open_window(cr, uid, [ref("account_move_journal_0")], {"lang": 'en_US',
64       "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
65       "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
66       })
67
68 #-
69 #  In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
70 #-
71 #  !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
72 #    fyear_id: account.data_fiscalyear
73 #-
74 #  I clicked on Open button
75 #-
76 #  !python {model: account.open.closed.fiscalyear}: |
77 #    self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
78 #      'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
79 #      "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
80 #-
81 #  I check the opening entries By using "Entries by Line wizard"
82 #-
83 #  !record {model: account.move.journal, id: account_move_journal_2}:
84 #    journal_id: account.sales_journal
85 #    period_id: account_period_jan11
86 #
87 #-
88 #  I checked the Opening entries are cancelled successfully
89 #-
90 #  !python {model: account.move.journal}: |
91 #    self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
92 #      "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
93 #      "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
94 #      })