[FIX] website_sale: display price with user curencie.
This commit is contained in:
parent
087bf22fb5
commit
7295a07c4a
|
@ -24,6 +24,7 @@
|
|||
<record id="product_product_1" model="product.product">
|
||||
<field name="name">Warranty</field>
|
||||
<field name="list_price">20.0</field>
|
||||
<field name="sequence">1000</field>
|
||||
<field name="website_published" eval="True"/>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
|
|
|
@ -85,7 +85,7 @@ class sale_order(osv.Model):
|
|||
values['name'] = line.name
|
||||
else:
|
||||
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
values['name'] = product.description_sale
|
||||
values['name'] = product.description_sale or product.name
|
||||
|
||||
values['product_id'] = product_id
|
||||
values['order_id'] = order_id
|
||||
|
|
|
@ -74,15 +74,18 @@
|
|||
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price" t-if="product.product_variant_ids">
|
||||
<b>
|
||||
<t t-if="(product.lst_price - product.price) > 0.1">
|
||||
<del class="text-danger" t-field="product.lst_price" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>&nbsp;
|
||||
<del class="text-danger" t-field="product.lst_price" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "pricelist.currency_id"
|
||||
}'/>&nbsp;
|
||||
</t>
|
||||
<span t-field="product.price" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'>
|
||||
</span>
|
||||
<span itemprop="price" style="display:none;" t-esc="product.price"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
|
||||
</b>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -438,7 +441,7 @@
|
|||
t-field="product.price"
|
||||
t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -488,7 +491,7 @@
|
|||
t-field="product.price"
|
||||
t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
<p class="css_not_available_msg bg-danger" style="position:absolute; padding: 15px;">Product not available</p>
|
||||
</td>
|
||||
|
@ -575,10 +578,10 @@
|
|||
t-field="product.price"
|
||||
t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
<span itemprop="price" style="display:none;" t-esc="product.price"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
|
||||
</h4>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -613,7 +616,7 @@
|
|||
<span t-if="value_id.price_extra">
|
||||
<t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</span>
|
||||
</option>
|
||||
|
@ -632,7 +635,7 @@
|
|||
<span class="badge" t-if="value_id.price_extra">
|
||||
<t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</span>
|
||||
</label>
|
||||
|
@ -820,7 +823,7 @@
|
|||
</t>
|
||||
<span t-field="line.price_unit" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
|
@ -916,7 +919,7 @@
|
|||
</t>
|
||||
<span t-field="product.price" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
|
@ -1100,17 +1103,17 @@
|
|||
<div class="col-sm-6 text-right">Subtotal: </div>
|
||||
<div class="col-sm-6"><span t-field="website_sale_order.amount_untaxed" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/></div>
|
||||
<div class="col-sm-6 text-right">Taxes: </div>
|
||||
<div class="col-sm-6"><span t-field="website_sale_order.amount_tax" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/></div>
|
||||
<div class="col-sm-6 text-right"><h4>Total To Pay: </h4></div>
|
||||
<div class="col-sm-6"><h4><span t-field="website_sale_order.amount_total" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/></h4></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1168,7 +1171,7 @@
|
|||
<td class="text-center">
|
||||
<span t-field="line.price_unit" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -1309,7 +1312,7 @@
|
|||
<th class="text-right">
|
||||
<h3><span t-field="website_sale_order.amount_total" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/></h3>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -1318,7 +1321,7 @@
|
|||
<td class="text-right">
|
||||
<span t-field="website_sale_order.amount_tax" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
|
||||
}'/>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue