mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] scrap_reason_code: define product categories allowed for each code
Also redefine reason code form view a bit.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Copyright (C) 2019 IBM Corp.
|
||||
# Copyright (C) 2019 Open Source Integrators
|
||||
# Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
@@ -16,3 +17,10 @@ class ScrapReasonCode(models.Model):
|
||||
string="Scrap Location",
|
||||
domain="[('scrap_location', '=', True)]",
|
||||
)
|
||||
product_category_ids = fields.Many2many(
|
||||
string="Allowed Product Categories",
|
||||
comodel_name="product.category",
|
||||
help="Indicate the cateogories of products that can use this reason code "
|
||||
"when doing a scrap. If left empy, this reason code can be used "
|
||||
"with any product.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user