Skip to content

Latest commit

 

History

History
 
 

product_print_category_food_report

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Product print category food report

Beta License: AGPL-3 grap/grap-odoo-business

This module extends product_print_category by adding nice reports food related. At the moment, we create five different pricetag reports.

Specifications :

  • We add a pricetag_type which permits to assign a color for the pricetags.
  • We can choose a second unity of measure in order to display the price with a more appropriate unity (for example for very expensive products)
  • Thanks to product_food module, ingredients, allergens are displayed in bulk reports
  • Thanks to product_label and product_origin, we also display labels and origin
  • Origin is constructed according to origin fields, organic labels and provenance. Origin is displayed in product form.
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/origin_calculated_organic_description.gif
  • Origin is displayed in product form thanks to pricetag_origin so you don't have to print the pricetag to see it

Here is what's look like the reports :

  • Normal pricetag "classic format" 76x31mm
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/pricetag_normal.png
  • Bulk pricetag long designed for Applimage bulk equipment 52x101mm
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/pricetag_bulk_long.png
  • Bulk pricetag square 93x93mm
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/pricetag_bulk_square.png
  • Square pricetag 40x36mm
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/pricetag_square.png
  • Counter pricetag - 72*123mm
https://raw.githubusercontent.com/grap/grap-odoo-business/12.0/product_print_category_food_report/static/img/pricetag_counter.png

Table of contents

Report use barcode image handle directly by Odoo To make it wortk in your report :

  1. Update wkhtmltopdf to version 0.12.5
  2. Add new system parameter : Key: web.base.url.freeze Value: True
  3. Change your report definition by using web_basic_layout <template> <t t-call="web.basic_layout">your things</t> </template>

To use custom css in report, we can use inline css or externalize css file (even scss). For this purpose, add your css file in web.report_assets_common

<template id="id_css_for_my_report" inherit_id="web.report_assets_common"> <xpath expr="." position="inside"> <link href="/product_print_category_food_report/static/css/my_css.scss" rel="stylesheet" type="text/scss"/> </xpath> </template>

Beware, all css file will be shared, so you can't have the same css calling rules for two differents results. You can use scss nesting for that purpose.

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

  • GRAP

This module is part of the grap/grap-odoo-business project on GitHub.

You are welcome to contribute.