Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
1
sale_product_set_packaging_qty/models/__init__.py
Executable file
1
sale_product_set_packaging_qty/models/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import product_set
|
||||
15
sale_product_set_packaging_qty/models/product_set.py
Executable file
15
sale_product_set_packaging_qty/models/product_set.py
Executable file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2020 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||
from odoo import models
|
||||
|
||||
|
||||
class ProductSetLine(models.Model):
|
||||
_inherit = "product.set.line"
|
||||
|
||||
def prepare_sale_order_line_values(self, order, quantity, max_sequence=0):
|
||||
res = super().prepare_sale_order_line_values(
|
||||
order, quantity, max_sequence=max_sequence
|
||||
)
|
||||
if self.product_packaging_id:
|
||||
res["product_packaging_id"] = self.product_packaging_id.id
|
||||
return res
|
||||
Reference in New Issue
Block a user