[ADD] product_update_price_last_purchase
This commit is contained in:
parent
27f0791503
commit
5f4bb24894
18 changed files with 942 additions and 0 deletions
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<report
|
||||
id="report_productbarcode"
|
||||
string="Barcode"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product_laosa.report_productbarcode_laosa"
|
||||
file="product_laosa.report_productbarcode_laosa"/>
|
||||
|
||||
<record id="report_productbarcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
id="report_product_product_barcode"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_productbarcode"
|
||||
file="product.report_productbarcode"
|
||||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_product_product_barcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
|
||||
<report
|
||||
id="report_product_template_barcode"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_productbarcode"
|
||||
file="product.report_productbarcode"
|
||||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_product_template_barcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
id="report_simple_barcode_laosa"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_productbarcode"
|
||||
file="product.report_productbarcode"
|
||||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_simple_barcode_laosa" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
id="report_productbarcode_laosa"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
name="product.report_productbarcode"
|
||||
file="product.report_productbarcode"
|
||||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_productbarcode_laosa" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_simple_barcode_laosa" inherit_id="product.report_simple_barcode" >
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_simple_barcode">
|
||||
<div style="height: 1.65cm; width: 3.5cm; margin-top: 0.2mm; padding: 0; text-align: center; position: relative; display: inline-table; border: 2px solid black;">
|
||||
<t t-if="product.barcode">
|
||||
<img alt="Barcode" t-if="len(product.barcode) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', quote_plus(product.barcode or ''), 600, 150)" style="width: 100%; height: 1.165cm;"/>
|
||||
<img alt="Barcode" t-elif="len(product.barcode) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', quote_plus(product.barcode or ''), 600, 150)" style="width:100%;height:4rem;"/>
|
||||
<img alt="Barcode" t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', quote_plus(product.barcode or ''), 600, 150)" style="width:100%;height:4rem"/>
|
||||
<span t-field="product.barcode" style="font-size: 0.6em;" />
|
||||
</t>
|
||||
<t t-else=""><span class="text-muted">No barcode</span></t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="report_productbarcode_laosa" inherit_id="product.report_productbarcode">
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_productbarcode">
|
||||
<t t-call="web.html_container">
|
||||
<div class="page" >
|
||||
<t t-foreach="docs" t-as="product">
|
||||
<t t-call="product.report_simple_barcode_laosa">
|
||||
<t t-set="product" t-value="product"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<template id="report_simple_label_shelf" inherit_id="product.report_simple_label" >
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_simple_label">
|
||||
<div style="height: 4cm; width: 6.7cm; border: 2px solid black; text-align: center; margin: 0; padding: 0; position: relative; display: inline-table;">
|
||||
<div class="text-center" style="margin: 10px; font-size: 1em; text-align: center;">
|
||||
<strong t-field="product.name"/>
|
||||
</div>
|
||||
<div style="font-size: 1.9em; vertical-align:bottom; position: absolute; bottom: 15; left: 10;">
|
||||
<strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'display_currency': product.company_id.currency_id}"/>
|
||||
</div>
|
||||
<t t-if="product.packaging_ids">
|
||||
<div style="vertical-align: bottom; position: absolute; bottom: 20; right: 10; font-size: 0.7em; text-align: left;" >
|
||||
<t t-set="unit_price" t-value="round(product.list_price / product.packaging_ids[0].qty, 1)" />
|
||||
<strong ><t t-esc="unit_price" t-options="{'widget': 'monetary', 'display_currency': product.company_id.currency_id}"/></strong>
|
||||
<strong >/</strong>
|
||||
<strong t-field="product.packaging_ids[0].name"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="report_producttemplatelabel_shelf" inherit_id="product.report_producttemplatelabel" >
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_producttemplatelabel">
|
||||
<t t-call="web.html_container">
|
||||
<div class="page" style="">
|
||||
<t t-set="page" t-value="0" />
|
||||
<t t-foreach="docs" t-as="product">
|
||||
<t t-call="product.report_simple_label">
|
||||
<t t-set="product" t-value="product"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue