mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
20 lines
572 B
Python
20 lines
572 B
Python
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
# Copyright 2021 Tecnativa - Víctor Martínez
|
|
|
|
from odoo import models
|
|
|
|
|
|
class ProductTemplate(models.Model):
|
|
_inherit = "product.template"
|
|
|
|
def action_view_related_putaway_rules(self):
|
|
self.ensure_one()
|
|
domain = [
|
|
"|",
|
|
"|",
|
|
("product_tmpl_id", "=", self.id),
|
|
("category_id", "=", self.categ_id.id),
|
|
("product_id.product_tmpl_id", "=", self.id),
|
|
]
|
|
return self._get_action_view_related_putaway_rules(domain)
|