summaryrefslogtreecommitdiff
path: root/addons/pad_project
diff options
context:
space:
mode:
authorArnaud Joset <arj@odoo.com>2020-08-12 14:28:24 +0000
committerArnaud Joset <arj@odoo.com>2020-08-13 13:25:22 +0000
commitf2a1a00081fc1b15b97caa967273b198b1846449 (patch)
treebd4e82524585354a7197bd172fb029688aba328a /addons/pad_project
parentbb9ae7b08b2b062acec13de4a92737a57be880e2 (diff)
[IMP] hr_timesheet,pad_project,project,rating,sale_timesheet: back2basics project
Multiple UI and UX changes taskid: 2299401
Diffstat (limited to 'addons/pad_project')
-rw-r--r--addons/pad_project/models/project.py5
-rw-r--r--addons/pad_project/views/project_views.xml8
2 files changed, 12 insertions, 1 deletions
diff --git a/addons/pad_project/models/project.py b/addons/pad_project/models/project.py
index 919755b9987..abc0342671a 100644
--- a/addons/pad_project/models/project.py
+++ b/addons/pad_project/models/project.py
@@ -42,8 +42,11 @@ class ProjectTask(models.Model):
class ProjectProject(models.Model):
- _inherit = "project.project"
+ _name = "project.project"
+ _inherit = ["project.project", 'pad.common']
+ _description = 'Project'
+ description_pad = fields.Char('Pad URL', pad_content_field='description', copy=False)
use_pads = fields.Boolean("Use collaborative pads", default=True,
help="Use collaborative pad for the tasks on this project.")
diff --git a/addons/pad_project/views/project_views.xml b/addons/pad_project/views/project_views.xml
index d4dee168f2a..3539d850e5c 100644
--- a/addons/pad_project/views/project_views.xml
+++ b/addons/pad_project/views/project_views.xml
@@ -20,6 +20,14 @@
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
+ <xpath expr="//field[@name='description']" position="attributes">
+ <attribute name="attrs">{'invisible': [('use_pads', '=', True)], 'readonly': [('use_pads', '=', True)]}</attribute>
+ </xpath>
+ <field name="description" position="after">
+ <field name="use_pads" invisible="1"/>
+ <field name="description_pad" widget="pad" nolabel="1"
+ attrs="{'invisible': [('use_pads', '=', False)], 'readonly': [('use_pads', '=', False)]}"/>
+ </field>
<xpath expr="//div[@id='rating_settings']" position="after">
<div class="col-lg-6 o_setting_box" id="pad_settings">
<div class="o_setting_left_pane">