Hello gus can you help me , how can I customize the format of labels in Odoo and add photos the labels?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Project
- MRP
Этот вопрос был отмечен
Hii
which odoo version you will use i dont know here is example of version 16 to 18 enterprice version
Use Odoo Studio:
Go to Inventory or Sales → Products
Open a product
Click "Print" → Product Labels
Use Odoo Studio to customize:
- Drag and drop fields
- Add the image field: product.image_128 or product.image_1920
for community version:
Create a Custom Report Template
In your custom module, create a label template like this:
<template id="product_label_custom" inherit_id="stock.report_product_product_label">
<xpath expr="//t[@t-name='stock.report_product_product_label']" position="replace">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<div style="border: 1px solid black; width: 60mm; height: 30mm; padding: 4mm;">
<strong><t t-esc="o.name"/></strong><br/>
<img t-if="o.image_128" t-att-src="'data:image/png;base64,%s' % o.image_128" style="width: 50px; height: 50px;"/><br/>
<span><t t-esc="o.default_code"/></span>
</div>
</t>
</t>
</xpath>
</template>
Add the Report Action
<report
id="action_product_label_custom"
model="product.product"
string="Custom Product Label"
report_type="qweb-pdf"
name="your_module.product_label_custom"
file="your_module.product_label_custom"
print_report_name="'Label - %s' % object.name"
/>
Restart & Test
- Upgrade your module
- Open a product
- Click Print → Custom Product Label
- It should show product name + barcode + image
i hope it is use full
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Регистрация