purchase_stock_generic_product and sale_stock_generic_product: allows the use of generic products
This commit is contained in:
1
purchase_stock_generic_product/models/__init__.py
Normal file
1
purchase_stock_generic_product/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import purchase_order_line
|
||||
17
purchase_stock_generic_product/models/purchase_order_line.py
Normal file
17
purchase_stock_generic_product/models/purchase_order_line.py
Normal 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
|
||||
Reference in New Issue
Block a user