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

« back to all changes in this revision

Viewing changes to account_journal/test/analytic_data.yml

  • Committer: chloups208
  • Date: 2011-09-07 12:58:12 UTC
  • mto: (307.2.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: chloups208@chloups208-laptop-20110907125812-dsb1jt93ae6bgfe2
[UF-390]pro forma invoice + shipment object refactoring + pack family object refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
-
2
 
  I create an Expense Account Type.
3
 
-
4
 
  !record {model: account.account.type, id: account_account_type_expense0}:
5
 
    close_method: unreconciled
6
 
    code: expense
7
 
    name: Expense
8
 
    sign: 1
9
 
-
10
 
  I create a 6101 Expense Account.
11
 
-
12
 
  !record {model: account.account, id: account_account_expense0}:
13
 
    code: '6101-expense-test'
14
 
    company_id: base.main_company
15
 
    currency_mode: current
16
 
    name: Expense Account
17
 
    type: other
18
 
    user_type: account_account_type_expense0
19
 
    activation_date: !eval datetime.today().strftime('%Y-01-01')
20
 
    default_destination_id: analytic_distribution.analytic_account_destination_operation
21
 
    destination_ids: [analytic_distribution.analytic_account_destination_operation, analytic_distribution.analytic_account_destination_support]
22
 
-
23
 
  I create a link between 6101 expense account and Operation destination
24
 
-
25
 
  !record {model: account.destination.link, id: tuple_operation_6101}:
26
 
    account_id: account_account_expense0
27
 
    destination_id: analytic_distribution.analytic_account_destination_operation
28
 
-
29
 
  I create a link between 6101 expense account and Support destination
30
 
-
31
 
  !record {model: account.destination.link, id: tuple_support_6101}:
32
 
    account_id: account_account_expense0
33
 
    destination_id: analytic_distribution.analytic_account_destination_support
34
 
-
35
 
  I create an analytic account attached to OC (Operation Center) named Gabon
36
 
-
37
 
  !record {model: account.analytic.account, id: analytic_account_gabon}:
38
 
    name: "Gabon"
39
 
    currency_id: 1
40
 
    code: GAB
41
 
    type: normal
42
 
    category: OC
43
 
    parent_id: analytic_distribution.analytic_account_project
44
 
    date: !eval "'%s-01-01' %(datetime.now().year + 2)"
45
 
-
46
 
  I create an analytic account attached to OC (Operation Center) named Kenya
47
 
-
48
 
  !record {model: account.analytic.account, id: analytic_account_kenya}:
49
 
    name: "Kenya"
50
 
    currency_id: 1
51
 
    code: KEN
52
 
    type: normal
53
 
    category: OC
54
 
    parent_id: analytic_distribution.analytic_account_project
55
 
    date: !eval "'%s-01-01' %(datetime.now().year + 2)"
56
 
-
57
 
  I create an FP analytic account named Gabon Hospital attached to Gabon CC
58
 
-
59
 
  !record {model: account.analytic.account, id: analytic_account_fp_gabon_hospital}:
60
 
    name: "Gabon Hospital"
61
 
    currency_id: 1
62
 
    code: GABH
63
 
    type: normal
64
 
    category: FUNDING
65
 
    parent_id: analytic_distribution.analytic_account_funding_pool
66
 
    date: !eval "'%s-01-01' %(datetime.now().year + 2)"
67
 
    cost_center_ids: [analytic_account_gabon]
68
 
    tuple_destination_account_ids: [tuple_operation_6101]
69
 
-
70
 
  I create an FP analytic account named Kenya AIDS attached to Kenya CC
71
 
-
72
 
  !record {model: account.analytic.account, id: analytic_account_fp_kenya_aids}:
73
 
    name: "Kenya AIDS"
74
 
    currency_id: 1
75
 
    code: KENA
76
 
    type: normal
77
 
    category: FUNDING
78
 
    parent_id: analytic_distribution.analytic_account_funding_pool
79
 
    date: !eval "'%s-01-01' %(datetime.now().year + 2)"
80
 
    cost_center_ids: [analytic_account_kenya]
81
 
    tuple_destination_account_ids: [tuple_support_6101]
82
 
-
83
 
  I create a global analytical distribution
84
 
-
85
 
  !record {model: analytic.distribution, id: global_distrib_1}:
86
 
    name: GLOB DISTR 1
87
 
-
88
 
  I create a cost center distribution line for gabon
89
 
-
90
 
  !record {model: cost.center.distribution.line, id: cost_center_gabon}:
91
 
    name: CC Line 1
92
 
    amount: 0.0
93
 
    percentage: 75.0
94
 
    currency_id: 1
95
 
    analytic_id: analytic_account_gabon
96
 
    distribution_id: global_distrib_1
97
 
    destination_id: analytic_distribution.analytic_account_destination_operation
98
 
-
99
 
  I create a cost center distribution line for kenya
100
 
-
101
 
  !record {model: cost.center.distribution.line, id: cost_center_kenya}:
102
 
    name: CC Line 2
103
 
    amount: 0.0
104
 
    percentage: 25.0
105
 
    currency_id: 1
106
 
    analytic_id: analytic_account_kenya
107
 
    distribution_id: global_distrib_1
108
 
    destination_id: analytic_distribution.analytic_account_destination_support
109
 
-
110
 
  I create a funding pool distribution line for gabon
111
 
-
112
 
  !record {model: funding.pool.distribution.line, id: funding_pool_gabon}:
113
 
    name: FP Line 1
114
 
    amount: 0.0
115
 
    percentage: 75.0
116
 
    currency_id: 1
117
 
    analytic_id: analytic_account_fp_gabon_hospital
118
 
    distribution_id: global_distrib_1
119
 
    cost_center_id: analytic_account_gabon
120
 
    destination_id: analytic_distribution.analytic_account_destination_operation
121
 
-
122
 
  I create a funding pool distribution line for kenya
123
 
-
124
 
  !record {model: funding.pool.distribution.line, id: funding_pool_kenya}:
125
 
    name: FP Line 2
126
 
    amount: 0.0
127
 
    percentage: 25.0
128
 
    currency_id: 1
129
 
    analytic_id: analytic_account_fp_kenya_aids
130
 
    cost_center_id: analytic_account_kenya
131
 
    destination_id: analytic_distribution.analytic_account_destination_support
132
 
    distribution_id: global_distrib_1
133
 
-
134
 
  I overwrite periods with right number and open them
135
 
-
136
 
  !python {model: account.period}: |
137
 
    import datetime
138
 
    period_ids = self.search(cr, uid, [], order='date_start, name')
139
 
    for p in self.browse(cr, uid, period_ids):
140
 
      self.write(cr, uid, [p.id], {'number': int(datetime.datetime.strptime(p.date_start, '%Y-%m-%d').strftime('%m'))})
141
 
    self.action_set_state(cr, uid, period_ids, {'state': 'draft'})