añadidos campos de library al nombre y a las descripciones en las listas. Hereda template product y añade subtítulo y autor bajo el nombre.
This commit is contained in:
parent
4bb1d4b4a1
commit
80db7ac1f0
4 changed files with 35 additions and 15 deletions
|
@ -7,7 +7,7 @@
|
|||
"application": False,
|
||||
"installable": True,
|
||||
"depends": ["website_sale"],
|
||||
"data": ["data/snippet_filter_data.xml", "views/website_sale_views.xml"],
|
||||
"data": ["views/website_sale_views.xml"],
|
||||
"assets": {
|
||||
"web.assets_frontend": [
|
||||
"website_sale_product_description_displayed/static/src/scss/custom.scss",
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="website_sale.dynamic_snippet_newest_products_filter" model="ir.filters">
|
||||
<field
|
||||
name="context"
|
||||
>{'display_website_description': True, 'add2cart_rerender': False}</field>
|
||||
</record>
|
||||
</odoo>
|
Binary file not shown.
Before Width: | Height: | Size: 83 KiB |
|
@ -1,20 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="products_item"
|
||||
name="Display product description"
|
||||
id="products_item_fields"
|
||||
name="Display product library fields"
|
||||
inherit_id="website_sale.products_item"
|
||||
customize_show="True"
|
||||
>
|
||||
<xpath expr="//a[@t-field='product.name']" position="replace">
|
||||
<a class="text-primary text-decoration-none" itemprop="name" t-att-href="product_href">
|
||||
<span><t t-att-content="product.name" t-out="product.name" class="fw-bold"/>. </span>
|
||||
<span t-if="product.subtitle" class="text-small-muted"><t t-out="product.subtitle" />. </span>
|
||||
<span t-if="product.autor"><b><t t-out="product.autor" /></b></span>
|
||||
</a>
|
||||
</xpath>
|
||||
</template>
|
||||
<template
|
||||
id="products_item_description"
|
||||
name="Display product website description"
|
||||
inherit_id="website_sale.products_description"
|
||||
customize_show="True"
|
||||
>
|
||||
<xpath expr="//div[@t-field='product.description_sale']" position="replace">
|
||||
<xpath expr="//div[@t-field='product.description_sale']" position="replace">
|
||||
<div class="oe_structure oe_empty custom_website_description_excerpt" >
|
||||
<span t-if="product.autor"><b><t t-out="product.autor" /></b></span>
|
||||
<span t-if="product.genero" class="text-muted small"> (<t t-out="product.genero" />)</span>
|
||||
<span t-if="product.formato" class="text-muted small"><t t-out="product.formato" /></span>
|
||||
<span t-if="product.formato" class="fw-bolder" ><t t-out="product.formato" />. </span>
|
||||
<span t-if="product.genero"> <t t-out="product.genero" />.</span>
|
||||
<div t-if="product.website_description">
|
||||
<t t-out="product.website_description"/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<template
|
||||
id="product_item_fields"
|
||||
name="Display product library fields"
|
||||
inherit_id="website_sale.product"
|
||||
customize_show="True"
|
||||
>
|
||||
<xpath expr="//h1[@t-field='product.name']" position="after">
|
||||
<div class="text-primary text-decoration-none" itemprop="name">
|
||||
<div t-if="product.subtitle" class="text-muted my-2" >
|
||||
<t t-out="product.subtitle" />
|
||||
</div>
|
||||
<div t-if="product.autor"><b><t t-out="product.autor" /></b></div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
Loading…
Add table
Reference in a new issue