[IMP] website: sale_order: display acquirer only when set. The purpose is to
authorThibault Delavallée <tde@openerp.com>
Tue, 13 May 2014 09:01:18 +0000 (11:01 +0200)
committerThibault Delavallée <tde@openerp.com>
Tue, 13 May 2014 09:01:18 +0000 (11:01 +0200)
avoid maanging it from the sale order view; the website will set the acquirer
for ecommerce related orders. This way the acquirer and tx will be displayed
on the sale order linked to ecommerce sales, and not on other orders.

addons/website_sale/views/sale_order.xml

index 6815199..2d81f2c 100644 (file)
@@ -8,8 +8,8 @@
             <field name="inherit_id" ref="sale.view_order_form"/>
             <field name="arch" type="xml">
                 <xpath expr="//field[@name='amount_total']" position="after">
-                    <field name="payment_acquirer_id"/>
-                    <field name="payment_tx_id"/>
+                    <field name="payment_acquirer_id" attrs="{'invisible': [('payment_acquirer_id', '=', False)]}"/>
+                    <field name="payment_tx_id" attrs="{'invisible': [('payment_acquirer_id', '=', False)]}"/>
                 </xpath>
             </field>
         </record>