[IMP] pre-commit: first run on whole repo
This commit is contained in:
@@ -6,6 +6,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ProductPricelist(models.Model):
|
||||
_inherit = 'product.pricelist'
|
||||
_inherit = "product.pricelist"
|
||||
|
||||
company_id = fields.Many2one(default=lambda self: self.env.company)
|
||||
|
||||
@@ -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!",
|
||||
)
|
||||
]
|
||||
|
||||
@@ -7,6 +7,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ProductSupplierinfo(models.Model):
|
||||
_inherit = 'product.supplierinfo'
|
||||
_inherit = "product.supplierinfo"
|
||||
|
||||
name = fields.Many2one(domain=[('parent_id', '=', False)])
|
||||
name = fields.Many2one(domain=[("parent_id", "=", False)])
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
# @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 ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
_inherit = "product.template"
|
||||
|
||||
# restore v8 native field
|
||||
# https://github.com/odoo/odoo/blob/8.0/addons/product/product.py#L592
|
||||
# in v10, that field was defined in procurement_suggest, but we will
|
||||
# probably not port procurement_suggest because it is native in v14
|
||||
seller_id = fields.Many2one(
|
||||
'res.partner', related='seller_ids.name', store=True,
|
||||
string='Main Supplier')
|
||||
"res.partner", related="seller_ids.name", store=True, string="Main Supplier"
|
||||
)
|
||||
|
||||
# in v14, I noticed that the tracking of the fields of product.template
|
||||
# are only shown in the form view of product.template, not in the form
|
||||
|
||||
Reference in New Issue
Block a user