2021-01-30 13:52:10 +01:00
|
|
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
|
|
# this repository contains the full copyright notices and license terms.
|
|
|
|
from trytond.model import fields, ModelSQL
|
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
|
|
|
|
|
|
|
|
class Product(metaclass=PoolMeta):
|
|
|
|
__name__ = 'product.product'
|
2021-02-01 23:32:00 +01:00
|
|
|
products_mix = fields.Many2Many('product.product-mix.option',
|
2021-01-30 13:52:10 +01:00
|
|
|
'product', 'option', 'Mix')
|
2023-06-16 00:26:17 +02:00
|
|
|
tasks = fields.One2Many('production.configuration_task', 'product', 'Tasks')
|
2021-01-30 13:52:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ProductMixOption(ModelSQL):
|
|
|
|
'Product Mix Option'
|
|
|
|
__name__ = 'product.product-mix.option'
|
|
|
|
product = fields.Many2One('product.product', 'Product',
|
|
|
|
ondelete='CASCADE', required=True, select=True)
|
|
|
|
option = fields.Many2One('product.product', 'Product',
|
|
|
|
ondelete='CASCADE', required=True, select=True)
|