Rename fields '_id' to '_ids', to reflect the change from many2one to many2many
[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     default_debit_account_id: cash
30     default_credit_account_id: cash
31     company_id: base.main_company
32     centralisation: 1
33 -
34   I called the Generate Fiscalyear Opening Entries wizard
35 -
36   !record {model: account.fiscalyear.close, id: account_fiscalyear_close_0}:
37     fy2_id: account_fiscalyear_fiscalyear0
38     fy_id: account.data_fiscalyear
39     journal_id: account.close_journal
40     period_id: account_period_jan11
41     report_name: End of Fiscal Year Entry
42 -
43   I clicked on create Button
44
45 -
46   !python {model: account.fiscalyear.close}: |
47     self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US',
48       "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")],
49       "tz": False, "active_id": ref("account.menu_wizard_fy_close"), })