diff --git a/printer.py b/printer.py index 7e6357f..b17429b 100644 --- a/printer.py +++ b/printer.py @@ -9,7 +9,11 @@ class Device(Model): ip_address = fields.Char('IP Address or Network', help='IPv4 or IPv6 IP' 'address or network. Valid values include: 192.168.0.26 or ' '192.168.0.0/24') - + +class Api(Device, ModelSQL, ModelView): + 'Api printer' + __name__ = 'sale.printer_api' + class Printer(Device, ModelSQL, ModelView): 'Printer' __name__ = 'sale.printer' @@ -20,7 +24,4 @@ class Printer(Device, ModelSQL, ModelView): shop = fields.Many2One('sale.shop', "Shop") api = fields.Many2One('sale.printer_api', "API") -class Api(Device, ModelSQL, ModelView): - 'Api printer' - __name__ = 'sale.printer_api' diff --git a/printer.xml b/printer.xml index bb074ee..421183b 100644 --- a/printer.xml +++ b/printer.xml @@ -10,21 +10,7 @@ APIs sale.printer_api - - - - + sale.printer_api form @@ -58,5 +44,20 @@ + + + +