1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/documents_product/models/product_product.py
2024-12-10 09:04:09 +07:00

22 lines
682 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class ProductProduct(models.Model):
_name = 'product.product'
_inherit = ['product.product', 'documents.mixin']
def _get_document_tags(self):
company = self.company_id or self.env.company
return company.product_tags
def _get_document_folder(self):
company = self.company_id or self.env.company
return company.product_folder
def _check_create_documents(self):
company = self.company_id or self.env.company
return company.documents_product_settings and super()._check_create_documents()