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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký