[TEST] test with failing test

bzr revid: mat@openerp.com-20131018134613-27lsl5vln5yu26pa
This commit is contained in:
Martin Trigaux 2013-10-18 15:46:13 +02:00
parent f6bb462172
commit 6f2f0b17ed
2 changed files with 20 additions and 17 deletions

View File

@ -116,8 +116,7 @@ class res_partner(osv.osv):
LEFT JOIN account_account a ON (l.account_id=a.id) LEFT JOIN account_account a ON (l.account_id=a.id)
WHERE a.type IN ('receivable','payable') WHERE a.type IN ('receivable','payable')
AND l.partner_id IN %s AND l.partner_id IN %s
AND (l.reconcile_id IS NULL OR AND l.reconcile_id IS NULL
reconcile_id in (SELECT id FROM account_move_reconcile WHERE opening_reconciliation is TRUE))
AND """ + query + """ AND """ + query + """
GROUP BY l.partner_id, a.type GROUP BY l.partner_id, a.type
""", """,

View File

@ -4,27 +4,31 @@
!record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}: !record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}:
code: !eval "'FY%s'% (datetime.now().year+1)" code: !eval "'FY%s'% (datetime.now().year+1)"
company_id: base.main_company company_id: base.main_company
date_start: !eval "'%s-01-01' %(datetime.now().year-1)" date_start: !eval "'%s-01-01' %(datetime.now().year+1)"
date_stop: !eval "'%s-12-31' %(datetime.now().year-1)" date_stop: !eval "'%s-12-31' %(datetime.now().year+1)"
name: !eval "'Fiscal Year %s' %(datetime.now().year-1)" name: !eval "'Fiscal Year %s' %(datetime.now().year+1)"
- -
I generate periods for the new fiscalyear I create a period for the opening entries for the new fiscalyear
- -
!python {model: account.fiscalyear}: | !record {model: account.period, id: account_period_jan11}:
self.create_period(cr, uid, [ref("account_fiscalyear_fiscalyear0")]) company_id: base.main_company
date_start: !eval "'%s-01-01'% (datetime.now().year+1)"
date_stop: !eval "'%s-01-01'% (datetime.now().year+1)"
fiscalyear_id: account_fiscalyear_fiscalyear0
name: !eval "'OP %s' %(datetime.now().year+1)"
special: 1
- -
I create a new account invoice in the created fiscalyear I create a new account invoice a the partner in current fiscalyear
- -
!record {model: account.invoice, id: account_invoice_current1}: !record {model: account.invoice, id: account_invoice_current1}:
partner_id: base.res_partner_2 partner_id: base.res_partner_2
date_invoice: !eval "'%s-01-02' %(datetime.now().year-1)"
invoice_line: invoice_line:
- partner_id: base.res_partner_2 - partner_id: base.res_partner_2
quantity: 1.0 quantity: 1.0
price_unit: 15.00 price_unit: 15.00
name: Bying stuff name: Bying stuff
- -
I validate the invoice I validate it the invoice
- -
!python {model: account.invoice}: | !python {model: account.invoice}: |
import netsvc import netsvc
@ -43,13 +47,13 @@
company_id: base.main_company company_id: base.main_company
centralisation: 1 centralisation: 1
- -
I call the Generate Fiscalyear Opening Entries wizard I called the Generate Fiscalyear Opening Entries wizard
- -
!record {model: account.fiscalyear.close, id: account_fiscalyear_close_0}: !record {model: account.fiscalyear.close, id: account_fiscalyear_close_0}:
fy2_id: account.data_fiscalyear fy2_id: account_fiscalyear_fiscalyear0
fy_id: account_fiscalyear_fiscalyear0 fy_id: account.data_fiscalyear
journal_id: account.close_journal journal_id: account.close_journal
period_id: account.period_1 period_id: account_period_jan11
report_name: End of Fiscal Year Entry report_name: End of Fiscal Year Entry
- -
I clicked on create Button I clicked on create Button
@ -62,7 +66,7 @@
I close the previous fiscalyear I close the previous fiscalyear
- -
!record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}: !record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}:
fy_id: account_fiscalyear_fiscalyear0 fy_id: data_fiscalyear
- -
I clicked on Close States Button to close fiscalyear I clicked on Close States Button to close fiscalyear
- -
@ -73,7 +77,7 @@
- -
I check that the fiscalyear state is now "Done" I check that the fiscalyear state is now "Done"
- -
!assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Done state}: !assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}:
- state == 'done' - state == 'done'
- -
I check that the past accounts are taken into account in partner credit I check that the past accounts are taken into account in partner credit