Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Here i want inherit and replace a inherited template in a separate folder, i want inherit the below code. and its located in addons/website_sale/views/templates.xml
<template id="products_add_to_cart" inherit_id="website_sale.products_item" active="False" customize_show="True" name="Add to Cart">
<xpath expr="//div[@class='product_price']" position="inside">
<input name="product_id" t-att-value="product.product_variant_ids.id" type="hidden"/>
<t t-if="len(product.product_variant_ids) == 1">
<a class="btn btn-default btn-xs fa fa-shopping-cart a-submit"/>
<t t-if="len(product.product_variant_ids) > 1">
<a class="btn btn-default btn-xs fa fa-shopping-cart" t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']>1 else None))"/>
Thanks in advance......
<template id="website_sale.products_add_to_cart" inherit_id="website_sale.products_add_to_cart" active="False" customize_show="True"></template>
This will completely delete the origin template, not recommended instead I recommend to you to use a different id and modify inside whatever you want.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/15/15, 12:06 AM|
|Seen: 1250 times|
|Last updated: 12/15/15, 1:11 AM|