[add] packaging to webshop

This commit is contained in:
Niels Göttsch 2024-07-29 22:18:08 +02:00 committed by Niels Göttsch
parent 83960a09b2
commit 86ae0e775e

View file

@ -1,9 +1,11 @@
from odoo import api, models from odoo import api, fields, models
class SaleOrderLine(models.Model): class SaleOrderLine(models.Model):
_inherit = "sale.order.line" _inherit = "sale.order.line"
batch_id = fields.Many2one(related="order_id.batch_id")
def _update_batch_products(self): def _update_batch_products(self):
for order_line in self: for order_line in self:
batch_id = order_line.order_id.batch_id batch_id = order_line.order_id.batch_id