account_invoice.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # -*- encoding: utf-8 -*-
  2. #################################################################################
  3. # #
  4. # #
  5. # This program is free software: you can redistribute it and/or modify #
  6. # it under the terms of the GNU Affero General Public License as #
  7. # published by the Free Software Foundation, either version 3 of the #
  8. # License, or (at your option) any later version. #
  9. # #
  10. # This program is distributed in the hope that it will be useful, #
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of #
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  13. # GNU Affero General Public License for more details. #
  14. # #
  15. # You should have received a copy of the GNU Affero General Public License #
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>. #
  17. # #
  18. #################################################################################
  19. from openerp import models, fields, api
  20. # class account_invoice(models.Model):
  21. # _inherit = 'account.invoice'
  22. # _name = 'account.invoice'
  23. #
  24. # contado = fields.Boolean('Contado')
  25. # credito = fields.Boolean('Crédito')
  26. #
  27. # _defaults = {
  28. # 'contado': True
  29. # }
  30. #
  31. # @api.one
  32. # @api.onchange('credito')
  33. # def cambiar_estado_credito(self):
  34. # self.contado = not self.credito
  35. #
  36. # @api.one
  37. # @api.onchange('contado')
  38. # def cambiar_estado_contado(self):
  39. # self.credito = not self.contado