renombrado

This commit is contained in:
snt 2024-09-15 16:51:31 +02:00
parent b9c09f6068
commit 8f306a2237
7 changed files with 37 additions and 22 deletions

View file

@ -0,0 +1 @@
from . import controllers

View file

@ -0,0 +1,29 @@
{
"name": "Website Sale Product Library.",
"version": "16.0.1.0.3",
"category": "Website",
"summary": "Modifica website_sale para una librería / Tienda de música.",
"author": "Criptomart",
"license": "AGPL-3",
"description": """
Website Sale Product Library
==================================================
Modifica la tienda online con los campos de product_library.
* Linka internal description con website_description.
* Muestra en product en la lista de productos los campos de product_library (subtítulo, autor, editorial, formato, género).
* En la vista del producto, añade subtítulo y autor después del nombre y la descripción.
* Búsueda en la web por autor, editorial y subtítulo.
""",
"depends": ["website_sale", "product_library"],
"data": ["views/website_sale_views.xml"],
"assets": {
"web.assets_frontend": [
"website_sale_product_description_displayed/static/src/scss/custom.scss",
],
},
"application": False,
"installable": True,
}

View file

@ -0,0 +1,9 @@
.custom_website_description_excerpt {
font-size: 16px;
color: #444;
line-height: 1.0;
padding: 4px;
background-color: #f6f6ff;
border: 1px solid #99d;
border-radius: 6px;
}

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
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">
<div class="oe_structure oe_empty custom_website_description_excerpt" >
<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>