[FIX] delivery: new error message

Making a delivery with an external carrier without setting any partner
will sometimes lead to a crash on the API respond from the carrier. This technical error is sent back to the user without any proper sentence human readable.

This commit set the field 'partner_id' required in case of delivery with external carrier to avoid any technical error

Task : 1886733
This commit is contained in:
William Henrotin
2018-10-01 17:02:26 +02:00
parent 9b5dabd399
commit 47ea5f3260
+3
View File
@@ -236,6 +236,9 @@
<button name="action_send_confirmation_email" string="Send Confirmation Email" type="object" attrs="{'invisible':['|', ('state', '!=', 'done'), ('carrier_id', '=', False)]}"/>
</xpath>
</data>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="attrs">{'required': ['&amp;', ('delivery_type', '!=', False), ('delivery_type', 'not in', ['fixed', 'base_on_rule'])]}</attribute>
</xpath>
</field>
</record>