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.

23 lines
705 B

  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'})