mirror of
https://bitbucket.org/presik/trytonpsk-sale_pos_frontend_rest.git
synced 2023-12-14 06:12:59 +01:00
22 lines
771 B
Python
22 lines
771 B
Python
|
# 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
|
||
|
|
||
|
__all__ = ['Product', 'ProductMixOption']
|
||
|
|
||
|
|
||
|
class Product(metaclass=PoolMeta):
|
||
|
__name__ = 'product.product'
|
||
|
product_mix = fields.Many2Many('product.product-mix.option',
|
||
|
'product', 'option', 'Mix')
|
||
|
|
||
|
|
||
|
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)
|