diff --git a/addons/stock/models/stock_incoterms.py b/addons/stock/models/stock_incoterms.py index 2fb6f229e64..0d8a1258fbf 100644 --- a/addons/stock/models/stock_incoterms.py +++ b/addons/stock/models/stock_incoterms.py @@ -1,34 +1,19 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from datetime import datetime -from dateutil import relativedelta -import json -import time - -from openerp.osv import fields, osv -from openerp.tools.float_utils import float_compare, float_round -from openerp.tools.translate import _ -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT -from openerp import SUPERUSER_ID, api, models -import openerp.addons.decimal_precision as dp -from openerp.addons.procurement import procurement -import logging -from openerp.exceptions import UserError +from odoo import fields, models -_logger = logging.getLogger(__name__) -#---------------------------------------------------------- -# Incoterms -#---------------------------------------------------------- -class stock_incoterms(osv.osv): +class Incoterms(models.Model): _name = "stock.incoterms" _description = "Incoterms" - _columns = { - 'name': fields.char('Name', required=True, help="Incoterms are series of sales terms. They are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices."), - 'code': fields.char('Code', size=3, required=True, help="Incoterm Standard Code"), - 'active': fields.boolean('Active', help="By unchecking the active field, you may hide an INCOTERM you will not use."), - } - _defaults = { - 'active': True, - } + + name = fields.Char( + 'Name', required=True, + help="Incoterms are series of sales terms. They are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices.") + code = fields.Char( + 'Code', size=3, required=True, + help="Incoterm Standard Code") + active = fields.Boolean( + 'Active', default=True, + help="By unchecking the active field, you may hide an INCOTERM you will not use.")