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:
Cedric Collins
2023-11-16 00:16:33 +00:00
5 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import models

View 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,
}

View File

@@ -0,0 +1 @@
from . import project

View 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')

View 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>