mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-18 02:39:10 +02:00
work on mks
This commit is contained in:
66
mks_delivery/models/project_task.py
Normal file
66
mks_delivery/models/project_task.py
Normal file
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
#
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from odoo import models, fields, api,_
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
class project_task(models.Model):
|
||||
_inherit='project.task'
|
||||
|
||||
|
||||
state = fields.Selection([
|
||||
('unassigned', 'Unassigned'),
|
||||
('assigned','Assigned'),('accepted','Accepted'),
|
||||
('started','Started'),('delivered','Delivered'),
|
||||
('cancel','Cancel'),('issue','Issue'),
|
||||
('paid','Paid'),('non_paid','Non Paid'),
|
||||
], string='Status', readonly=True, copy=False, default='unassigned')
|
||||
|
||||
zone_id = fields.Many2one('zone.zone',string="Zone")
|
||||
|
||||
def action_assign(self):
|
||||
self.state = 'assigned'
|
||||
return True
|
||||
|
||||
def action_accept(self):
|
||||
self.state = 'accepted'
|
||||
return True
|
||||
|
||||
def action_start(self):
|
||||
self.state = 'started'
|
||||
return True
|
||||
|
||||
def action_delivery(self):
|
||||
self.state = 'delivered'
|
||||
return True
|
||||
|
||||
def action_cancel(self):
|
||||
self.state = 'cancel'
|
||||
return True
|
||||
|
||||
def action_issue(self):
|
||||
self.state = 'issue'
|
||||
return True
|
||||
|
||||
def action_paid(self):
|
||||
self.state = 'paid'
|
||||
return True
|
||||
|
||||
def action_non_paid(self):
|
||||
self.state = 'non_paid'
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
Reference in New Issue
Block a user