2
I create an analytic account
4
!record {model: account.analytic.account, id: anacc1}:
10
parent_id: analytic_distribution.analytic_account_project
11
date: !eval "'%s-01-01' %(datetime.now().year + 2)"
14
I create an Expense Account Type.
16
!record {model: account.account.type, id: acc_type_exp}:
17
close_method: unreconciled
24
!record {model: account.account, id: acc1}:
26
company_id: base.main_company
29
user_type: acc_type_exp
31
Analytic Journal Creation
33
!record {model: account.analytic.journal, id: alj1}:
35
company_id: base.main_company
39
I create analytic line with an entry sequence
41
!record {model: account.analytic.line, id: test_analytic}:
45
date: !eval "time.strftime('%Y-%m-%d')"
47
general_account_id: acc1
50
document_date: !eval "time.strftime('%Y-%m-%d')"
53
I check the entry is set
55
!python {model: account.analytic.line,}: |
56
al = self.read(cr, uid, ref('test_analytic'), ['entry_sequence'])
57
assert al['entry_sequence'] == 'ABCD', 'The field entry_sequence is not set on creation'