mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[RFR] Move workflow adaptions from debit module to payment module
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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': '''
|
||||
|
||||
12
account_direct_debit/migrations/7.0.2/pre-migration.py
Normal file
12
account_direct_debit/migrations/7.0.2/pre-migration.py
Normal 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'
|
||||
""")
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user