sobreescribe el campo website description y añade estilo css.

Seguramnete no haga falta sobreescribir el campo y se puedan heredar los
estilos o añadirselos...
This commit is contained in:
snt 2024-09-06 19:39:39 +02:00 committed by snt
parent 67013f8d4c
commit 5fb83c78b5
3 changed files with 28 additions and 2 deletions

View file

@ -1,10 +1,15 @@
{ {
'name': 'Website Descrition Internal', 'name': 'Website Descrition Internal',
'version': '16.0.1.0.0', 'version': '16.0.1.0.0',
'summary': 'Sobrescribe el campo website_description y devuelve el campo internal description.', 'summary': 'Sobrescribe el campo website_description y devuelve el campo internal description. Hereda la vista del campo y modifica el css.',
'author': 'Criptomart', 'author': 'Criptomart',
'depends': ['product','website_sale'], 'depends': ['product','website_sale'],
'data': [], 'data': ['views/templates.xml'],
'assets': {
'web.assets_frontend': [
'website_description_internal/static/src/scss/custom.scss',
],
},
'installable': True, 'installable': True,
'application': False, 'application': False,
} }

View file

@ -0,0 +1,9 @@
.custom_website_description {
font-size: 20px;
color: #333;
line-height: 1.5;
padding: 10px;
background-color: #f9f9f9;
border: 1px solid #ddd;
border-radius: 12px;
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="product_full_description_inherit" inherit_id="website_sale.product">
<xpath expr="//div[@t-field='product.website_description']" position="replace">
<div id="product_description" class="oe_structure oe_empty mt16 custom_website_description"
data-oe-type="html" data-oe-expressioni="product.website_description"
>
<t t-esc="product.website_description"/>
</div>
</xpath>
</template>
</odoo>