ruc_documentos_timbrados.py 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # OpenERP, Open Source Management Solution
  5. # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. from openerp import models, fields, tools, api, _
  22. class ruc_documentos_timbrados(models.Model):
  23. _name = 'ruc.documentos.timbrados'
  24. _description = 'Agrega datos sobre timbrado'
  25. name = fields.Char('Número de timbrado')
  26. nombre_documento = fields.Char('Descripción del documento')
  27. tipo_documento = fields.Selection([('1','Factura'),('2','Factura electrónica de exportación'),('3','Factura electrónica de importación')],'Tipo documento')
  28. timbrado_electronico = fields.Selection([('1','Factura electrónica'),('2','Factura electrónica de exportación'),('3','Factura electrónica de importación'),('4','Autofactura electrónica'),('5','Nota de crédito electrónica'),('6','Nota de débito electrónica'),('7','Nota de remisión electrónica'),('8','Comprobante de retención electrónico')],'Tipo de documento electrónico')
  29. actividad_economica = fields.Char('Actividad económica')
  30. codigo_actividad = fields.Char('Código de actividad económica')
  31. fecha_inicio = fields.Date(string='Fecha inicio de validez')
  32. fecha_final = fields.Date(string='Fecha de expiración de timbrado')
  33. activo = fields.Boolean(string='Activo' ,default = True)
  34. suc = fields.Char('Suc')
  35. sec = fields.Char('Sec')
  36. nro_ini = fields.Integer('Nº inicial')
  37. nro_fin = fields.Integer('Nº final')
  38. ultimo_nro_utilizado = fields.Integer('Nro actual')
  39. id = fields.Integer('ID')
  40. company_id = fields.Many2one('res.company', string='Compañia')
  41. company_name = fields.Char(string='Compañia', related='company_id.name', readonly=True)
  42. invoice_ids = fields.One2many('account.invoice', 'partner_id', string='Facturas',
  43. readonly=True, copy=False)
  44. user_ids = fields.Many2many('res.users', string='Usuarios')