[RFR] Move workflow adaptions from debit module to payment module

This commit is contained in:
Stefan Rijnhart
2013-05-28 07:16:26 +02:00
parent 5ae5d657f8
commit 345381a8a7
4 changed files with 37 additions and 29 deletions

View File

@@ -34,5 +34,27 @@ write({'state':'rejected'})</field>
<field name="act_to" ref="account_banking.act_sent"/>
<field name="signal">sent</field>
</record>
<!--
Transition to undo the payment order and reset to
sent, triggered by cancelling a bank transaction
with which the order was reconciled.
For this, we need to cancel the flow stop on the done state,
unfortunately.
TODO: what is below is not enough. We need to inject
another state, 'sent_wait' between sent and done.
-->
<record id="account_payment.act_done" model="workflow.activity">
<field name="flow_stop" eval="False"/>
</record>
<!-- Cancel the reconciled payment order -->
<record id="trans_done_sent" model="workflow.transition">
<field name="act_from" ref="account_payment.act_done"/>
<field name="act_to" ref="account_banking.act_sent"/>
<field name="condition">test_undo_done()</field>
<field name="signal">undo_done</field>
</record>
</data>
</openerp>

View File

@@ -1,6 +1,6 @@
##############################################################################
#
# Copyright (C) 2011 Therp BV (<http://therp.nl>).
# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
# Copyright (C) 2011 Smile (<http://smile.fr>).
# All Rights Reserved
#
@@ -20,9 +20,9 @@
##############################################################################
{
'name': 'Direct Debit',
'version': '6.1.1.134',
'version': '7.0.2.134',
'license': 'AGPL-3',
'author': 'Therp BV / Smile',
'author': '['Therp BV', 'Smile']',
'website': 'https://launchpad.net/banking-addons',
'category': 'Banking addons',
'depends': ['account_banking'],
@@ -30,7 +30,6 @@
'view/account_payment.xml',
'view/account_invoice.xml',
'workflow/account_invoice.xml',
'workflow/account_payment.xml',
'data/account_payment_term.xml',
],
'description': '''

View File

@@ -0,0 +1,12 @@
def migrate(cr, version):
if not version:
return
# workflow state moved to another module
cr.execute(
"""
UPDATE ir_model_data
SET module = 'account_banking_payment'
WHERE name = 'trans_done_sent'
AND module = 'account_direct_debit'
""")

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Transition to undo the payment order and reset to
sent, triggered by
cancelling a bank transaction with which the order
was reconciled.
For this, we need to cancel the flow stop on the done state,
unfortunately.
TODO: what is below is not enough. We need to inject
another state, 'sent_wait' between sent and done.
-->
<record id="account_payment.act_done" model="workflow.activity">
<field name="flow_stop" eval="False"/>
</record>
<record id="trans_done_sent" model="workflow.transition">
<field name="act_from" ref="account_payment.act_done"/>
<field name="act_to" ref="account_banking.act_sent"/>
<field name="condition">test_undo_done()</field>
<field name="signal">undo_done</field>
</record>
</data>
</openerp>