Skip to content

Commit

Permalink
[REF] product_print_category_food_report all : shelf pricetags
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Apr 26, 2024
1 parent 7f891a0 commit fb08b5d
Show file tree
Hide file tree
Showing 17 changed files with 211 additions and 311 deletions.
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 @@ -33,6 +33,7 @@
"report/qweb_template_pricetag_02.xml",
"report/qweb_template_pricetag_10.xml",
"report/qweb_template_pricetag_11.xml",
"report/qweb_template_pricetag_12.xml",
# "report/qweb_pricetag_bulk_long.xml",
# "report/qweb_pricetag_bulk_square.xml",
# "report/qweb_pricetag_counter.xml",
Expand Down
36 changes: 27 additions & 9 deletions product_print_category_food_report/data/product_print_category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<odoo>

<record id="print_category_pricetag_01" model="product.print.category">
<field name="name">01 - Shelf Square Middle - 40x36mm</field>
<field name="name">01 - Shelf Square Middle - 42x38mm</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_01" />
<field name="field_ids" eval="[
(4, ref('product.field_product_product__name')),
Expand All @@ -25,7 +25,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record>

<record id="print_category_pricetag_02" model="product.print.category">
<field name="name">02 - Shelf Square Small - 30x30mm</field>
<field name="name">02 - Shelf Square Small - 32x32mm</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_02" />
<field name="field_ids" eval="[
(4, ref('product.field_product_product__name')),
Expand All @@ -42,28 +42,46 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record>

<record id="print_category_pricetag_10" model="product.print.category">
<field name="name">10 - Shelf Rectangular - 76x31mm</field>
<field name="name">10 - Shelf Rectangular - 79x32mm</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_10" />
<field name="field_ids" eval="[
(4, ref('product.field_product_product__name')),
(4, ref('product.field_product_product__list_price')),
(4, ref('product.field_product_product__uom_id')),
(4, ref('product_net_weight.field_product_product__net_weight')),
(4, ref('product.field_product_product__volume')),
(4, ref('product_print_category_food_report.field_product_product__pricetag_uom_id')),
(4, ref('product.field_product_product__default_code')),
(4, ref('product.field_product_product__barcode')),
(4, ref('product_label.field_product_product__label_ids')),
(4, ref('product_print_category_food_report.field_product_product__pricetag_type_id')),
(4, ref('product_origin.field_product_product__country_id')),
(4, ref('product_origin.field_product_product__state_id')),
(4, ref('l10n_fr_department_product_origin.field_product_product__department_id')),
(4, ref('product_origin.field_product_product__origin_description')),
(4, ref('product_origin.field_product_product__maker_description')),
(4, ref('product_print_category_food_report.field_product_product__pricetag_uom_id')),
(4, ref('product_print_category_food_report.field_product_product__pricetag_type_id')),
(4, ref('product.field_product_product__list_price')),
(4, ref('product_net_weight.field_product_product__net_weight')),
(4, ref('product.field_product_product__volume')),
(4, ref('product_label.field_product_product__label_ids')),
(4, ref('product_food.field_product_product__is_alimentary')),
(4, ref('product_food_certification.field_product_product__ingredient_origin_type')),
(4, ref('product_food_certification.field_product_product__is_uncertifiable')),
]"/>
</record>


<record id="print_category_pricetag_11" model="product.print.category">
<field name="name">11 - Shelf Rectangular Litle Margin - 79x37mm</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_11" />

</record>

<record id="print_category_pricetag_12" model="product.print.category">
<field name="name">12 - Shelf Rectangular Middle Margin - 79x44mm</field>
<field name="qweb_view_id" ref="qweb_template_pricetag_12" />

</record>



Expand Down
22 changes: 21 additions & 1 deletion product_print_category_food_report/demo/product_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,30 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
]"/>
<field name="ingredient_origin_type" >eu_no_eu</field>
<field name="country_id" ref="base.fr"/>
<field name="state_id" ref="l10n_fr_state.res_country_state_auvergne"/>
<field name="state_id" ref="l10n_fr_state.res_country_state_bourgogne"/>
<field name="department_id" ref="l10n_fr_department.res_country_department_saoneetloire"/>
<field name="maker_description">Le jardinier Glacier</field>
</record>

<record id="product_with_pricetag_12" model="product.product">
<field name="name">Pricetag 12 - Antisèche blonde (75cl)</field>
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="barcode">3770022113008</field>
<field name="default_code">VEV-000044</field>
<field name="list_price">6.30</field>
<field name="volume">0.75</field>
<field name="print_category_id" ref="print_category_pricetag_12"/>
<field name="is_alimentary" eval="True"/>
<field name="is_alcohol" eval="True"/>
<field name="label_ids" eval="[
(4, ref('product_label.label_agriculture_biologique')),
(4, ref('product_food.label_alcool_grossesse')),
]"/>
<field name="ingredient_origin_type" >eu_no_eu</field>
<field name="country_id" ref="base.fr"/>
<field name="state_id" ref="l10n_fr_state.res_country_state_auvergne"/>
<field name="department_id" ref="l10n_fr_department.res_country_department_savoie"/>
<field name="maker_description">L'écume du Guiers</field>
</record>

</odoo>

This file was deleted.

2 changes: 2 additions & 0 deletions product_print_category_food_report/report/qweb_reports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ 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/css/pricetag_01.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/css/pricetag_02.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/css/pricetag_10.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/css/pricetag_11.scss" />
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/css/pricetag_12.scss" />

<!-- Uncomment the following line to debug -->
<link rel="stylesheet" type="text/scss" href="/product_print_category_food_report/static/css/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)
@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_12">
<t t-set="pricetag_name" t-value="'pricetag_12'"/>
<t t-call="product_print_category_food_report.qweb_template_pricetag_template_B" />
</template>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<t t-call="web.basic_layout">
<t t-foreach="category_data['lines']" t-as="line">
<t t-foreach="line.quantity" t-as="q">
<div class="pricetag_product pricetag_10">
<div t-att-class="'pricetag_product %s' % pricetag_name">
<div class="margin_top" />
<div class="pricetag_left">

<!-- Product Name -->
Expand Down Expand Up @@ -94,6 +95,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<t t-call="product_print_category_food_report.qweb_component_barcode" />
</div>
</div>
<div class="margin_bottom" />
</div>
</t>
</t>
Expand Down
6 changes: 6 additions & 0 deletions product_print_category_food_report/static/css/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
overflow: hidden;


.margin_top, .margin_bottom {
margin : 0.0cm;
padding : 0.00cm;
overflow: hidden;
}

.pricetag_left, .pricetag_right, {
margin : 0.0cm;
padding : 0.00cm;
Expand Down
9 changes: 9 additions & 0 deletions product_print_category_food_report/static/css/debug.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
border-style: dotted;
border-color: black;


.margin_top, .margin_bottom {
background-image: repeating-linear-gradient(
-45deg,
transparent 0 5px,
black 5px 10px
);
}

.pricetag_left {
background-color: #ACF;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.pricetag_01 {
border: 1px solid grey;
width:4.91cm; height:4.42cm;
width: 4.91cm;
height: 4.42cm;

.product_name{
font-size:17px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.pricetag_02 {
border: 1px solid grey;
width:3.8cm; height:3.8cm;
width: 3.8cm;
height: 3.8cm;

.product_name{
font-size:13px;
Expand Down
12 changes: 8 additions & 4 deletions product_print_category_food_report/static/css/pricetag_10.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.pricetag_10 {
border: 1px solid black;
width:9.3cm;
height:3.8cm;
width: 9.3cm;
height: 3.8cm;

.margin_top, .margin_bottom {
display: none;
}

.pricetag_left {
width : 5.50cm;
height:3.8cm;
width: 5.50cm;
height: 3.8cm;

.product_name{
height: 1.2cm;
Expand Down
16 changes: 13 additions & 3 deletions product_print_category_food_report/static/css/pricetag_11.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
.pricetag_10 {
.pricetag_11 {
border: 1px solid black;
width:9.3cm;
height:3.8cm;
width: 9.3cm;
height: 4.4cm;

.margin_top, .margin_bottom {
width: 9.3cm;
height: 0.3cm;
}

.margin_bottom {
width:9.3cm;
height: 0.3cm;
}

.pricetag_left {
width : 5.50cm;
Expand Down
Loading

0 comments on commit fb08b5d

Please sign in to comment.