update tests

This commit is contained in:
Denis Leemann
2017-01-11 15:05:35 +01:00
committed by Florian da Costa
parent 911b03860b
commit a6c401bf05
4 changed files with 18 additions and 25 deletions

View File

@@ -67,29 +67,19 @@
!python {model: account.move.line}: | !python {model: account.move.line}: |
import datetime as dt import datetime as dt
context['check_move_validity'] = False context['check_move_validity'] = False
model.write(cr, uid, [ref('move_line_ci')], model.write({'name': dt.date.today().strftime('TBNK/%Y/0001'),
{'name': dt.date.today().strftime('TBNK/%Y/0001'), 'credit': 210.0})
'credit': 210.0}, model.write({'name': 'T2S12345',
context) 'debit': 65.0})
model.write(cr, uid, [ref('move_line_si')], model.write({'name': dt.date.today().strftime('RTEXJ/%Y/0001'),
{'name': 'T2S12345', 'debit': 210.0})
'debit': 65.0}, model.write({'credit': 600.0})
context) model.write({'debit': 932.4})
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)
- -
I run the auto complete I run the auto complete
- -
!python {model: account.move}: | !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 Now I can check that all is nice and shiny, line 1. I expect the Customer
Invoice Number to be recognised. Invoice Number to be recognised.

View File

@@ -27,7 +27,8 @@
- -
I confirm the Invoice 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" I check that the invoice state is "Open"
- -
@@ -38,5 +39,5 @@
- -
!python {model: account.invoice}: | !python {model: account.invoice}: |
import datetime as dt 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') assert invoice.number == dt.date.today().strftime('TBNK/%Y/0001')

View File

@@ -27,7 +27,8 @@
- -
I confirm the refund 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" I check that the refund state is "Open"
- -
@@ -38,5 +39,5 @@
- -
!python {model: account.invoice}: | !python {model: account.invoice}: |
import datetime as dt 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') assert invoice.number == dt.date.today().strftime('RTEXJ/%Y/0001')

View File

@@ -18,7 +18,7 @@
I add a reference to an existing supplier invoce I add a reference to an existing supplier invoce
- -
!python {model: account.invoice}: | !python {model: account.invoice}: |
self.write(cr, uid, ref('account.demo_invoice_0'), { self.write({
'reference': 'T2S12345' 'reference': 'T2S12345'
}) })
- -
@@ -29,7 +29,8 @@
- -
Now I confirm it 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 I check that the supplier number is there
- -