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.

15 lines
555 B

  1. # Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import models, fields
  4. class PartnerPriority(models.Model):
  5. _name = 'partner.priority'
  6. _order = 'sequence'
  7. _description = 'Partner Priority'
  8. name = fields.Char(string="Priority", required=True)
  9. description = fields.Text(required=True)
  10. sequence = fields.Integer(required=True, default=lambda self: self.env[
  11. 'ir.sequence'].next_by_code('res.partner.priority') or 0)