# -*- coding: utf-8 -*-

from odoo import fields, models


# Create own table in database to store name of Manufacturers
class ProductManufacturer(models.Model):
    _name = 'mrx.product.manufacturer'
    _description = 'List of Manufacturers'
    _order = 'name'

    name = fields.Char(required=True, store=True, copy=True, index=True)

    _sql_constraints = [('unique_name', 'unique(name)', 'Manufacturer already exists!')]


# Add Manufacturer field to the product template table
class ProductTemplate(models.Model):
    _inherit = 'product.template'

    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer', string='Manufacturer', index=True)

602fa7088d7e1f6ba4b03e5b332996383b311b4c
<mask token>


class ProductTemplate(models.Model):
    _inherit = 'product.template'
    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer',
        string='Manufacturer', index=True)

<mask token>


class ProductManufacturer(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class ProductTemplate(models.Model):
    _inherit = 'product.template'
    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer',
        string='Manufacturer', index=True)

<mask token>


class ProductManufacturer(models.Model):
    _name = 'mrx.product.manufacturer'
    _description = 'List of Manufacturers'
    _order = 'name'
    name = fields.Char(required=True, store=True, copy=True, index=True)
    _sql_constraints = [('unique_name', 'unique(name)',
        'Manufacturer already exists!')]


class ProductTemplate(models.Model):
    _inherit = 'product.template'
    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer',
        string='Manufacturer', index=True)

from odoo import fields, models


class ProductManufacturer(models.Model):
    _name = 'mrx.product.manufacturer'
    _description = 'List of Manufacturers'
    _order = 'name'
    name = fields.Char(required=True, store=True, copy=True, index=True)
    _sql_constraints = [('unique_name', 'unique(name)',
        'Manufacturer already exists!')]


class ProductTemplate(models.Model):
    _inherit = 'product.template'
    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer',
        string='Manufacturer', index=True)

# -*- coding: utf-8 -*-

from odoo import fields, models


# Create own table in database to store name of Manufacturers
class ProductManufacturer(models.Model):
    _name = 'mrx.product.manufacturer'
    _description = 'List of Manufacturers'
    _order = 'name'

    name = fields.Char(required=True, store=True, copy=True, index=True)

    _sql_constraints = [('unique_name', 'unique(name)', 'Manufacturer already exists!')]


# Add Manufacturer field to the product template table
class ProductTemplate(models.Model):
    _inherit = 'product.template'

    mrx_product_manufacturer = fields.Many2one('mrx.product.manufacturer', string='Manufacturer', index=True)
