Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1225 Lượt xem

Hi,


is it possible to tell Odoo to print specific packaging labels when a package has been finished packing?


e.g. 

Additionally to the Shipping label, i want that Odoo also prints the contents of the box onto a label so that i can also stick it onto the box or i want to print a specific text onto a label, which will be printed out additionaly to the shipping label


Is something like this possible?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Define a QWeb report template for your custom label.

py.file

class StockPicking(models.Model):

    _inherit = 'stock.picking'


    @api.multi

    def action_done(self):

        super(StockPicking, self).action_done()

        # Check if the package is done

        for package in self.package_ids:

            if package.is_done:

                # Print custom label

                self.env.ref('your_module.custom_package_label_report').report_action(self)


Ảnh đại diện
Huỷ bỏ
Tác giả

cool thank you!

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 23
1864
1
thg 10 18
4135
1
thg 1 16
3924
1
thg 8 25
683
1
thg 7 25
1408