implement unified checkout address UI with fulfillment selection and custom validation logic
This commit is contained in:
parent
f3999ef122
commit
2a6f31faf0
@ -423,4 +423,16 @@
|
||||
</script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- 5. FINAL POLISH: Hide Shipping Info using CSS (Safest method) -->
|
||||
<template id="chennora_hide_shipping_on_payment" inherit_id="website.layout" name="Chennora Hide Shipping on Payment">
|
||||
<xpath expr="." position="inside">
|
||||
<style>
|
||||
/* Hide any row or div that contains shipping info in the checkout */
|
||||
.js_shipping, .shipping_address, #shipping_and_billing {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@ -12,7 +12,12 @@ class SaleOrder(models.Model):
|
||||
|
||||
# 1. Ensure fulfillment type is set
|
||||
if hasattr(self, 'fulfilment_type'):
|
||||
self.write({'fulfilment_type': 'delivery'})
|
||||
self.write({
|
||||
'fulfilment_type': 'delivery',
|
||||
'partner_shipping_id': self.partner_id.id
|
||||
})
|
||||
else:
|
||||
self.write({'partner_shipping_id': self.partner_id.id})
|
||||
|
||||
# 2. Find or Create the Uber Delivery carrier
|
||||
Carrier = self.env['delivery.carrier'].sudo()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user