Use sale_ok and purchase_ok instead of tweaking payment type

This commit is contained in:
Pedro M. Baeza
2014-11-07 23:00:34 +01:00
committed by Enric Tobella
parent 6ac57a9473
commit 32315dd39c
2 changed files with 4 additions and 6 deletions

View File

@@ -28,13 +28,11 @@ class ResPartner(models.Model):
supplier_payment_mode = fields.Many2one(
'payment.mode', string='Supplier Payment Mode', company_dependent=True,
domain="['|', ('payment_order_type', '=', 'payment'), "
"('payment_order_type', '=', 'both')]",
domain="[('purchase_ok', '=', True)]",
help="Select the default payment mode for this supplier.")
customer_payment_mode = fields.Many2one(
'payment.mode', string='Customer Payment Mode', company_dependent=True,
domain="['|', ('payment_order_type', '=', 'debit'), "
"('payment_order_type', '=', 'both')]",
domain="[('sale_ok', '=', True)]",
help="Select the default payment mode for this customer.")
@api.model

View File

@@ -17,7 +17,7 @@
<field name="arch" type="xml">
<field name="partner_bank_id" position="after">
<field name="payment_mode_id"
domain="['|', ('payment_order_type', '=', 'debit'), ('payment_order_type', '=', 'both')]"/>
domain="[('sale_ok', '=', True)]"/>
</field>
</field>
</record>
@@ -30,7 +30,7 @@
<field name="arch" type="xml">
<field name="partner_bank_id" position="after">
<field name="payment_mode_id"
domain="['|', ('payment_order_type', '=', 'payment'), ('payment_order_type', '=', 'both')]"/>
domain="[('purchase_ok', '=', True)]"/>
</field>
</field>
</record>