mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
update tests
This commit is contained in:
committed by
Florian da Costa
parent
911b03860b
commit
a6c401bf05
@@ -67,29 +67,19 @@
|
||||
!python {model: account.move.line}: |
|
||||
import datetime as dt
|
||||
context['check_move_validity'] = False
|
||||
model.write(cr, uid, [ref('move_line_ci')],
|
||||
{'name': dt.date.today().strftime('TBNK/%Y/0001'),
|
||||
'credit': 210.0},
|
||||
context)
|
||||
model.write(cr, uid, [ref('move_line_si')],
|
||||
{'name': 'T2S12345',
|
||||
'debit': 65.0},
|
||||
context)
|
||||
model.write(cr, uid, [ref('move_line_cr')],
|
||||
{'name': dt.date.today().strftime('RTEXJ/%Y/0001'),
|
||||
'debit': 210.0},
|
||||
context)
|
||||
model.write(cr, uid, [ref('move_line_partner_name')],
|
||||
{'credit': 600.0},
|
||||
context)
|
||||
model.write(cr, uid, [ref('move_line_partner_label')],
|
||||
{'debit': 932.4},
|
||||
context)
|
||||
model.write({'name': dt.date.today().strftime('TBNK/%Y/0001'),
|
||||
'credit': 210.0})
|
||||
model.write({'name': 'T2S12345',
|
||||
'debit': 65.0})
|
||||
model.write({'name': dt.date.today().strftime('RTEXJ/%Y/0001'),
|
||||
'debit': 210.0})
|
||||
model.write({'credit': 600.0})
|
||||
model.write({'debit': 932.4})
|
||||
-
|
||||
I run the auto complete
|
||||
-
|
||||
!python {model: account.move}: |
|
||||
result = self.button_auto_completion(cr, uid, [ref("move_test1")])
|
||||
result = self.button_auto_completion()
|
||||
-
|
||||
Now I can check that all is nice and shiny, line 1. I expect the Customer
|
||||
Invoice Number to be recognised.
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
-
|
||||
I confirm the Invoice
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: invoice_for_completion_1}
|
||||
!python {model: account.invoice, id: invoice_for_completion_1}:
|
||||
self.action_invoice_open()
|
||||
-
|
||||
I check that the invoice state is "Open"
|
||||
-
|
||||
@@ -38,5 +39,5 @@
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
import datetime as dt
|
||||
invoice = model.browse(cr, uid, ref('invoice_for_completion_1'), context)
|
||||
invoice = model.browse(ref('invoice_for_completion_1'))
|
||||
assert invoice.number == dt.date.today().strftime('TBNK/%Y/0001')
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
-
|
||||
I confirm the refund
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: refund_for_completion_1}
|
||||
!python {model: account.invoice, id: invoice_for_completion_1}:
|
||||
self.action_invoice_open()
|
||||
-
|
||||
I check that the refund state is "Open"
|
||||
-
|
||||
@@ -38,5 +39,5 @@
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
import datetime as dt
|
||||
invoice = model.browse(cr, uid, ref('refund_for_completion_1'), context)
|
||||
invoice = model.browse(ref('refund_for_completion_1'))
|
||||
assert invoice.number == dt.date.today().strftime('RTEXJ/%Y/0001')
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
I add a reference to an existing supplier invoce
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
self.write(cr, uid, ref('account.demo_invoice_0'), {
|
||||
self.write({
|
||||
'reference': 'T2S12345'
|
||||
})
|
||||
-
|
||||
@@ -29,7 +29,8 @@
|
||||
-
|
||||
Now I confirm it
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0}
|
||||
!python {model: account.invoice, id: account.demo_invoice_0}:
|
||||
self.action_invoice_open()
|
||||
-
|
||||
I check that the supplier number is there
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user