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.

20 lines
778 B

  1. # Copyright 2019 Open Source Integrators
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import models, fields
  4. class ResPartner(models.Model):
  5. _name = "res.partner"
  6. _inherit = ['res.partner', 'tier.validation']
  7. _state_from = ['new', 'to approve']
  8. _state_to = ['approved']
  9. # override core odoo to set default value to False
  10. customer = fields.Boolean(string='Is a Customer', default=False,
  11. help="Check this box if this contact is a customer. It can be selected in sales orders.")
  12. state = fields.Selection(selection=[('new','New'),
  13. ('approved','Approved'),],
  14. string='Status',
  15. default='new' )