[WIP] project_acceptance: new changes by functionality of buttons

H11043
This commit is contained in:
Leo Pinedo
2022-10-01 01:47:10 +00:00
parent 3d60d0d17e
commit 81858d49f1
7 changed files with 74 additions and 43 deletions

View File

@@ -0,0 +1,16 @@
from odoo import http
from odoo.http import request
from odoo.addons.portal.controllers import mail
class PortalChatter(mail.PortalChatter):
@http.route()
def portal_chatter_post(self, res_model, res_id, message, attachment_ids='', attachment_tokens='', **kwargs):
if request.httprequest.method == 'POST':
task = request.env['project.task'].browse([res_id])
task.task_acceptance = 'feedback'
return super(PortalChatter, self).portal_chatter_post(res_model, res_id, message, attachment_ids=attachment_ids, attachment_tokens=attachment_tokens, **kwargs)