# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import api, fields, models, _
from odoo.exceptions import UserError


class ProductProduct(models.Model):
    _inherit = "product.product"

    barcode = fields.Char('Barcode', copy=False, oldname='ean13', required=True,
        help="International Article Number used for product identification.")

    @api.model
    def create(self, vals):
        if not vals.get('barcode'):
            raise UserError(_("Barcode is required for product."))
        return super(ProductProduct, self).create(vals)

960ad5ce269782516c60e24e78e3aaa03b741582
<mask token>

<mask token>


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

    @api.model
    def create(self, vals):
        if not vals.get('barcode'):
            raise UserError(_('Barcode is required for product.'))
        return super(ProductProduct, self).create(vals)

<mask token>


class ProductProduct(models.Model):
    _inherit = 'product.product'
    barcode = fields.Char('Barcode', copy=False, oldname='ean13', required=
        True, help=
        'International Article Number used for product identification.')

    @api.model
    def create(self, vals):
        if not vals.get('barcode'):
            raise UserError(_('Barcode is required for product.'))
        return super(ProductProduct, self).create(vals)

from odoo import api, fields, models, _
from odoo.exceptions import UserError


class ProductProduct(models.Model):
    _inherit = 'product.product'
    barcode = fields.Char('Barcode', copy=False, oldname='ean13', required=
        True, help=
        'International Article Number used for product identification.')

    @api.model
    def create(self, vals):
        if not vals.get('barcode'):
            raise UserError(_('Barcode is required for product.'))
        return super(ProductProduct, self).create(vals)

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import api, fields, models, _
from odoo.exceptions import UserError


class ProductProduct(models.Model):
    _inherit = "product.product"

    barcode = fields.Char('Barcode', copy=False, oldname='ean13', required=True,
        help="International Article Number used for product identification.")

    @api.model
    def create(self, vals):
        if not vals.get('barcode'):
            raise UserError(_("Barcode is required for product."))
        return super(ProductProduct, self).create(vals)
