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.

27 lines
844 B

  1. # Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com>
  2. # Copyright 2015 Jairo Llopis <jairo.llopis@tecnativa.com>
  3. # Copyright 2018 Tecnativa - Pedro M. Baeza
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from odoo import models, fields
  6. class ResPartner(models.Model):
  7. _inherit = 'res.partner'
  8. employee_quantity = fields.Integer()
  9. employee_quantity_range_id = fields.Many2one(
  10. comodel_name="res.partner.employee_quantity_range",
  11. string="Employee quantity range",
  12. help="Range of this partner depending on the employee quantity.",
  13. )
  14. class ResPartnerEmployeeQuantityRange(models.Model):
  15. _name = "res.partner.employee_quantity_range"
  16. _description = "Partner employee quantity range"
  17. name = fields.Char(
  18. required=True,
  19. translate=True
  20. )