mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'mig/17.0/project_description' into '17.0'
WIP: mig/17.0/project_description into 17.0 See merge request hibou-io/hibou-odoo/suite!1680
This commit is contained in:
1
project_description/__init__.py
Normal file
1
project_description/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
22
project_description/__manifest__.py
Normal file
22
project_description/__manifest__.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
'name': 'Project Description',
|
||||||
|
'version': '17.0.1.0.0',
|
||||||
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
|
'website': 'https://hibou.io/',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'category': 'Tools',
|
||||||
|
'complexity': 'easy',
|
||||||
|
'description': """
|
||||||
|
Adds description onto Projects that will be displayed on tasks.
|
||||||
|
Useful for keeping project specific notes that are needed whenever
|
||||||
|
you're working on a task in that project.
|
||||||
|
""",
|
||||||
|
'depends': [
|
||||||
|
'project',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'views/project_views.xml',
|
||||||
|
],
|
||||||
|
'installable': True,
|
||||||
|
'auto_install': False,
|
||||||
|
}
|
||||||
1
project_description/models/__init__.py
Normal file
1
project_description/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import project
|
||||||
12
project_description/models/project.py
Normal file
12
project_description/models/project.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class Project(models.Model):
|
||||||
|
_inherit = 'project.project'
|
||||||
|
|
||||||
|
note = fields.Html(string='Note')
|
||||||
|
|
||||||
|
class ProjectTask(models.Model):
|
||||||
|
_inherit = 'project.task'
|
||||||
|
|
||||||
|
project_note = fields.Html(related='project_id.note')
|
||||||
30
project_description/views/project_views.xml
Normal file
30
project_description/views/project_views.xml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<record id="edit_project_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">project.project.form.inherit</field>
|
||||||
|
<field name="model">project.project</field>
|
||||||
|
<field name="inherit_id" ref="project.edit_project" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//notebook" position="inside">
|
||||||
|
<page name="note_page" string="Notes">
|
||||||
|
<field name="note" nolabel="1" type="html"/>
|
||||||
|
<div class="oe_clear"/>
|
||||||
|
</page>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<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="//notebook" position="inside">
|
||||||
|
<page name="project_note_page" string="Project Notes">
|
||||||
|
<field name="project_note" nolabel="1" type="html" readonly="1"/>
|
||||||
|
<div class="oe_clear"/>
|
||||||
|
</page>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user