-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF] product_print_category_food_report : mutualize qweb template
- Loading branch information
1 parent
36d51e6
commit d187275
Showing
4 changed files
with
73 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
product_print_category_food_report/report/qweb_template_pricetag_template_A.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?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_template_A"> | ||
<t t-call="web.basic_layout"> | ||
<t t-foreach="category_data['lines']" t-as="line"> | ||
<t t-foreach="line.quantity" t-as="q"> | ||
<div t-att-class="'pricetag_product %s' % pricetag_name"> | ||
|
||
<!-- Product name --> | ||
<div class="product_name" | ||
t-attf-style="background-color: {{ line.product_id.pricetag_type_id.color }};"> | ||
<t t-esc="line.product_id.name"/> | ||
</div> | ||
|
||
<!-- Main Price --> | ||
<div class="main_price"> | ||
<span class="main_price_text"> | ||
<t t-esc="'%0.2f' % (line.product_id.pricetag_main_price_value)"/> € | ||
</span> | ||
<span class="main_uom_text"> | ||
<t t-esc="line.product_id.pricetag_main_uom_text"/> | ||
</span> | ||
</div> | ||
|
||
<!-- Secondary Price --> | ||
<div class="secondary_price"> | ||
<span class="secondary_price_text" t-if="line.product_id.pricetag_secondary_price_value"> | ||
<t t-esc="'%0.2f' % (line.product_id.pricetag_secondary_price_value)"/> € | ||
</span> | ||
<span class="secondary_uom_text" t-if="line.product_id.pricetag_secondary_price_value"> | ||
<t t-esc="line.product_id.pricetag_secondary_uom_text"/> | ||
</span> | ||
</div> | ||
|
||
<!-- Per Unit Quantity --> | ||
<div class="per_unit_quantity"> | ||
<t t-if="line.product_id.pricetag_per_unit_quantity_text"> | ||
<t t-esc="line.product_id.pricetag_per_unit_quantity_text"/> : <t t-esc="line.product_id.pricetag_per_unit_quantity_value"/> | ||
</t> | ||
</div> | ||
|
||
<!-- Barcode --> | ||
<div class="zone_barcode"> | ||
<t t-set="barcode_width" t-value="400"/> | ||
<t t-set="barcode_height" t-value="100"/> | ||
<t t-call="product_print_category_food_report.qweb_component_barcode" /> | ||
</div> | ||
|
||
<!-- Default Code + Write date --> | ||
<div class="shop_information"> | ||
<t t-esc="line.product_id.default_code" /> - | ||
<t t-esc="line.product_id.pricetag_print_date_text" /> | ||
</div> | ||
|
||
</div> | ||
</t> | ||
</t> | ||
</t> | ||
</template> | ||
|
||
</odoo> |