I need to print the zpl label from the model stock.picking in the validate button
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
1311
Tampilan
Hi,
You can try like below.
Inherit the model stock.picking and super the function of button validate
from odoo.tests import Form
class StockPicking(models.Model):
_inherit = 'stock.picking'
def button_validate(self):
res = super(StockPicking, self).button_validate()
label_print_from = Form(self.env['product.label.layout'].with_user(user),
view='stock.product_label_layout_form_picking')
label_print_from.picking_quantity = 'custom'
label_print_from.custom_quantity = 1
label_print_from.print_format = 'zpl'
label_print_from.product_ids = self.product_id
label_id = label_print_from.save()
label_id.process()
return res
Using this method you may able to print barcode while click on validate button.
Regards
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Jul 25
|
354 | ||
|
2
Jun 25
|
1274 | ||
|
1
Mei 25
|
1298 | ||
|
0
Mar 25
|
1151 | ||
|
1
Feb 25
|
1864 |