[IMP] pre-commit: first run on whole repo
This commit is contained in:
@@ -3,26 +3,29 @@
|
||||
# @author Raphaël Valyi <rvalyi@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
_inherit = "product.product"
|
||||
|
||||
default_code = fields.Char(copy=False)
|
||||
# track_visibility='onchange',
|
||||
# track_visibility='onchange',
|
||||
|
||||
# barcode = fields.Char(track_visibility='onchange',
|
||||
# barcode = fields.Char(track_visibility='onchange',
|
||||
|
||||
# weight = fields.Float(track_visibility='onchange')
|
||||
# active = fields.Boolean(track_visibility='onchange')
|
||||
# weight = fields.Float(track_visibility='onchange')
|
||||
# active = fields.Boolean(track_visibility='onchange')
|
||||
|
||||
_sql_constraints = [(
|
||||
# Maybe it could be better to have a constrain per company
|
||||
# but the company_id field is on product.template,
|
||||
# not on product.product
|
||||
# If it's a problem, we'll create a company_id field on
|
||||
# product.product
|
||||
'default_code_uniq',
|
||||
'unique(default_code)',
|
||||
'This internal reference already exists!')]
|
||||
_sql_constraints = [
|
||||
(
|
||||
# Maybe it could be better to have a constrain per company
|
||||
# but the company_id field is on product.template,
|
||||
# not on product.product
|
||||
# If it's a problem, we'll create a company_id field on
|
||||
# product.product
|
||||
"default_code_uniq",
|
||||
"unique(default_code)",
|
||||
"This internal reference already exists!",
|
||||
)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user