purchase_stock_generic_product and sale_stock_generic_product: allows the use of generic products

This commit is contained in:
Alexis de Lattre
2024-06-15 12:24:12 +02:00
parent d07e38e1f3
commit 740d167331
13 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import purchase_order_line

View File

@@ -0,0 +1,17 @@
# Copyright 2024 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'
def _prepare_stock_move_vals(
self, picking, price_unit, product_uom_qty, product_uom):
vals = super()._prepare_stock_move_vals(
picking, price_unit, product_uom_qty, product_uom)
# native : product.description_pickingin or self.name
vals['description_picking'] = self.name
return vals