You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.2 KiB

  1. # -*- coding: utf-8 -*-
  2. # Python source code encoding : https://www.python.org/dev/peps/pep-0263/
  3. ##############################################################################
  4. #
  5. # OpenERP, Open Source Management Solution
  6. # Copyright (C) 2004-2010 Tiny SPRL
  7. # http://tiny.be
  8. # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH
  9. # http://www.camptocamp.at
  10. # Copyright (C) 2015 Antiun Ingenieria, SL (Madrid, Spain)
  11. # http://www.antiun.com
  12. # Antonio Espinosa <antonioea@antiun.com>
  13. #
  14. # This program is free software: you can redistribute it and/or modify
  15. # it under the terms of the GNU Affero General Public License as
  16. # published by the Free Software Foundation, either version 3 of the
  17. # License, or (at your option) any later version.
  18. #
  19. # This program is distributed in the hope that it will be useful,
  20. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. # GNU Affero General Public License for more details.
  23. #
  24. # You should have received a copy of the GNU Affero General Public License
  25. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. #
  27. ##############################################################################
  28. from openerp import models, fields
  29. class ResPartnerIdNumber(models.Model):
  30. _name = "res.partner.id_number"
  31. _order = "name"
  32. name = fields.Char(string="ID Number", required=True)
  33. category_id = fields.Many2one(string="Category", required=True,
  34. comodel_name='res.partner.id_category')
  35. partner_id = fields.Many2one(string="Partner", required=True,
  36. comodel_name='res.partner')
  37. partner_issued_id = fields.Many2one(string="Issued by",
  38. comodel_name='res.partner')
  39. date_issued = fields.Date(string="Issued on")
  40. valid_from = fields.Date(string="Valid from")
  41. valid_until = fields.Date(string="Valid until")
  42. comment = fields.Text(string="Notes")
  43. state = fields.Char(string="State", size=16)
  44. active = fields.Boolean(string="Active", default=True)