Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][IMP] product_print_category_food_report Some improvements after big upgrade #156

Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
45b649e
[FIX] typo for barcode type code128
quentinDupont Jul 2, 2024
a2f18c6
[IMP] product_print_category_food_report : smaller barcode for pricet…
quentinDupont Jul 2, 2024
8b8216a
[IMP] product_print_category_food_report: add margin between all labels
quentinDupont Jul 2, 2024
8c3de59
[IMP] product_print_category_food_report: pricetag_1* Field maker and…
quentinDupont Jul 2, 2024
b8da09a
[IMP] product_print_category_food_report: pricetag_2* Field maker and…
quentinDupont Jul 2, 2024
940ce57
[IMP] product_print_category_food_report: pricetag_3* Field maker and…
quentinDupont Jul 2, 2024
5e6be6a
[IMP] product_print_category_food_report: pricetag_2* Bigger product …
quentinDupont Jul 3, 2024
d80d25c
[i18n] product_print_category_food_report : update fr
quentinDupont Jul 4, 2024
f044f47
[IMP] product_print_category_food_report: add comment for croping bar…
quentinDupont Jul 4, 2024
958c7da
[IMP] product_print_category_food_report: 2 lines and bigger product …
quentinDupont Jul 5, 2024
de51b77
[ADD] New format Bulk - 68x68mm, making some css specific in child pr…
quentinDupont Jul 5, 2024
e3bb911
[IMP] product_print_category_food_report: organic label LEGAL SIZE
quentinDupont Jul 5, 2024
91f8cd5
Update product_print_category_food_report/report/qweb_template_pricet…
quentinDupont Jul 8, 2024
f6618b9
[IMP] product_print_category_food_report: Add margin (top, bottom) fo…
quentinDupont Jul 22, 2024
acc132d
[IMP] product_print_category_food_report: Food composition height [FI…
quentinDupont Jul 23, 2024
3366752
[ADD] New format Shelf Rectangular Small Size (no label, no barcode)
quentinDupont Jul 22, 2024
e645b5a
i18n update FR
quentinDupont Jul 23, 2024
4017300
[IMP] product_print_category_food_report: Label 40 fix height
quentinDupont Jul 26, 2024
70f25c7
[IMP] product_print_category_food_report: Label 01 bigger margin height
quentinDupont Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions product_print_category_food_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"report/qweb_template_pricetag_30.xml",
"report/qweb_template_pricetag_31.xml",
"report/qweb_template_pricetag_32.xml",
"report/qweb_template_pricetag_33.xml",
"views/view_res_company.xml",
"views/view_product_pricetag_type.xml",
"views/view_product_product.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="qweb_view_id" ref="qweb_template_pricetag_32" />
</record>

<record id="print_category_pricetag_33" model="product.print.category">
<field name="name">Bulk - 68x68mm (N°33)</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_33" />
</record>

<function model="product.print.category" name="write">
<value model="product.print.category" eval="[
ref('product_print_category_food_report.print_category_pricetag_01'),
Expand All @@ -65,6 +70,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
ref('product_print_category_food_report.print_category_pricetag_30'),
ref('product_print_category_food_report.print_category_pricetag_31'),
ref('product_print_category_food_report.print_category_pricetag_32'),
ref('product_print_category_food_report.print_category_pricetag_33'),
]"
/>
<value eval="{
Expand Down Expand Up @@ -92,6 +98,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
ref('product_print_category_food_report.print_category_pricetag_30'),
ref('product_print_category_food_report.print_category_pricetag_31'),
ref('product_print_category_food_report.print_category_pricetag_32'),
ref('product_print_category_food_report.print_category_pricetag_33'),
]"
/>
<value eval="{
Expand All @@ -113,6 +120,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
ref('product_print_category_food_report.print_category_pricetag_30'),
ref('product_print_category_food_report.print_category_pricetag_31'),
ref('product_print_category_food_report.print_category_pricetag_32'),
ref('product_print_category_food_report.print_category_pricetag_33'),
]"
/>
<value eval="{
Expand Down
178 changes: 46 additions & 132 deletions product_print_category_food_report/i18n/fr.po

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<img t-elif="len(line.product_id.barcode) == 8"
t-att-src="'/report/barcode/?humanreadable=1&amp;type=EAN8&amp;value=%s' % (line.product_id.barcode)"/>
<img t-else=""
t-att-src="'/report/barcode/?humanreadable=1&amp;?type=Code128&amp;value=%s' % (line.product_id.barcode)"/>
t-att-src="'/report/barcode/?humanreadable=1&amp;type=Code128&amp;value=%s' % (line.product_id.barcode)"/>
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
</t>
</div>
</template>
Expand Down
1 change: 1 addition & 0 deletions product_print_category_food_report/report/qweb_reports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/src/scss/pricetag_30.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/src/scss/pricetag_31.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/src/scss/pricetag_32.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/src/scss/pricetag_33.scss" />

<!-- Uncomment the following line to debug -->
<!-- <link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/src/scss/debug.scss" /> -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
@author: Quentin DUPONT (https://twitter.com/pondupont)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<template id="qweb_template_pricetag_33">
<t t-set="pricetag_name" t-value="'pricetag_33'"/>
<t t-call="product_print_category_food_report.qweb_template_pricetag_template_C" />
</template>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,27 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

<div class="pricetag_center">

<!-- &#160; is useful to have space and not underline css under this space -->
<!-- Manufacturing Location -->
<div class="product_origin" t-if="line.product_id.pricetag_origin">
<span class="info_title">Manufacturing: </span><t t-esc="line.product_id.pricetag_origin"/>
<span class="info_title">Manufacturing:</span>&#160;<t t-esc="line.product_id.pricetag_origin"/>
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
</div>

<!-- Producer -->
<div class="maker_description" t-if="line.product_id.maker_description">
<span class="info_title">Producer: </span><t t-esc="line.product_id.maker_description"/>
<span class="info_title">Producer:</span>&#160;<t t-esc="line.product_id.maker_description"/>
</div>

<!-- Feed Composition (allergens, ingredients, etc...) -->
<div class="feed_composition">
<t t-if="line.product_id.allergen_text">
<span class="info_title">Allergens: </span><t t-esc="line.product_id.allergen_text"/><br/>
<span class="info_title">Allergens:</span>&#160;<t t-esc="line.product_id.allergen_text"/><br/>
</t>
<t t-if="line.product_id.trace_allergen_text">
<span class="info_title">Traces: </span><t t-esc="line.product_id.trace_allergen_text"/><br/>
<span class="info_title">Traces:</span>&#160;<t t-esc="line.product_id.trace_allergen_text"/><br/>
</t>
<t t-if="line.product_id.ingredients">
<span class="info_title">Ingredients: </span><span t-raw="line.product_id.ingredients"/>
<span class="info_title">Ingredients:</span>&#160;<span t-raw="line.product_id.ingredients"/>
</t>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.pricetag_product {
font-family: Luciole;
margin : 0.0cm;
margin : 0.02cm;
padding : 0.0cm;
overflow: hidden;
float: left;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
border: 1px solid grey;

.main_price {
height: 0.7cm;

.main_price_text {
font-size: 16px;
font-weight: bold;
}

.main_uom_text {
font-size: 12px;
}
}

/* Image height is bigger than
zone height : permits to crop barcode
to make it smaller */
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
.zone_barcode {
height: 1.3cm;
height: 0.5cm;

.wrap_barcode_image{
height: 1.2cm;
height: 1.5cm;
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
}
.wrap_barcode_image > img{
height: 1.2cm;
height: 1.5cm;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@
width: 4.91cm;
height: 4.42cm;

.main_price {
height: 1.2cm;

.main_price_text {
font-size: 30px;
}

}

.product_name{
font-size:17px;
height: 1.42cm;
font-size: 20px;
line-height: 0.8cm;
height: 1.5cm;
}

.secondary_price {
height: 0.4cm;
font-size: 8px;
height: 0.6cm;
font-size: 11px;
}

.per_unit_quantity {
height: 0.4cm;
font-size: 8px;
font-size: 9px;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@
width: 3.8cm;
height: 3.8cm;

.main_price {
height: 0.9cm;

.main_price_text {
font-size: 26px;
}
}

.product_name{
font-size:13px;
height: 1.0cm;
font-size: 17px;
line-height: 0.6cm;
height: 1.2cm;
}

.secondary_price {
height: 0.3cm;
font-size: 6px;
height: 0.6cm;
font-size: 10px;
}

.per_unit_quantity {
height: 0.3cm;
font-size: 6px;
height: 0.4cm;
font-size: 8px;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.pricetag_left {
width: 5.50cm;
height: 3.8cm;
padding-left: 0.2cm;

.product_name{
height: 1.2cm;
Expand All @@ -13,21 +14,21 @@
}

.product_origin {
height: 0.5cm;
height: 0.35cm;
font-size: 8px;
}

.maker_description {
height: 0.5cm;
height: 0.35cm;
font-size: 8px;
}

.product_labels {
height: 0.7cm;
height: 1cm;

img.product_label {
width: 0.6cm;
height: 0.6cm;
width: 0.9cm;
height: 0.9cm;
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
margin: 0.1cm;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@
.pricetag_left {
width: 7.5cm;
height: 6.8cm;
padding-left: 0.1cm;

.product_name{
height: 2.2cm;
font-size: 30px;
height: 3.3cm;
font-size: 40px;
font-weight: bold;
}

.product_origin {
height: 1.2cm;
height: 0.5cm;
font-size: 14px;
}

.maker_description {
height: 0.8cm;
height: 0.5cm;
font-size: 14px;
}

Expand Down
37 changes: 24 additions & 13 deletions product_print_category_food_report/static/src/scss/pricetag_3.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.pricetag_30, .pricetag_31, .pricetag_32 {
.pricetag_30, .pricetag_31, .pricetag_32, .pricetag_33 {

border: 2px solid black;

Expand All @@ -8,29 +8,32 @@

.product_name {
height: 100%;
font-size: 19px;
padding-top: 6px;
font-size: 25px;
line-height: 1;
font-weight: bold;
}
}

.pricetag_center {
width: 100%;
border-bottom: 2px solid;
padding-left: 0.1cm;
position: relative;
/* position relative permits to have labels at the bottom with absolute position */

.product_origin {
font-size: 13px;
}

.maker_description {
font-size: 13px;
.info_title {
text-decoration: underline;
}

.feed_composition {
font-size: 13px;
overflow: hidden;
}

.product_labels {
height: 1.2cm;
position: absolute;
bottom: 0;

img.product_label {
width: 1.0cm;
Expand All @@ -51,20 +54,28 @@
border-right: 2px solid;

.organic_text {
height: 0.8cm;
margin : 0.05cm 0.05cm;
height: 0.75cm;
font-size: 7px;
}

/* Image height is bigger than
zone height : permits to crop barcode
to make it smaller
Position relative permits to
go up barcode and display code number */
.zone_barcode {
height: 1.5cm;
height: 1.2cm;

.wrap_barcode_image{
height: 1.4cm;
height: 1.5cm;
width: 3.0cm;
}
.wrap_barcode_image > img{
height: 1.4cm;
height: 1.5cm;
width: 3.0cm;
position: relative;
bottom: 15px
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
height: 12.38cm;

.pricetag_top {
height: 2.2cm;
height: 2.3cm;
quentinDupont marked this conversation as resolved.
Show resolved Hide resolved
}

.pricetag_center {
height: 7.18cm;
height: 7.08cm;
font-size: 13px;

.product_origin {
max-height: 1.0cm;
Expand All @@ -20,8 +21,6 @@
.feed_composition {
max-height: 3.98cm;
}
.product_labels {
}

}

Expand Down
Loading
Loading