Now OpenERP only propose 'debit' payment modes on Direct Debits and 'payment' payment modes on Payment Orders.

This commit is contained in:
Alexis de Lattre
2013-11-13 21:53:00 +01:00
parent 7c67ea60c3
commit 708949e735
4 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import account_payment
import payment_line
import payment_mode
import payment_mode_type
import payment_mode
import payment_order_create
import banking_import_transaction
import banking_transaction_wizard

View File

@@ -50,4 +50,8 @@ class payment_mode(orm.Model):
help=('Limit selected invoices to invoices with these payment '
'terms')
),
'payment_order_type': fields.related(
'type', 'payment_order_type', readonly=True, type='selection',
selection=[('payment', 'Payment'), ('debit', 'Direct debit')],
string="Payment Order Type"),
}

View File

@@ -11,6 +11,7 @@
<field name="inherit_id" ref="account_banking_payment_export.view_payment_mode_form_inherit"/>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="payment_order_type"/>
<group colspan="4" col="4">
<group colspan="2">
<separator colspan="2"

View File

@@ -46,6 +46,9 @@
icon="gtk-find"
/>
</xpath>
<field name="mode" position="attributes">
<attribute name="domain">[('payment_order_type', '=', payment_order_type)]</attribute>
</field>
</data>
</field>
</record>