123456789101112131415161718 |
- # -*- coding: utf-8 -*-
- from odoo import api, models, fields, Command
- class PageProductMapping(models.Model):
- _name = 'product_page_access.page_product_mapping'
- _description = 'Page Product Mapping'
- # for each page there is one list of products that grant access to it
- page = fields.Many2one('website.page', ondelete = 'cascade', string='Page')
-
- # the product directly associated with the page
- link_out_product = fields.Many2one('product.product', string='Product')
- # products that grant access to the page
- products = fields.Many2many('product.product', string='Alternative Products')
|