mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-22 14:12:07 +00:00
43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from flectra import api, fields, models
|
|
|
|
|
|
class TierValidationTester(models.Model):
|
|
_name = 'tier.validation.tester'
|
|
_inherit = ['tier.validation']
|
|
|
|
state = fields.Selection(
|
|
selection=[('draft', 'Draft'),
|
|
('confirmed', 'Confirmed'),
|
|
('cancel', 'Cancel')],
|
|
default='draft',
|
|
)
|
|
test_field = fields.Float()
|
|
user_id = fields.Many2one(string="Assigned to:",
|
|
comodel_name="res.users")
|
|
|
|
@api.multi
|
|
def action_confirm(self):
|
|
self.write({'state': 'confirmed'})
|
|
|
|
|
|
class TierValidationTester2(models.Model):
|
|
_name = 'tier.validation.tester2'
|
|
_inherit = ['tier.validation']
|
|
|
|
state = fields.Selection(
|
|
selection=[('draft', 'Draft'),
|
|
('confirmed', 'Confirmed'),
|
|
('cancel', 'Cancel')],
|
|
default='draft',
|
|
)
|
|
test_field = fields.Float()
|
|
user_id = fields.Many2one(string="Assigned to:",
|
|
comodel_name="res.users")
|
|
|
|
@api.multi
|
|
def action_confirm(self):
|
|
self.write({'state': 'confirmed'})
|