[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:
@@ -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': ['&', ('delivery_type', '!=', False), ('delivery_type', 'not in', ['fixed', 'base_on_rule'])]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user