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.

42 lines
1.2 KiB

  1. # Copyright 2018 Eficent Business and IT Consulting Services S.L.
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import api, fields, models
  4. class TierValidationTester(models.Model):
  5. _name = 'tier.validation.tester'
  6. _inherit = ['tier.validation']
  7. state = fields.Selection(
  8. selection=[('draft', 'Draft'),
  9. ('confirmed', 'Confirmed'),
  10. ('cancel', 'Cancel')],
  11. default='draft',
  12. )
  13. test_field = fields.Float()
  14. user_id = fields.Many2one(string="Assigned to:",
  15. comodel_name="res.users")
  16. @api.multi
  17. def action_confirm(self):
  18. self.write({'state': 'confirmed'})
  19. class TierValidationTester2(models.Model):
  20. _name = 'tier.validation.tester2'
  21. _inherit = ['tier.validation']
  22. state = fields.Selection(
  23. selection=[('draft', 'Draft'),
  24. ('confirmed', 'Confirmed'),
  25. ('cancel', 'Cancel')],
  26. default='draft',
  27. )
  28. test_field = fields.Float()
  29. user_id = fields.Many2one(string="Assigned to:",
  30. comodel_name="res.users")
  31. @api.multi
  32. def action_confirm(self):
  33. self.write({'state': 'confirmed'})