work on project

This commit is contained in:
sonal arora
2020-09-28 10:41:47 +05:30
parent 89b21b8126
commit aceb4750eb
7 changed files with 7 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ class project_task(models.Model):
('unassigned', 'Unassigned'), ('unassigned', 'Unassigned'),
('assigned','Assigned'),('accepted','Accepted'), ('assigned','Assigned'),('accepted','Accepted'),
('started','Started'),('delivered','Delivered'), ('started','Started'),('delivered','Delivered'),
('collected','Collected'),
('cancel','Cancel'),('issue','Issue'), ('cancel','Cancel'),('issue','Issue'),
('paid','Paid'),('non_paid','Non Paid'), ('paid','Paid'),('non_paid','Non Paid'),
], string='Status', readonly=True, copy=False, default='unassigned') ], string='Status', readonly=True, copy=False, default='unassigned')
@@ -38,6 +39,10 @@ class project_task(models.Model):
def action_delivery(self): def action_delivery(self):
self.state = 'delivered' self.state = 'delivered'
return True return True
def action_collect(self):
self.state = 'collected'
return True
def action_cancel(self): def action_cancel(self):
self.state = 'cancel' self.state = 'cancel'

View File

@@ -11,6 +11,7 @@
<button name="action_accept" type="object" string="Accept" states="assigned" class="oe_highlight" /> <button name="action_accept" type="object" string="Accept" states="assigned" class="oe_highlight" />
<button name="action_start" type="object" string="Start" states="accepted,issue" class="oe_highlight" /> <button name="action_start" type="object" string="Start" states="accepted,issue" class="oe_highlight" />
<button name="action_delivery" type="object" string="Delivered" states="started" class="oe_highlight" /> <button name="action_delivery" type="object" string="Delivered" states="started" class="oe_highlight" />
<button name="action_collect" type="object" string="Collected" states="started" class="oe_highlight" />
<button name="action_cancel" type="object" string="Cancel" states="started,issue" class="oe_highlight" /> <button name="action_cancel" type="object" string="Cancel" states="started,issue" class="oe_highlight" />
<button name="action_issue" type="object" string="Issue" states="started" class="oe_highlight" /> <button name="action_issue" type="object" string="Issue" states="started" class="oe_highlight" />

View File

@@ -24,7 +24,7 @@
'depends': ['sale_management','industry_fsm','project'], 'depends': ['sale_management','industry_fsm','project'],
'data': [ 'data': [
'views/res_config_views.xml', 'views/res_config_views.xml',
'views/sale_view.xml', # 'views/sale_view.xml',
], ],
'demo': [], 'demo': [],
'test': [], 'test': [],