Files
flectra/addons/pos_epson_printer/models/pos_config.py
T

15 lines
498 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models
class PosConfig(models.Model):
_inherit = 'pos.config'
epson_printer_ip = fields.Char(string='Epson Printer IP', help="Local IP address of an Epson receipt printer.")
@api.onchange('epson_printer_ip')
def _onchange_epson_printer_ip(self):
if self.epson_printer_ip in (False, ''):
self.iface_cashdrawer = False