[FIX] delivery: tracking button traceback

If one set a carrier_tracking_ref on a stock.picking,
but the carrier_id is not set, the button Tracking
will appear but crash as this button calls a method on
the carrier.

opw-660659
This commit is contained in:
Martin Geubelle
2015-12-23 16:30:37 +01:00
parent 6191e3f6d0
commit 4f1bfdf640
+1 -1
View File
@@ -256,7 +256,7 @@
</xpath>
<xpath expr="//h1" position="before">
<div class="oe_right oe_button_box">
<button type="object" name="open_website_url" class="oe_stat_button" icon='fa-truck' string="Tracking" attrs="{'invisible': ['|',('carrier_tracking_ref','=',False),('delivery_type','=','grid')]}" />
<button type="object" name="open_website_url" class="oe_stat_button" icon='fa-truck' string="Tracking" attrs="{'invisible': ['|','|',('carrier_tracking_ref','=',False),('carrier_id', '=', False),('delivery_type','=','grid')]}" />
</div>
</xpath>
<xpath expr="//form[@string='Transfer']/header/button[last()]" position="after">