Version 16. We have a lot of incoming items that we have to track by serial number. I want to create barcode labels with the serial number to put on the boxes (1 item per box). Is there a way to add that info to the barcode labels? Also on some items I need to include our at number plus the vendor part number. I do not see how to do that either. Right now I have export templates that I bring into the dymo app but it is a lot of extra steps. Thanks in advance.
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ờ
Hello,
For creating barcode labels with the serial number you need to create a button in ' stock.lot ' model, please refer this below code for button function.
def generate_barcode(self):
for record in self:
data = {
'response': record.name,
}
return self.env.ref('module_name.action_for_barcode').report_action(self, data=data)
In xml file in data folder, create a action for triggering this barcode
<record id="action_for_barcode" model="ir.actions.report">
<field name="name">action_barcode</field>
<field name="model">my.barcode</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">module_name.template_name</field>
<field name="report_file">module_name.template_name</field>
</record>
And finally create a template for generating barcode
<template id="template_name">
<t t-call="web.basic_layout">
<div class="page">
<div class="col-md-6">
<img class="barcode" t-att-src="'/report/barcode/?barcode_type=%s&value=%s&width=%s&height=%s&humanreadable=1&quiet=0'
% ('Code128',response, 205, 67)" alt="Barcode"/>
</div>
</div>
</t>
</template>
in this way you can create barcode with serial number.
Regards
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ý