Cambio sométicos en el PoS: Añade campos subtítutlo y autor a order

line, añade campo autor a product en la lista de productos, reordena
campos en info product, no imprime nada si no existe el campo a
imprimir.
This commit is contained in:
snt 2024-09-14 20:22:46 +02:00 committed by snt
parent 78d5fca7de
commit 78a10bc5cd

View file

@ -6,18 +6,30 @@
t-inherit-mode="extension" t-inherit-mode="extension"
owl="1" owl="1"
> >
<xpath expr="//div[hasclass('product-content')]" position="inside"> <xpath expr="//span[hasclass('price-tag')]" position="before">
<div class="flex"> <t t-if="props.product.autor">
<br/> <t t-out="props.product.autor" class="product-name"/>
<span><b><t t-esc="props.product.formato"/></b></span> <br/>
</div> </t>
<t t-if="props.product.formato" class="price-tag">
<t t-esc="props.product.formato"/>
</t>
</xpath> </xpath>
</t> </t>
<t t-inherit="point_of_sale.Orderline" t-inherit-mode="extension"> <t t-inherit="point_of_sale.Orderline" t-inherit-mode="extension">
<xpath expr="//span[hasclass('product-name')]" position="inside"> <xpath expr="//span[hasclass('product-name')]" position="inside">
<span> <span>
<br/> <t t-if="props.line.get_product().subtitle">
Formato: <t t-out="props.line.get_product().formato" /> . <t t-out="props.line.get_product().subtitle" />
</t>
</span>
<br/>
<span t-if="props.line.get_product().autor">
<t t-out="props.line.get_product().autor" />
</span>
<br/>
<span t-if="props.line.get_product().formato">
<t t-out="props.line.get_product().formato" />
</span> </span>
</xpath> </xpath>
</t> </t>
@ -28,38 +40,54 @@
owl="1" owl="1"
> >
<xpath expr="//div[hasclass('section-product-info-title')]" position="after"> <xpath expr="//div[hasclass('section-product-info-title')]" position="after">
<div class="section-product-info"> <div class="section-title">
<br/> <span>Detalles</span>
<div class="section-title-line"></div>
</div>
<div class="section-inventory-body">
<table class="mobile-table"> <table class="mobile-table">
<t t-if="props.product.subtitle">
<tr> <tr>
<td>Subtitulo:</td> <td>Subtitulo:</td>
<td><t t-out="props.product.subtitle" /></td> <td><t t-out="props.product.subtitle" /></td>
</tr> </tr>
</t>
<t t-if="props.product.autor">
<tr> <tr>
<td>Autor:</td> <td>Autor:</td>
<td><t t-out="props.product.autor" /></td> <td><t t-out="props.product.autor" /></td>
</tr> </tr>
</t>
<t t-if="props.product.formato">
<tr> <tr>
<td>Formato:</td> <td>Formato:</td>
<td><t t-out="props.product.formato" /></td> <td><t t-out="props.product.formato" /></td>
</tr> </tr>
</t>
<t t-if="props.product.editorial">
<tr> <tr>
<td>Editorial:</td> <td>Editorial:</td>
<td><t t-out="props.product.editorial" /></td> <td><t t-out="props.product.editorial" /></td>
</tr> </tr>
</t>
<t t-if="props.product.fecha_entrada">
<tr> <tr>
<td>Entrada:</td> <td>Entrada:</td>
<td><t t-out="props.product.fecha_entrada" /></td> <td><t t-out="props.product.fecha_entrada" /></td>
</tr> </tr>
</t>
<t t-if="props.product.genero">
<tr> <tr>
<td>Género:</td> <td>Género:</td>
<td><t t-out="props.product.genero" /></td> <td><t t-out="props.product.genero" /></td>
</tr> </tr>
<!-- Si se quita el campo description en la busqueda, no se muestra aquí </t>
<t t-if="props.product.description">
<tr> <tr>
<td>Descripcion:</td> <td>Descripción:</td>
<td><t t-out="props.product.description" /></td> <td><t t-out="props.product.description" /></td>
</tr> --> </tr>
</t>
</div> </div>
</xpath> </xpath>
</t> </t>