27 lines
926 B
Python
27 lines
926 B
Python
# Copyright 2014 Ignacio Ibeas <ignacio@acysos.com>
|
|
# Copyright 2020 Santi Noreña <santi@criptomart.net>
|
|
# 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")
|