Odoo Help


Delivery costs on shopping cart

on 4/20/16, 8:04 AM 675 views

Hi!!Is it possible change or duplicate the delivery costs on payment to shopping cart? 
I show you an image of example (made it on Photoshop). -->
The code of each part is:
- Delivery (without tax) - (website_sale_delivery.cart_delivery):

<data name="Delivery Costs" inherit_id="website_sale.total">

          <xpath expr="//tr[@id='order_total_taxes']" position="after">

                <tr class="text-muted" id="order_delivery">


                             <abbr title="Shipping">Envío sin IVA:</abbr>


                    <td class="text-right">

                            <span t-field="website_sale_order.amount_delivery" t-field-options="{ "widget": "monetary", "display_currency": "website.pricelist_id.currency_id" }"/>





- Country + State/Province (website_sale.checkout):

<form action="/shop/confirm_order" method="post">

    <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''} col-lg-6">

        <label class="control-label" for="country_id">Country *</label>

            <select name="country_id" class="form-control">

                <option value="">Country...</option>

                  <t t-foreach="countries or []" t-as="country">

                        <option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')">

                        <t t-esc="country.name"/>





    <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''} col-lg-6">

        <label class="control-label" for="state_id" style="font-weight: normal">

            <strong>State / Province *</strong>


        <select name="state_id" class="form-control">

            <option value="">select...</option>

            <t t-foreach="states or []" t-as="state">

                <option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('state_id')">

                <t t-esc="state.name"/>






- Choose your delivery method (website_sale_delivery.payment_delivery):

<data name="Delivery Costs" inherit_id="website_sale.payment">

    <xpath expr="//div[@id='payment_method']" position="before">

        <div t-if="deliveries" class="row" id="delivery_carrier">

            <div class="col-lg-5 col-sm-6">

                <h4>Choose your Delivery Method</h4>

                    <ul class="list-unstyled">

                        <li t-foreach="deliveries" t-as="delivery">

                            <t t-if="delivery.available">


                                    <input t-att-value="delivery.id" type="radio" name="delivery_type" t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"/>

                                    <span t-field="delivery.name"/>

                                    <span class="badge" t-field="delivery.price" t-field-options="{ "widget": "monetary", "display_currency": "website.pricelist_id.currency_id" }"/>










On 4/25/16, 2:28 AM

Link of image:  https://www.odoo.com/web/content/2273149?download=true 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/20/16, 8:04 AM
Seen: 675 times
Last updated: 4/25/16, 2:28 AM