Files
bank-payment/account_banking_payment/workflow/account_payment.xml
Stéphane Bidoul 77b6806e07 [IMP] account_banking_payment refactoring to make payment export features available without pulling bank statement features
- introduce account_banking_payment_export module with all features from account_banking_payment that do not involve changing the payment order workflow or depend on bank statement changes
- account_banking_payment_export does not depend on account_banking 
- account_banking_payment is consequently stripped of above features
- account_banking_sepa_credit_transfer depend on account_banking_payment_export and is compatible with the default payment order workflow
2013-08-09 22:55:49 +02:00

76 lines
3.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- New activity for workflow payment order: sent -->
<record id="account_banking.act_sent" model="workflow.activity">
<field name="name">sent</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">action_sent()</field>
<field name="kind">function</field>
</record>
<!-- New activity for workflow payment order: sent -->
<record id="account_banking.act_sent_wait" model="workflow.activity">
<field name="name">sent_wait</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">write({'state': 'sent'})</field>
<field name="kind">function</field>
</record>
<!-- New activity for workflow payment order: rejected -->
<record id="account_banking.act_rejected" model="workflow.activity">
<field name="name">rejected</field>
<field name="wkf_id" ref="account_payment.wkf_payment_order"/>
<field name="action">action_rejected()
write({'state':'rejected'})</field>
<field name="kind">function</field>
</record>
<!-- Rewrite existing open -> done transition to include 'sent' stage -->
<record id="account_payment.trans_open_done" model="workflow.transition">
<field name="act_from" ref="account_payment.act_open"/>
<field name="act_to" ref="account_banking.act_sent"/>
<field name="signal">sent</field>
</record>
<!-- the done signal continues to work but goes to sent -->
<record id="account_banking.trans_open_done" model="workflow.transition">
<field name="act_from" ref="account_payment.act_open"/>
<field name="act_to" ref="account_banking.act_sent"/>
<field name="signal">done</field>
</record>
<!-- From sent straight to sent_wait -->
<record id="account_banking.trans_sent_sent_wait" model="workflow.transition">
<field name="act_from" ref="account_banking.act_sent"/>
<field name="act_to" ref="account_banking.act_sent_wait"/>
</record>
<!-- Reconciliation from the banking statement leads to done state -->
<record id="account_banking.trans_sent_done" model="workflow.transition">
<field name="act_from" ref="account_banking.act_sent_wait"/>
<field name="act_to" ref="account_payment.act_done"/>
<field name="signal">done</field>
</record>
<!-- Rejected by the bank -->
<record id="account_banking.trans_sent_rejected" model="workflow.transition">
<field name="act_from" ref="account_banking.act_sent"/>
<field name="act_to" ref="account_banking.act_rejected"/>
<field name="signal">rejected</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.
-->
<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_wait"/>
<field name="condition">test_undo_done()</field>
<field name="signal">undo_done</field>
</record>
</data>
</openerp>