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.

50 lines
1.8 KiB

14 years ago
  1. ##############################################
  2. #
  3. # ChriCar Beteiligungs- und Beratungs- GmbH
  4. # Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
  5. # all rights reserved
  6. # created 2008-07-05
  7. #
  8. ###############################################
  9. import time
  10. from osv import fields,osv
  11. import pooler
  12. class res_partner_id_category(osv.osv):
  13. _name = "res.partner.id_category"
  14. _columns = {
  15. 'code' : fields.char ('Code', size=16, required=True),
  16. 'name' : fields.char ('ID Number', size=32, required=True, translate=True),
  17. 'active' : fields.boolean ('Active'),
  18. }
  19. _defaults = {
  20. 'active': lambda *a: True,
  21. }
  22. _order = "name"
  23. res_partner_id_category()
  24. class res_partner_id_number(osv.osv):
  25. _name = "res.partner.id_number"
  26. _columns = {
  27. 'category_id' : fields.many2one('res.partner.id_category','ID-Category', required=True),
  28. 'name' : fields.char ('ID-Number',size=32,required=True),
  29. 'partner_id' : fields.many2one('res.partner','Partner', required=True),
  30. 'partner_issued_id' : fields.many2one('res.partner','Issued by', required=True),
  31. 'date_issued' : fields.date ('Issued'),
  32. 'valid_from' : fields.date ('Valid From'),
  33. 'valid_until' : fields.date ('Valid Until'),
  34. 'comment' : fields.text ('Notes'),
  35. 'active' : fields.boolean ('Active'),
  36. 'state' : fields.char ('State', size=16),
  37. }
  38. _defaults = {
  39. 'active': lambda *a: True,
  40. }
  41. res_partner_id_number()
  42. class res_partner(osv.osv):
  43. _inherit = "res.partner"
  44. _columns = {
  45. 'id_numbers': fields.one2many('res.partner.id_number','partner_id','Identification Numbers'),
  46. }
  47. res_partner()