mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MIG website_project_task For Odoo 13.0
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
'name': 'Website Project Tasks',
|
'name': 'Website Project Tasks',
|
||||||
'version': '12.0.1.0.0',
|
'version': '13.0.1.0.0',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'website': 'https://hibou.io/',
|
'website': 'https://hibou.io/',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
@@ -17,7 +17,7 @@ This module adds options to Website Project:
|
|||||||
'project',
|
'project',
|
||||||
],
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'project_task_templates.xml',
|
'views/project_task_templates.xml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
'auto_install': False,
|
||||||
|
|||||||
1
website_project_task/models/__init__.py
Normal file
1
website_project_task/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import project
|
||||||
14
website_project_task/models/project.py
Normal file
14
website_project_task/models/project.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
from odoo import api, exceptions, fields, models, _
|
||||||
|
from werkzeug.urls import url_encode
|
||||||
|
|
||||||
|
class ProjectTask(models.Model):
|
||||||
|
_name = 'project.task'
|
||||||
|
_inherit = ['project.task', 'portal.mixin']
|
||||||
|
|
||||||
|
def preview_task(self):
|
||||||
|
self.ensure_one()
|
||||||
|
return {
|
||||||
|
'type': 'ir.actions.act_url',
|
||||||
|
'target': 'self',
|
||||||
|
'url': self.get_portal_url(),
|
||||||
|
}
|
||||||
@@ -1,5 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
<record id="view_task_form2_inherit" 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="//div[@name='button_box']" position="inside">
|
||||||
|
<button name="preview_task" type="object" class="oe_stat_button" icon="fa-globe icon">
|
||||||
|
<div class="o_field_widget o_stat_info">
|
||||||
|
<span class="o_stat_text">Task</span>
|
||||||
|
<span class="o_stat_text">Preview</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<template id="my_tasks" inherit_id='project.portal_my_tasks' name="Stage Colors etc.">
|
<template id="my_tasks" inherit_id='project.portal_my_tasks' name="Stage Colors etc.">
|
||||||
<xpath expr="//td/span[hasclass('badge-info')]" position="attributes">
|
<xpath expr="//td/span[hasclass('badge-info')]" position="attributes">
|
||||||
@@ -9,10 +25,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<template id="task_tag_grid" inherit_id='project.portal_my_tasks' customize_show="True" name="Task Tags on table">
|
<template id="task_tag_grid" inherit_id='project.portal_my_tasks' customize_show="True" name="Task Tags on table">
|
||||||
<xpath expr="//thead/tr/th[1]" position="attributes">
|
<xpath expr="//t/t/t/t/thead/tr/th[1]" position="attributes">
|
||||||
<attribute name="class">col-md-8</attribute>
|
<attribute name="class">col-md-8</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//thead/tr/th[2]" position="after">
|
<xpath expr="//t/t/t/t/thead/tr/th[2]" position="after">
|
||||||
<th>Tags</th>
|
<th>Tags</th>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- Strange number of columns -->
|
<!-- Strange number of columns -->
|
||||||
Reference in New Issue
Block a user