Debian Codegraph @

addons/pos_glory_cash/models/pos_payment_method.py

raw
1 from odoo import fields, models
2
3
4 class PosPaymentMethod(models.Model):
5 _inherit = 'pos.payment.method'
6
7 glory_websocket_address = fields.Char('Cash Machine IP')
8 glory_username = fields.Char('Cash Machine Username')
9 glory_password = fields.Char('Cash Machine Password')
10
11 def _get_payment_method_type(self):
12 return super()._get_payment_method_type() + [('glory_cash', 'Cash Machine (Glory)')]
13
14 def _load_pos_data_fields(self, config_id):
15 return super()._load_pos_data_fields(config_id) + ['glory_websocket_address', 'glory_username', 'glory_password']