12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- # -*- coding: utf-8 -*-
- ##############################################################################
- #
- # OpenERP, Open Source Management Solution
- # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License as
- # published by the Free Software Foundation, either version 3 of the
- # License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- #
- ##############################################################################
- from openerp import models, fields, tools, api, _
- class Talonario(models.Model):
- _name = 'talonario'
- _description = 'Talonario'
- name = fields.Char(string='Número de timbrado')
- nombre_documento = fields.Char(string='Descripción del documento')
- tipo_documento = fields.Selection([
- ('1', 'Factura'),
- ('2', 'Factura electrónica de exportación'),
- ('3', 'Factura electrónica de importación')
- ], 'Tipo documento')
- 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')
- actividad_economica = fields.Char(string='Actividad económica')
- codigo_actividad = fields.Char(string='Código de actividad económica')
- fecha_inicio = fields.Date(string='Fecha inicio de validez')
- fecha_final = fields.Date(string='Fecha de expiración de timbrado')
- activo = fields.Boolean(string='Activo', default=True)
- suc = fields.Char(string='Suc')
- sec = fields.Char(string='Sec')
- nro_ini = fields.Integer(string='Nº inicial')
- nro_fin = fields.Integer(string='Nº final')
- ultimo_nro_utilizado = fields.Integer(string='Nro actual')
- company_id = fields.Many2one('res.company', 'Compañia')
- company_name = fields.Char(string='Compañia', related='company_id.name', readonly=True)
- invoice_ids = fields.One2many('account.invoice', 'talonario_id', 'Facturas', readonly=True, copy=False)
- user_ids = fields.Many2many('res.users', 'talonario_res_users_rel', 'talonario_id', 'user_id', 'Usuarios')
|