I want to show product weight in the shop page's grid & also in the product page. Right now, it only shows price and quantity. Note that, the weight is visible in the inventory tab of the product (to admin)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Progetti
- MRP
La domanda è stata contrassegnata
3
Risposte
3914
Visualizzazioni
This is an example, which shows the UoM after the product price in the website_sale list/kanban view and in the product detail view, it might give you the idea:
<template id="tw_website_sale_show_uom.products_item" inherit_id="website_sale.products_item" name="Products Item Show UOM">
<xpath expr="//span[@itemprop='priceCurrency']" position="after">
<t t-if="product.uom_id.name and product.uom_id.id !=1">
<label>/</label>
<span t-field="product.uom_id.name" style="white-space: nowrap;"/>
</t>
</xpath>
</template>
<template id="tw_website_sale_show_uom.product_price" inherit_id="website_sale.product_price" name="Product Price Show UOM">
<xpath expr="//span[@itemprop='priceCurrency']" position="after">
<t t-if="product.uom_id.name and product.uom_id.id !=1">
<label>/</label>
<span t-field="product.uom_id.name" style="white-space: nowrap;"/>
</t>
</xpath>
</template>
Thanks Ermin!
Does it work for odoo 10? I have been analyzing a similar code which is written for odoo 9.0 and, shows error on odoo 10
It works for Odoo 10 and 11.
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
|
2
lug 24
|
3790 | ||
|
|
1
mar 24
|
2271 | ||
|
|
2
giu 17
|
7668 | ||
|
|
2
ott 25
|
614 | ||
|
|
1
ott 25
|
411 |
First of all try to find the corresponding templates and try to do it, you will get the field name of the weight from back end, just check and see how the price and quantity is displayed and similarly do for the weight if you are technically skilled