mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Port SEPA modules to new API
Fix an important regression in account_banking_sepa_direct_debit: "Date of Last Debit" was not set any more Proper write of date_done with account_banking_payment_export is installed without account_banking_payment_transfer Add post-install script for date_sent on payment.order
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
'wizard/bank_payment_manual.xml',
|
||||
'wizard/payment_order_create_view.xml',
|
||||
'data/payment_mode_type.xml',
|
||||
'workflow/account_payment.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo': ['demo/banking_demo.xml'],
|
||||
|
||||
@@ -73,3 +73,11 @@ class PaymentOrder(models.Model):
|
||||
workflow.trg_validate(self.env.uid, 'payment.order',
|
||||
order_id, 'done', self.env.cr)
|
||||
return {}
|
||||
|
||||
@api.multi
|
||||
def action_done(self):
|
||||
self.write({
|
||||
'date_done': fields.Date.context_today(self),
|
||||
'state': 'done',
|
||||
})
|
||||
return True
|
||||
|
||||
16
account_banking_payment_export/workflow/account_payment.xml
Normal file
16
account_banking_payment_export/workflow/account_payment.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_payment.act_done" model="workflow.activity">
|
||||
<field name="action">action_done()</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user