Replace getattr by hasattr in report
(grafted from 1a0574d67704d7acbd7c224d906a4be12aaf3423) --HG-- branch : 8.0
This commit is contained in:
@@ -710,7 +710,7 @@
|
||||
<text:p text:style-name="Text_20_body">Date: <text:placeholder text:placeholder-type="text"><format_date(shipment.effective_date or shipment.planned_date) if (shipment.effective_date or shipment.planned_date) else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P54">Terms of Trade: <text:placeholder text:placeholder-type="text"><shipment.incoterm.name if shipment.incoterm else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P37">Reason for Export: <text:placeholder text:placeholder-type="text"><get_reason(shipment)></text:placeholder></text:p>
|
||||
<text:p text:style-name="P57">Carrier: <text:placeholder text:placeholder-type="text"><shipment.carrier.rec_name if getattr(shipment, 'carrier', None) else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P57">Carrier: <text:placeholder text:placeholder-type="text"><shipment.carrier.rec_name if hasattr(shipment, 'carrier') and shipment.carrier else ''></text:placeholder></text:p>
|
||||
<text:p text:style-name="P57">Shipping reference: <text:placeholder text:placeholder-type="text"><shipment.shipping_reference></text:placeholder></text:p>
|
||||
</text:section>
|
||||
<text:section text:style-name="Sect2" text:name="Section4">
|
||||
|
||||
Reference in New Issue
Block a user