add sub-project feater
This commit is contained in:
parent
19970ef7d3
commit
d0291482ab
|
@ -0,0 +1 @@
|
|||
from . import models
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
'name': 'sub_project',
|
||||
'version': '',
|
||||
'summary': 'Sub Project of sub project',
|
||||
'description': 'Sub Project of sub project',
|
||||
'category': '',
|
||||
'author': '',
|
||||
'website': '',
|
||||
'license': '',
|
||||
'depends': ['base', 'project'],
|
||||
'data': ['views/sub_project.xml'],
|
||||
'demo': [''],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
from . import sub_project
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SubProject(models.Model):
|
||||
_inherit = "project.project"
|
||||
_description = "Sub Project"
|
||||
|
||||
is_sub_project = fields.Boolean("Is Sub Project")
|
||||
parent_project = fields.Many2one('project.project', string='Parent Project')
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="edit_project_inherited" 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">
|
||||
<data>
|
||||
<xpath expr="//page[@name='settings']" position="after">
|
||||
<page name="sub_project" string="Sub Project">
|
||||
<group>
|
||||
<field name="is_sub_project"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="parent_project"
|
||||
options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
Loading…
Reference in New Issue