mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[WIP] project_acceptance: changes by functionality of buttons
H11043
This commit is contained in:
@@ -3,15 +3,70 @@
|
||||
|
||||
<template id="portal_my_task_inherit" inherit_id="project.portal_my_task">
|
||||
<xpath expr="//div[@class='mt32']" position="before">
|
||||
|
||||
<!-- modal relative to the actions accept -->
|
||||
<!-- <div role="dialog" class="modal fade" id="modalaccept">
|
||||
<div class="modal-dialog">
|
||||
<form id="accept" method="POST" t-att-data-order-id="task.id" t-att-data-token="task.access_token" class="js_accept_json modal-content js_website_submit_form">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<header class="modal-header">
|
||||
<h4 class="modal-title">Validate Task</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</header>
|
||||
<main class="modal-body" id="sign-dialog">
|
||||
<p>
|
||||
<span>By signing this proposal, I agree to the task description:</span>
|
||||
<ul>
|
||||
<li><span>Accepted on the behalf of:</span> <b t-field="task.partner_id.commercial_partner_id"/></li>
|
||||
</ul>
|
||||
</p>
|
||||
<t t-call="portal.signature_form">
|
||||
<t t-set="call_url" t-value="task.get_portal_url(suffix='/accept')"/>
|
||||
<t t-set="default_name" t-value="task.partner_id.name"/>
|
||||
</t>
|
||||
</main>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- modal relative to the action reject -->
|
||||
<!-- <div role="dialog" class="modal fade" id="modaldecline">
|
||||
<div class="modal-dialog">
|
||||
<form id="decline" method="POST" t-attf-action="/my/task/#{task.id}/decline?access_token=#{task.access_token}" class="modal-content">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<header class="modal-header">
|
||||
<h4 class="modal-title">Decline This Task</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</header>
|
||||
<main class="modal-body">
|
||||
<p>
|
||||
Tell us why you are refusing this task, this will help us improve our services.
|
||||
</p>
|
||||
<textarea rows="4" name="decline_message" required="" placeholder="Your feedback..." class="form-control" />
|
||||
</main>
|
||||
<footer class="modal-footer">
|
||||
<button type="submit" t-att-id="task.id" class="btn btn-danger"><i class="fa fa-times"></i> Decline</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
|
||||
</footer>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div t-if="task.stage_id.name == 'cancelled'" class="alert alert-danger alert-dismissable d-print-none" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="close">×</button>
|
||||
<strong>This task has been canceled.</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us to get.</a>
|
||||
</div> -->
|
||||
|
||||
<div class="row justify-content-center text-center d-print-none pt-1 pb-4">
|
||||
<div t-if="not sale_order_exceptions" class="col-sm-auto mt8">
|
||||
<!-- <a role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#"><i class="fa fa-check"/>Accept</a> -->
|
||||
<!-- <a role="button" class="btn btn-primary" t-attf-href="#" style="color: #ffffff"><i class="fa fa-check"/> Accepted</a> -->
|
||||
<a role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#" style="color: #ffffff"><i class="fa fa-check"/> Accepted</a>
|
||||
<a role="button" class="btn btn-primary" t-attf-href="#" style="color: #ffffff"><i class="fa fa-check"/> Accepted</a>
|
||||
<!-- <a role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#" style="color: #ffffff"><i class="fa fa-check"/> Accepted</a> -->
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm-auto mt8">
|
||||
<!-- <a role="button" class="btn btn-danger" data-toggle="modal" data-target="#modaldecline" href="#"> <i class="fa fa-times"/>Decline</a> -->
|
||||
<a role="button" class="btn btn-danger" t-attf-href="#" style="color: #ffffff"> <i class="fa fa-stop-circle"/> Declined</a>
|
||||
<!-- <a role="button" class="btn btn-danger" data-toggle="modal" data-target="#modaldecline" href="#" style="color: #ffffff"> <i class="fa fa-stop-circle"/> Declined</a> -->
|
||||
</div>
|
||||
<div class="col-sm-auto mt8">
|
||||
<!-- <a role="button" class="btn btn-secondary" href="#discussion"><i class="fa fa-comment"/> Feedback</a> -->
|
||||
|
||||
15
project_acceptance/views/project_views.xml
Normal file
15
project_acceptance/views/project_views.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_task_form2_inherit_pad_project" model="ir.ui.view">
|
||||
<field name="name">project.task.form.inherit</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='parent_id']" position="after">
|
||||
<field name="task_acceptance"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user