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