Muestra el campo formato en la ficha de producto y en las línea de la orden
This commit is contained in:
parent
0e2919d1eb
commit
2a4ffee914
5 changed files with 80 additions and 1 deletions
19
product_library/static/src/css/pos.css
Normal file
19
product_library/static/src/css/pos.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
.pos .product .format {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
vertical-align: top;
|
||||
color: white;
|
||||
line-height: 13px;
|
||||
background: #7f82ac;
|
||||
padding: 2px 5px;
|
||||
border-radius: 2px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pos .order .orderline .format {
|
||||
color: #777;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ Overload models.PosModel
|
|||
product_model.fields.push('autor');
|
||||
product_model.fields.push('editorial');
|
||||
product_model.fields.push('genero');
|
||||
product_model.fields.push('formato');
|
||||
return _super_posmodel.initialize.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
|
|
29
product_library/static/src/xml/pos.xml
Normal file
29
product_library/static/src/xml/pos.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--Copyright 2021 Criptomart <https://criptomart.net> -->
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-extend="Product">
|
||||
<t t-jquery=".product-name" t-operation="after">
|
||||
<!-- <t t-if="widget.pos.config.show_format && product.type == 'product'"> -->
|
||||
<span t-attf-class="format" >
|
||||
<t t-esc="product.formato" />
|
||||
</span>
|
||||
</t>
|
||||
<!-- </t> -->
|
||||
</t>
|
||||
|
||||
<t t-extend="Orderline">
|
||||
<!-- <t t-jquery=".product-name" t-operation="after">
|
||||
<span t-attf-class="format" >
|
||||
<t t-esc="product.formato" />
|
||||
</span>
|
||||
</t> -->
|
||||
<t t-jquery=".product-name" t-operation="after">
|
||||
<!-- <t t-if="widget.pos.config.show_format && line.get_product().type == 'product'" > -->
|
||||
<div t-attf-class="format" >
|
||||
<t t-esc="line.get_product().formato" />
|
||||
</div>
|
||||
<!-- </t> -->
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</templates>
|
Loading…
Add table
Add a link
Reference in a new issue