mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Rename all addons to xxx_unported to be travis compliant
This commit is contained in:
committed by
Artem Kostyuk
parent
3b8090b767
commit
676e6b2213
@@ -1,49 +0,0 @@
|
||||
-
|
||||
I create a move
|
||||
-
|
||||
!record {model: account.move, id: move1}:
|
||||
journal_id: account.sales_journal
|
||||
line_id:
|
||||
- name: Receivable line
|
||||
account_id: account.a_recv
|
||||
debit: 1000.0
|
||||
- name: Sales line
|
||||
account_id: account.a_sale
|
||||
credit: 1000.0
|
||||
-
|
||||
I check that the move is still draft
|
||||
-
|
||||
!assert {model: account.move, id: move1}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I create a wizard
|
||||
-
|
||||
!record {model: account.move.marker, id: wiz_marker1}:
|
||||
action: mark
|
||||
-
|
||||
I run the wizard
|
||||
-
|
||||
!python {model: account.move.marker}: |
|
||||
context['automated_test_execute_now'] = True
|
||||
self.button_mark(
|
||||
cr, uid, [ref('wiz_marker1')], context=context
|
||||
)
|
||||
-
|
||||
I read the UUID from the move, I dequeue the job and run it
|
||||
-
|
||||
!python {model: account.move}: |
|
||||
from openerp.addons.connector.queue.job import OpenERPJobStorage
|
||||
from openerp.addons.connector.session import ConnectorSession
|
||||
|
||||
move = self.browse(cr, uid, ref('move1'), context=context)
|
||||
uuid = move.post_job_uuid
|
||||
session = ConnectorSession(cr, uid, context=context)
|
||||
storage = OpenERPJobStorage(session)
|
||||
|
||||
myjob = storage.load(uuid)
|
||||
myjob.perform(session)
|
||||
-
|
||||
I check that the move is now approved
|
||||
-
|
||||
!assert {model: account.move, id: move1}:
|
||||
- state == 'posted'
|
||||
@@ -1,63 +0,0 @@
|
||||
-
|
||||
I create a move
|
||||
-
|
||||
!record {model: account.move, id: move2}:
|
||||
journal_id: account.sales_journal
|
||||
line_id:
|
||||
- name: Receivable line
|
||||
account_id: account.a_recv
|
||||
debit: 2000.0
|
||||
- name: Sales line
|
||||
account_id: account.a_sale
|
||||
credit: 2000.0
|
||||
-
|
||||
I check that the move is still draft
|
||||
-
|
||||
!assert {model: account.move, id: move2}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I create a wizard with a long ETA
|
||||
-
|
||||
!record {model: account.move.marker, id: wiz_marker2}:
|
||||
action: mark
|
||||
eta: 10000
|
||||
-
|
||||
I run the wizard
|
||||
-
|
||||
!python {model: account.move.marker}: |
|
||||
context['automated_test_execute_now'] = True
|
||||
self.button_mark(
|
||||
cr, uid, [ref('wiz_marker2')], context=context
|
||||
)
|
||||
-
|
||||
Now I change my mind and I create a wizard to unmark the moves
|
||||
-
|
||||
!record {model: account.move.marker, id: wiz_unmarker3}:
|
||||
action: unmark
|
||||
-
|
||||
I run the wizard
|
||||
-
|
||||
!python {model: account.move.marker}: |
|
||||
self.button_mark(
|
||||
cr, uid, [ref('wiz_unmarker3')], context=context
|
||||
)
|
||||
-
|
||||
Now I checked that my job is done, and the move is still draft
|
||||
-
|
||||
!python {model: account.move}: |
|
||||
from openerp.addons.connector.queue.job import OpenERPJobStorage
|
||||
from openerp.addons.connector.session import ConnectorSession
|
||||
|
||||
session = ConnectorSession(cr, uid, context=context)
|
||||
storage = OpenERPJobStorage(session)
|
||||
|
||||
move = self.browse(cr, uid, ref('move2'), context=context)
|
||||
myjob = storage.load(move.post_job_uuid)
|
||||
assert myjob.state == 'done', 'Job is in state {0}, should be done'.format(
|
||||
myjob.state
|
||||
)
|
||||
-
|
||||
I check that the move is still draft
|
||||
-
|
||||
!assert {model: account.move, id: move2}:
|
||||
- state == 'draft'
|
||||
Reference in New Issue
Block a user