models.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. ##############################################
  4. #
  5. # Difusión Visual
  6. # Copyright (C) Difusión Visual
  7. # all rights reserved
  8. # http://difusionvisual.com
  9. # contacto@difusionvisual.com
  10. #
  11. # WARNING: This program as such is intended to be used by professional
  12. # programmers who take the whole responsability of assessing all potential
  13. # consequences resulting from its eventual inadequacies and bugs.
  14. # End users who are looking for a ready-to-use solution with commercial
  15. # garantees and support are strongly adviced to contract a Free Software
  16. # Service Company.
  17. #
  18. # This program is Free Software; you can redistribute it and/or
  19. # modify it under the terms of the GNU Affero General Public License
  20. # as published by the Free Software Foundation; either version 3
  21. # of the License, or (at your option) any later version.
  22. #
  23. # This program is distributed in the hope that it will be useful,
  24. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. # GNU Affero General Public License for more details.
  27. #
  28. # You should have received a copy of the GNU Affero General Public License
  29. # along with this program; if not, see <http://www.gnu.org/licenses/> or
  30. # write to the Free Software Foundation, Inc.,
  31. # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  32. #
  33. ###############################################
  34. from openerp import api, fields, models, _
  35. class TicRemoteSupportService(models.Model):
  36. _name = 'tic.remote.support.service'
  37. name = fields.Char(string="Name", required=True )
  38. remote_type = fields.Selection(string="Remote Type", selection=[
  39. ('teamviewer', 'TeamViewer'),
  40. ('weezo', 'Weezo'),
  41. ('ammyy', 'AMMYY'),
  42. ('vnc', 'VNC'),
  43. ('chrome', 'Chrome'),
  44. ('remotedesktop', 'Remote Desktop'),
  45. ('ssh', 'SSH'),
  46. ('web', 'Web'),
  47. ('other', 'Other')], required=False, )
  48. pc_type = fields.Selection(string="Device Type", selection=[
  49. ('workstation', 'WorkStation'),
  50. ('server', 'Server'),
  51. ('backup', 'Backup'),
  52. ('print', 'Print'),
  53. ('camera', 'Camera'),
  54. ('swich', 'Swich'),
  55. ('router', 'Router'),
  56. ('other', 'Other')], required=False, )
  57. remote_id = fields.Char(string="ID", required=False, )
  58. remote_serial = fields.Char(string="Serial", required=False, )
  59. remote_ip = fields.Char(string="IP", required=False, )
  60. remote_port = fields.Integer(string="Port", required=False, )
  61. remote_username = fields.Char(string="Username", required=False, )
  62. remote_password = fields.Char(string="Password", required=False, )
  63. remote_notes = fields.Text(string="Notes", required=False, )
  64. class TicRemoteSupport(models.Model):
  65. _inherit = 'res.partner'
  66. supportbool = fields.Boolean(string="Remote Support?")
  67. remotes_ids = fields.Many2many(comodel_name="tic.remote.support.service", string="Remote Support", store=True)