# Copyright 2014 Ignacio Ibeas # Copyright 2020 Santi NoreƱa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, _ class balance_model(models.Model): _name = "balance.model" _description = "Balance Model" name = fields.Char(string="Name", required=True, readonly=True) code = fields.Char(string="Code", required=True, readonly=True) class sale_balance(models.Model): _name = "sale.balance" _description = "Sale Balance" name = fields.Char("Name") shop_id = fields.Many2one(comodel_name="balance.sale.shop", string="Shop") network = fields.Boolean("Network Connection", required=False) model_id = fields.Many2one( comodel_name="balance.model", string="Balance Model", required=False ) ip = fields.Char("IP", required=False, readonly=False) port = fields.Integer("Port")