mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[ADD] agreement 11.0.0.1.0
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
'website': 'https://github.com/OCA/contract',
|
'website': 'https://github.com/OCA/contract',
|
||||||
'category': 'Partner',
|
'category': 'Partner',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'version': '11.0.0.0.1',
|
'version': '11.0.0.1.0',
|
||||||
'depends': [
|
'depends': [
|
||||||
'account',
|
'account',
|
||||||
'contacts',
|
'contacts',
|
||||||
@@ -27,8 +27,11 @@
|
|||||||
'report/agreement.xml',
|
'report/agreement.xml',
|
||||||
'views/res_config_settings.xml',
|
'views/res_config_settings.xml',
|
||||||
'views/agreement.xml',
|
'views/agreement.xml',
|
||||||
|
'views/agreement_appendix.xml',
|
||||||
'views/agreement_clause.xml',
|
'views/agreement_clause.xml',
|
||||||
|
'views/agreement_recital.xml',
|
||||||
'views/agreement_section.xml',
|
'views/agreement_section.xml',
|
||||||
|
'views/agreement_serviceprofile.xml',
|
||||||
'views/agreement_stages.xml',
|
'views/agreement_stages.xml',
|
||||||
'views/agreement_type.xml',
|
'views/agreement_type.xml',
|
||||||
'views/agreement_subtype.xml',
|
'views/agreement_subtype.xml',
|
||||||
|
|||||||
@@ -4,8 +4,11 @@ from . import (
|
|||||||
res_config_settings,
|
res_config_settings,
|
||||||
account,
|
account,
|
||||||
agreement,
|
agreement,
|
||||||
|
agreement_appendix,
|
||||||
agreement_clause,
|
agreement_clause,
|
||||||
|
agreement_recital,
|
||||||
agreement_section,
|
agreement_section,
|
||||||
|
agreement_serviceprofile,
|
||||||
agreement_stage,
|
agreement_stage,
|
||||||
agreement_type,
|
agreement_type,
|
||||||
agreement_subtype,
|
agreement_subtype,
|
||||||
|
|||||||
@@ -265,18 +265,18 @@ class Agreement(models.Model):
|
|||||||
string="Service Order Lines",
|
string="Service Order Lines",
|
||||||
copy=False
|
copy=False
|
||||||
)
|
)
|
||||||
sections_ids = fields.One2many(
|
recital_ids = fields.One2many('agreement.recital', 'agreement_id',
|
||||||
'agreement.section',
|
string="Recitals", copy=True)
|
||||||
|
sections_ids = fields.One2many('agreement.section', 'agreement_id',
|
||||||
|
string="Sections", copy=True)
|
||||||
|
clauses_ids = fields.One2many('agreement.clause', 'agreement_id',
|
||||||
|
string="Clauses", copy=True)
|
||||||
|
appendix_ids = fields.One2many('agreement.appendix', 'agreement_id',
|
||||||
|
string="Appendices", copy=True)
|
||||||
|
serviceprofile_ids = fields.One2many('agreement.serviceprofile',
|
||||||
'agreement_id',
|
'agreement_id',
|
||||||
string="Sections",
|
string="Service Profiles",
|
||||||
copy=True
|
readonly=True)
|
||||||
)
|
|
||||||
clauses_ids = fields.One2many(
|
|
||||||
'agreement.clause',
|
|
||||||
'agreement_id',
|
|
||||||
string="Clauses",
|
|
||||||
copy=True
|
|
||||||
)
|
|
||||||
analytic_id = fields.Many2one('account.analytic.account',
|
analytic_id = fields.Many2one('account.analytic.account',
|
||||||
string='Analytic Account', index=True)
|
string='Analytic Account', index=True)
|
||||||
analytic_line_ids = fields.One2many('account.analytic.line',
|
analytic_line_ids = fields.One2many('account.analytic.line',
|
||||||
|
|||||||
24
agreement/models/agreement_appendix.py
Normal file
24
agreement/models/agreement_appendix.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AgreementAppendix(models.Model):
|
||||||
|
_name = 'agreement.appendix'
|
||||||
|
_description = 'Agreement Appendices'
|
||||||
|
_order = "sequence"
|
||||||
|
|
||||||
|
name = fields.Char(string="Name", required=True)
|
||||||
|
title = fields.Char(string="Title", required=True,
|
||||||
|
help="The title is displayed on the PDF."
|
||||||
|
"The name is not.")
|
||||||
|
sequence = fields.Integer(string="Sequence", default=10)
|
||||||
|
content = fields.Html(string="Content")
|
||||||
|
agreement_id = fields.Many2one('agreement', string="Agreement",
|
||||||
|
ondelete="cascade")
|
||||||
|
active = fields.Boolean(
|
||||||
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide this appendix without "
|
||||||
|
"removing it.")
|
||||||
@@ -1,22 +1,19 @@
|
|||||||
# Copyright (C) 2018 - TODAY, Pavlov Media
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
# Main Agreement clause Records Model
|
|
||||||
class AgreementClause(models.Model):
|
class AgreementClause(models.Model):
|
||||||
_name = 'agreement.clause'
|
_name = 'agreement.clause'
|
||||||
_order = 'clause_sequence'
|
_description = 'Agreement Clauses'
|
||||||
|
_order = 'sequence'
|
||||||
|
|
||||||
# General
|
name = fields.Char(string="Name", required=True)
|
||||||
name = fields.Char(
|
title = fields.Char(string="Title",
|
||||||
string="Title",
|
help="The title is displayed on the PDF."
|
||||||
required=True
|
"The name is not.")
|
||||||
)
|
sequence = fields.Integer(string="Sequence")
|
||||||
clause_sequence = fields.Integer(
|
|
||||||
string="Sequence"
|
|
||||||
)
|
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one(
|
||||||
'agreement',
|
'agreement',
|
||||||
string="Agreement",
|
string="Agreement",
|
||||||
@@ -27,54 +24,10 @@ class AgreementClause(models.Model):
|
|||||||
string="Section",
|
string="Section",
|
||||||
ondelete="cascade"
|
ondelete="cascade"
|
||||||
)
|
)
|
||||||
content = fields.Html(
|
content = fields.Html(string="Clause Content")
|
||||||
string="Clause Content"
|
|
||||||
)
|
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide the agreement without "
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
"removing it."
|
"removing it."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Placeholder fields
|
|
||||||
model_id = fields.Many2one(
|
|
||||||
'ir.model',
|
|
||||||
string="Applies to",
|
|
||||||
help="The type of document this template can be used with."
|
|
||||||
)
|
|
||||||
model_object_field_id = fields.Many2one(
|
|
||||||
'ir.model.fields',
|
|
||||||
string="Field",
|
|
||||||
help="Select target field from the related document model. If it is a "
|
|
||||||
"relationship field you will be able to select a target field at "
|
|
||||||
"the destination of the relationship."
|
|
||||||
)
|
|
||||||
sub_object_id = fields.Many2one(
|
|
||||||
'ir.model',
|
|
||||||
string="Sub-model",
|
|
||||||
help="When a relationship field is selected as first field, this "
|
|
||||||
"field shows the document model the relationship goes to."
|
|
||||||
)
|
|
||||||
sub_model_object_field_id = fields.Many2one(
|
|
||||||
'ir.model.fields',
|
|
||||||
string="Sub-field",
|
|
||||||
help="When a relationship field is selected as first field, this "
|
|
||||||
"field lets you select the target field within the destination "
|
|
||||||
"document model (sub-model)."
|
|
||||||
)
|
|
||||||
null_value = fields.Char(
|
|
||||||
string="Default Value",
|
|
||||||
help="Optional value to use if the target field is empty."
|
|
||||||
)
|
|
||||||
copyvalue = fields.Char(
|
|
||||||
string="Placeholder Expression",
|
|
||||||
help="Final placeholder expression, to be copy-pasted in the desired "
|
|
||||||
"template field."
|
|
||||||
)
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def create(self, vals):
|
|
||||||
seq = self.env['ir.sequence'].next_by_code('agreement.clause') or '/'
|
|
||||||
vals['clause_sequence'] = seq
|
|
||||||
return super(AgreementClause, self).create(vals)
|
|
||||||
|
|||||||
24
agreement/models/agreement_recital.py
Normal file
24
agreement/models/agreement_recital.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AgreementRecital(models.Model):
|
||||||
|
_name = 'agreement.recital'
|
||||||
|
_description = 'Agreement Recitals'
|
||||||
|
_order = "sequence"
|
||||||
|
|
||||||
|
name = fields.Char(string="Name", required=True)
|
||||||
|
title = fields.Char(string="Title",
|
||||||
|
help="The title is displayed on the PDF."
|
||||||
|
"The name is not.")
|
||||||
|
sequence = fields.Integer(string="Sequence", default=10)
|
||||||
|
content = fields.Html(string="Content")
|
||||||
|
agreement_id = fields.Many2one('agreement', string="Agreement",
|
||||||
|
ondelete="cascade")
|
||||||
|
active = fields.Boolean(
|
||||||
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide this recital without "
|
||||||
|
"removing it.")
|
||||||
@@ -1,22 +1,19 @@
|
|||||||
# Copyright (C) 2018 - TODAY, Pavlov Media
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
# Main Agreement Section Records Model
|
|
||||||
class AgreementSection(models.Model):
|
class AgreementSection(models.Model):
|
||||||
_name = 'agreement.section'
|
_name = 'agreement.section'
|
||||||
_order = 'section_sequence'
|
_description = 'Agreement Sections'
|
||||||
|
_order = 'sequence'
|
||||||
|
|
||||||
# General
|
name = fields.Char(string="Name", required=True)
|
||||||
name = fields.Char(
|
title = fields.Char(string="Title",
|
||||||
string="Title",
|
help="The title is displayed on the PDF."
|
||||||
required=True
|
"The name is not.")
|
||||||
)
|
sequence = fields.Integer(string="Sequence")
|
||||||
section_sequence = fields.Integer(
|
|
||||||
string="Sequence"
|
|
||||||
)
|
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one(
|
||||||
'agreement',
|
'agreement',
|
||||||
string="Agreement",
|
string="Agreement",
|
||||||
@@ -27,54 +24,10 @@ class AgreementSection(models.Model):
|
|||||||
'section_id',
|
'section_id',
|
||||||
string="Clauses"
|
string="Clauses"
|
||||||
)
|
)
|
||||||
content = fields.Html(
|
content = fields.Html(string="Section Content")
|
||||||
string="Section Content"
|
|
||||||
)
|
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide the agreement without "
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
"removing it."
|
"removing it."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Placeholder fields
|
|
||||||
model_id = fields.Many2one(
|
|
||||||
'ir.model',
|
|
||||||
string="Applies to",
|
|
||||||
help="The type of document this template can be used with."
|
|
||||||
)
|
|
||||||
model_object_field_id = fields.Many2one(
|
|
||||||
'ir.model.fields',
|
|
||||||
string="Field",
|
|
||||||
help="Select target field from the related document model. If it is a "
|
|
||||||
"relationship field you will be able to select a target field at "
|
|
||||||
"the destination of the relationship."
|
|
||||||
)
|
|
||||||
sub_object_id = fields.Many2one(
|
|
||||||
'ir.model',
|
|
||||||
string="Sub-model",
|
|
||||||
help="When a relationship field is selected as first field, this "
|
|
||||||
"field shows the document model the relationship goes to."
|
|
||||||
)
|
|
||||||
sub_model_object_field_id = fields.Many2one(
|
|
||||||
'ir.model.fields',
|
|
||||||
string="Sub-field",
|
|
||||||
help="When a relationship field is selected as first field, this "
|
|
||||||
"field lets you select the target field within the destination "
|
|
||||||
"document model (sub-model)."
|
|
||||||
)
|
|
||||||
null_value = fields.Char(
|
|
||||||
string="Default Value",
|
|
||||||
help="Optional value to use if the target field is empty."
|
|
||||||
)
|
|
||||||
copyvalue = fields.Char(
|
|
||||||
string="Placeholder Expression",
|
|
||||||
help="Final placeholder expression, to be copy-pasted in the desired "
|
|
||||||
"template field."
|
|
||||||
)
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def create(self, vals):
|
|
||||||
seq = self.env['ir.sequence'].next_by_code('agreement.section') or '/'
|
|
||||||
vals['section_sequence'] = seq
|
|
||||||
return super(AgreementSection, self).create(vals)
|
|
||||||
|
|||||||
18
agreement/models/agreement_serviceprofile.py
Normal file
18
agreement/models/agreement_serviceprofile.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class AgreementServiceProfile(models.Model):
|
||||||
|
_name = 'agreement.serviceprofile'
|
||||||
|
_description = 'Agreement Service Profiles'
|
||||||
|
|
||||||
|
name = fields.Char(string="Name", required=True)
|
||||||
|
agreement_id = fields.Many2one('agreement', string="Agreement",
|
||||||
|
ondelete="cascade")
|
||||||
|
active = fields.Boolean(
|
||||||
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide this service profile"
|
||||||
|
" without removing it.")
|
||||||
@@ -7,6 +7,7 @@ from odoo import models, fields
|
|||||||
# Main Agreement Section Records Model
|
# Main Agreement Section Records Model
|
||||||
class AgreementStage(models.Model):
|
class AgreementStage(models.Model):
|
||||||
_name = 'agreement.stage'
|
_name = 'agreement.stage'
|
||||||
|
_description = 'Agreement Stages'
|
||||||
_order = 'sequence'
|
_order = 'sequence'
|
||||||
|
|
||||||
# General
|
# General
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
# Copyright (C) 2018 - TODAY, Pavlov Media
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
|
|
||||||
from odoo import models, fields
|
|
||||||
|
|
||||||
|
|
||||||
# Main Agreement Status Records Model
|
|
||||||
class AgreementStatus(models.Model):
|
|
||||||
_name = 'agreement.type'
|
|
||||||
|
|
||||||
# General
|
|
||||||
name = fields.Char(
|
|
||||||
string="Title",
|
|
||||||
required=True
|
|
||||||
)
|
|
||||||
@@ -1,19 +1,13 @@
|
|||||||
# Copyright (C) 2018 - TODAY, Pavlov Media
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
# Main Agreement Section Records Model
|
|
||||||
class AgreementSubtype(models.Model):
|
class AgreementSubtype(models.Model):
|
||||||
_name = 'agreement.subtype'
|
_name = 'agreement.subtype'
|
||||||
|
_description = 'Agreement Subtypes'
|
||||||
|
|
||||||
# General
|
name = fields.Char(string="Name", required=True)
|
||||||
name = fields.Char(
|
agreement_type_id = fields.Many2one('agreement.type',
|
||||||
string="Title",
|
string="Agreement Type")
|
||||||
required=True
|
|
||||||
)
|
|
||||||
agreement_type_id = fields.Many2one(
|
|
||||||
'agreement.type',
|
|
||||||
string="Agreement Type"
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,20 +1,14 @@
|
|||||||
# Copyright (C) 2018 - TODAY, Pavlov Media
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
# Main Agreement Section Records Model
|
|
||||||
class AgreementType(models.Model):
|
class AgreementType(models.Model):
|
||||||
_name = 'agreement.type'
|
_name = 'agreement.type'
|
||||||
|
_description = 'Agreement Types'
|
||||||
|
|
||||||
# General
|
name = fields.Char(string="Name", required=True)
|
||||||
name = fields.Char(
|
agreement_subtypes_ids = fields.One2many('agreement.subtype',
|
||||||
string="Title",
|
|
||||||
required=True
|
|
||||||
)
|
|
||||||
agreement_subtypes_ids = fields.One2many(
|
|
||||||
'agreement.subtype',
|
|
||||||
'agreement_type_id',
|
'agreement_type_id',
|
||||||
string="Agreement"
|
string="Subtypes")
|
||||||
)
|
|
||||||
|
|||||||
@@ -7,7 +7,4 @@ from odoo import models, fields
|
|||||||
class Product(models.Model):
|
class Product(models.Model):
|
||||||
_inherit = 'product.template'
|
_inherit = 'product.template'
|
||||||
|
|
||||||
agreements_ids = fields.Many2many(
|
agreements_ids = fields.Many2many('agreement', string="Agreements")
|
||||||
'agreement',
|
|
||||||
string="Agreements"
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ from odoo import models, fields
|
|||||||
|
|
||||||
class Partner(models.Model):
|
class Partner(models.Model):
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
agreement_ids = fields.One2many('agreement', 'partner_id',
|
agreement_ids = fields.One2many('agreement', 'partner_id',
|
||||||
string="Agreements")
|
string="Agreements")
|
||||||
|
|||||||
@@ -45,17 +45,38 @@
|
|||||||
Represented by <span t-field="doc.partner_contact_id.name"/>.
|
Represented by <span t-field="doc.partner_contact_id.name"/>.
|
||||||
</div>
|
</div>
|
||||||
<h2>Agreement</h2>
|
<h2>Agreement</h2>
|
||||||
|
<h3>Recitals</h3>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<ol>
|
||||||
|
<li t-foreach="doc.recital_ids" t-as="r">
|
||||||
|
<t t-if="r.title">
|
||||||
|
<h3 t-field="r.title"/>
|
||||||
|
</t>
|
||||||
|
<p t-field="r.content"/>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tbody class="section_tbody">
|
<tbody class="section_tbody">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ol>
|
<ol>
|
||||||
<li t-foreach="doc.sections_ids" t-as="s">
|
<li t-foreach="doc.sections_ids" t-as="s">
|
||||||
<h3 t-field="s.name"/>
|
<t t-if="s.title">
|
||||||
|
<h3 t-field="s.title"/>
|
||||||
|
</t>
|
||||||
<p t-field="s.content"/>
|
<p t-field="s.content"/>
|
||||||
<ol>
|
<ol>
|
||||||
<li t-foreach="s.clauses_ids" t-as="c">
|
<li t-foreach="s.clauses_ids" t-as="c">
|
||||||
<h4 t-field="c.name"/>
|
<t t-if="c.title">
|
||||||
|
<h4 t-field="c.title"/>
|
||||||
|
</t>
|
||||||
<p t-field="c.content"/>
|
<p t-field="c.content"/>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@@ -65,10 +86,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<t t-if="special_term">
|
||||||
<h2>Special Terms</h2>
|
<h2>Special Terms</h2>
|
||||||
<div name="special_term">
|
<div name="special_term">
|
||||||
<p t-field="doc.special_terms"/>
|
<p t-field="doc.special_terms"/>
|
||||||
</div>
|
</div>
|
||||||
|
</t>
|
||||||
<h2>Signatures</h2>
|
<h2>Signatures</h2>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<theader>
|
<theader>
|
||||||
@@ -105,6 +128,13 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div t-foreach="doc.appendix_ids" t-as="a">
|
||||||
|
<div class="page">
|
||||||
|
<h1 t-field="a.title"
|
||||||
|
style="page-break-before: always;"/>
|
||||||
|
<p t-field="a.content"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
access_agreement_allusers,agreement all users,model_agreement,agreement.group_agreement_user,1,1,1,0
|
access_agreement_allusers,agreement all users,model_agreement,agreement.group_agreement_user,1,1,1,0
|
||||||
access_agreement_manager,agreement manager,model_agreement,agreement.group_agreement_manager,1,1,1,1
|
access_agreement_manager,agreement manager,model_agreement,agreement.group_agreement_manager,1,1,1,1
|
||||||
|
access_agreement_recital_allusers,recital all users,model_agreement_recital,agreement.group_agreement_user,1,1,1,0
|
||||||
|
access_agreement_recital_manager,recital manager,model_agreement_recital,agreement.group_agreement_manager,1,1,1,1
|
||||||
access_agreement_section_allusers,section all users,model_agreement_section,agreement.group_agreement_user,1,1,1,0
|
access_agreement_section_allusers,section all users,model_agreement_section,agreement.group_agreement_user,1,1,1,0
|
||||||
access_agreement_section_manager,section manager,model_agreement_section,agreement.group_agreement_manager,1,1,1,1
|
access_agreement_section_manager,section manager,model_agreement_section,agreement.group_agreement_manager,1,1,1,1
|
||||||
access_agreement_clause_allusers,clause all users,model_agreement_clause,agreement.group_agreement_user,1,1,1,0
|
access_agreement_clause_allusers,clause all users,model_agreement_clause,agreement.group_agreement_user,1,1,1,0
|
||||||
access_agreement_clause_manager,clause manager,model_agreement_clause,agreement.group_agreement_manager,1,1,1,1
|
access_agreement_clause_manager,clause manager,model_agreement_clause,agreement.group_agreement_manager,1,1,1,1
|
||||||
|
access_agreement_appendix_allusers,appendix all users,model_agreement_appendix,agreement.group_agreement_user,1,1,1,0
|
||||||
|
access_agreement_appendix_manager,appendix manager,model_agreement_appendix,agreement.group_agreement_manager,1,1,1,1
|
||||||
|
access_agreement_servprof_allusers,service profile all users,model_agreement_serviceprofile,agreement.group_agreement_user,1,1,1,0
|
||||||
|
access_agreement_servprof_manager,service profile manager,model_agreement_serviceprofile,agreement.group_agreement_manager,1,1,1,1
|
||||||
access_agreement_stage_allusers,stage all users,model_agreement_stage,agreement.group_agreement_user,1,0,0,0
|
access_agreement_stage_allusers,stage all users,model_agreement_stage,agreement.group_agreement_user,1,0,0,0
|
||||||
access_agreement_stage_manager,stage manager,model_agreement_stage,agreement.group_agreement_manager,1,1,1,1
|
access_agreement_stage_manager,stage manager,model_agreement_stage,agreement.group_agreement_manager,1,1,1,1
|
||||||
access_agreement_type_allusers,type all users,model_agreement_type,agreement.group_agreement_user,1,0,0,0
|
access_agreement_type_allusers,type all users,model_agreement_type,agreement.group_agreement_user,1,0,0,0
|
||||||
|
|||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<field name="name">Agreement List</field>
|
<field name="name">Agreement List</field>
|
||||||
<field name="model">agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree string="Agreements" default_order='name'>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="company_partner_id"/>
|
<field name="company_partner_id"/>
|
||||||
@@ -120,27 +120,26 @@
|
|||||||
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
|
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
|
||||||
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
|
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
|
||||||
</div>
|
</div>
|
||||||
<group string="Sections" default_order='section_sequence'>
|
<separator string="Recitals"/>
|
||||||
|
<field name="recital_ids"
|
||||||
|
default_order="sequence"
|
||||||
|
nolabel="1"
|
||||||
|
context="{'default_agreement': active_id}"/>
|
||||||
|
<separator string="Sections"/>
|
||||||
<field name="sections_ids"
|
<field name="sections_ids"
|
||||||
|
default_order='sequence'
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}">
|
context="{'default_agreement': active_id}"/>
|
||||||
<tree default_order='section_sequence'>
|
<separator string="Clauses"/>
|
||||||
<field name="section_sequence" widget="handle"/>
|
|
||||||
<field name="name"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<group string="Clauses" default_order='section_id, clause_sequence'>
|
|
||||||
<field name="clauses_ids"
|
<field name="clauses_ids"
|
||||||
|
default_order='clause_id, sequence'
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}">
|
context="{'default_agreement': active_id}"/>
|
||||||
<tree default_order='section_id, clause_sequence'>
|
<separator string="Appendices"/>
|
||||||
<field name="clause_sequence" widget="handle"/>
|
<field name="appendix_ids"
|
||||||
<field name="section_id"/>
|
default_order='sequence'
|
||||||
<field name="name"/>
|
nolabel="1"
|
||||||
</tree>
|
context="{'default_agreement': active_id}"/>
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
</page>
|
</page>
|
||||||
<page name="signature" string="Signatures">
|
<page name="signature" string="Signatures">
|
||||||
<group>
|
<group>
|
||||||
@@ -161,6 +160,9 @@
|
|||||||
<field name="product_ids" nolabel="1"/>
|
<field name="product_ids" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
<page name="serviceprofiles" string="Service Profiles">
|
||||||
|
<field name="serviceprofile_ids" nolabel="1"/>
|
||||||
|
</page>
|
||||||
<page name="financials" string="Financials">
|
<page name="financials" string="Financials">
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
@@ -173,19 +175,6 @@
|
|||||||
readonly="1"
|
readonly="1"
|
||||||
nolabel="1"/>
|
nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<!--
|
|
||||||
<group string="Financial Details>
|
|
||||||
<group string="Company">
|
|
||||||
<field name="total_company_mrc"/>
|
|
||||||
<field name="total_company_nrc"/>
|
|
||||||
<field name="currency_id"/>
|
|
||||||
<field name="contract_value" readonly="1"/>
|
|
||||||
</group>
|
|
||||||
<group string="Customer">
|
|
||||||
<field name="total_customer_mrc"/>
|
|
||||||
<field name="total_customer_nrc"/>
|
|
||||||
</group>
|
|
||||||
</group> -->
|
|
||||||
</page>
|
</page>
|
||||||
<page name="child_agreements" string="Child Agreements">
|
<page name="child_agreements" string="Child Agreements">
|
||||||
<field name="child_agreements_ids">
|
<field name="child_agreements_ids">
|
||||||
@@ -205,7 +194,7 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page name="peformance" string="Performance">
|
<page name="performance" string="Performance">
|
||||||
<p>This section is a place where financial records will show the current performance of this agreement.</p>
|
<p>This section is a place where financial records will show the current performance of this agreement.</p>
|
||||||
<p>Perhaps include invoices with total vs costs? </p>
|
<p>Perhaps include invoices with total vs costs? </p>
|
||||||
</page>
|
</page>
|
||||||
|
|||||||
68
agreement/views/agreement_appendix.xml
Normal file
68
agreement/views/agreement_appendix.xml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Agreement Appendix List View-->
|
||||||
|
<record model="ir.ui.view" id="agreement_appendix_tree">
|
||||||
|
<field name="name">Agreement Appendix Tree</field>
|
||||||
|
<field name="model">agreement.appendix</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Appendices" default_order='agreement_id, sequence'>
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Appendix Form View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_appendix_form">
|
||||||
|
<field name="name">Agreement Appendix Form</field>
|
||||||
|
<field name="model">agreement.appendix</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Appendix">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1><field name="name"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="sequence"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<field name="content" widget="html"/>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Appendix Search View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_appendix_search">
|
||||||
|
<field name="name">Agreement Appendix Search</field>
|
||||||
|
<field name="model">agreement.appendix</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Actions opening views on models -->
|
||||||
|
<record model="ir.actions.act_window" id="agreement_appendix_action">
|
||||||
|
<field name="name">Appendices</field>
|
||||||
|
<field name="res_model">agreement.appendix</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1,25 +1,17 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Clauses Sequences-->
|
|
||||||
<record id="seq_agreement_clause" model="ir.sequence">
|
|
||||||
<field name="name">agreement_clause_sequencer</field>
|
|
||||||
<field name="code">agreement.clause</field>
|
|
||||||
<field name="prefix">0</field>
|
|
||||||
<field name="padding">1</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Agreement Clause List View-->
|
<!-- Agreement Clause List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_clause_list_view">
|
<record model="ir.ui.view" id="partner_agreement_clause_list_view">
|
||||||
<field name="name">Agreement Clause List</field>
|
<field name="name">Agreement Clause List</field>
|
||||||
<field name="model">agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='agreement_id, clause_sequence'>
|
<tree string="Clauses" default_order='agreement_id, sequence'>
|
||||||
<field name="clause_sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="agreement_id"/>
|
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
<field name="section_id"/>
|
<field name="section_id"/>
|
||||||
<field name="content" widget="html"/>
|
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
@@ -30,31 +22,28 @@
|
|||||||
<field name="name">Agreement clause Form</field>
|
<field name="name">Agreement clause Form</field>
|
||||||
<field name="model">agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Clause Form">
|
<form string="Clause">
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Clause Name"/>
|
<label for="name" class="oe_edit_only"/>
|
||||||
<h1><field name="name"/></h1>
|
<h1><field name="name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="title"/>
|
||||||
<field name="agreement_id"/>
|
<field name="agreement_id"/>
|
||||||
<field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
|
<field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
|
||||||
<field name="content" widget="html"/>
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
|
||||||
<page string="Dynamic Placeholder Generator">
|
|
||||||
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
|
|
||||||
<group>
|
<group>
|
||||||
<field name="model_id"/>
|
<field name="sequence"/>
|
||||||
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
|
||||||
<field name="sub_object_id" readonly="1"/>
|
|
||||||
<field name="sub_model_object_field_id" domain="[('model_id','=',sub_object_id),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object_id','=',False)],'required':[('sub_object_id','!=',False)]}"/>
|
|
||||||
<field name="null_value"/>
|
|
||||||
<field name="copyvalue"/>
|
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</group>
|
||||||
</notebook>
|
<field name="content" widget="html"/>
|
||||||
Sequence #<field name="clause_sequence"/>
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -72,24 +61,11 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Pivot View -->
|
|
||||||
<record model="ir.ui.view" id="agreement_clause_pivot_view">
|
|
||||||
<field name="name">Agreement Clause Pivot</field>
|
|
||||||
<field name="model">agreement.clause</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<pivot string="Agreement Clause Pivot">
|
|
||||||
<field name="agreement_id" type="row"/>
|
|
||||||
<field name="section_id" type="row"/>
|
|
||||||
<field name="name" type="row"/>
|
|
||||||
</pivot>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_clause">
|
<record model="ir.actions.act_window" id="partner_agreement_action_clause">
|
||||||
<field name="name">Agreement Clauses</field>
|
<field name="name">Clauses</field>
|
||||||
<field name="res_model">agreement.clause</field>
|
<field name="res_model">agreement.clause</field>
|
||||||
<field name="view_mode">tree,pivot,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
68
agreement/views/agreement_recital.xml
Normal file
68
agreement/views/agreement_recital.xml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Agreement Recital List View-->
|
||||||
|
<record model="ir.ui.view" id="agreement_recital_tree">
|
||||||
|
<field name="name">Agreement Recital Tree</field>
|
||||||
|
<field name="model">agreement.recital</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Recitals" default_order='agreement_id, sequence'>
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Recital Form View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_recital_form">
|
||||||
|
<field name="name">Agreement Recital Form</field>
|
||||||
|
<field name="model">agreement.recital</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Recital">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1><field name="name"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="sequence"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<field name="content" widget="html"/>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Recital Search View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_recital_search">
|
||||||
|
<field name="name">Agreement Recital Search</field>
|
||||||
|
<field name="model">agreement.recital</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Actions opening views on models -->
|
||||||
|
<record model="ir.actions.act_window" id="agreement_recital_action">
|
||||||
|
<field name="name">Recitals</field>
|
||||||
|
<field name="res_model">agreement.recital</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1,23 +1,16 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Sections Sequences-->
|
|
||||||
<record id="seq_agreement_section" model="ir.sequence">
|
|
||||||
<field name="name">agreement_section_sequencer</field>
|
|
||||||
<field name="code">agreement.section</field>
|
|
||||||
<field name="prefix">0</field>
|
|
||||||
<field name="padding">1</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Agreement Sections List View-->
|
<!-- Agreement Sections List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_list_view">
|
<record model="ir.ui.view" id="partner_agreement_section_list_view">
|
||||||
<field name="name">Agreement Section List</field>
|
<field name="name">Agreement Section List</field>
|
||||||
<field name="model">agreement.section</field>
|
<field name="model">agreement.section</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='agreement_id, section_sequence'>
|
<tree string="Sections" default_order='agreement_id, sequence'>
|
||||||
<field name="agreement_id" string="Agreement"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="section_sequence" string="Sequence"/>
|
<field name="name"/>
|
||||||
<field name="name" string="Section Name"/>
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
@@ -28,41 +21,42 @@
|
|||||||
<field name="name">Agreement Section Form</field>
|
<field name="name">Agreement Section Form</field>
|
||||||
<field name="model">agreement.section</field>
|
<field name="model">agreement.section</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Section Form">
|
<form string="Section">
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Section Name"/>
|
<label for="name" class="oe_edit_only"/>
|
||||||
<h1><field name="name" string="Section Name"/></h1>
|
<h1><field name="name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement_id" string="Agreement"/>
|
<group>
|
||||||
|
<field name="title"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name='content' string="Content"/>
|
<field name="sequence"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
|
<page string="Content">
|
||||||
|
<field name='content' nolabel="1"/>
|
||||||
|
</page>
|
||||||
<page string="Clauses">
|
<page string="Clauses">
|
||||||
<field name="clauses_ids" string="Clauses" context="{'default_section_id': active_id,'default_agreement_id': agreement_id}">
|
<field name="clauses_ids"
|
||||||
|
nolabel="1"
|
||||||
|
context="{'default_section_id': active_id, 'default_agreement_id': agreement_id}">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="clause_sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="content"/>
|
<field name="title"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page string="Dynamic Placeholder Generator">
|
|
||||||
THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
|
|
||||||
<group>
|
|
||||||
<field name="model_id"/>
|
|
||||||
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
|
||||||
<field name="sub_object_id" readonly="1"/>
|
|
||||||
<field name="sub_model_object_field_id" domain="[('model_id','=',sub_object_id),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object_id','=',False)],'required':[('sub_object_id','!=',False)]}"/>
|
|
||||||
<field name="null_value"/>
|
|
||||||
<field name="copyvalue"/>
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
</notebook>
|
||||||
Sequence #<field name="section_sequence" readonly="1"/>
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
62
agreement/views/agreement_serviceprofile.xml
Normal file
62
agreement/views/agreement_serviceprofile.xml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Agreement Service Profile List View-->
|
||||||
|
<record model="ir.ui.view" id="agreement_serviceprofile_tree">
|
||||||
|
<field name="name">Agreement Service Profile Tree</field>
|
||||||
|
<field name="model">agreement.serviceprofile</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Service Profiles" default_order='agreement_id'>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Service Profile Form View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_serviceprofile_form">
|
||||||
|
<field name="name">Agreement Service Profile Form</field>
|
||||||
|
<field name="model">agreement.serviceprofile</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Service Profile">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1><field name="name"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="agreement_id"/>
|
||||||
|
</group>
|
||||||
|
<group></group>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Agreement Service Profile Search View -->
|
||||||
|
<record model="ir.ui.view" id="agreement_serviceprofile_search">
|
||||||
|
<field name="name">Agreement Service Profile Search</field>
|
||||||
|
<field name="model">agreement.serviceprofile</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Actions opening views on models -->
|
||||||
|
<record model="ir.actions.act_window" id="agreement_serviceprofile_action">
|
||||||
|
<field name="name">Service Profiles</field>
|
||||||
|
<field name="res_model">agreement.serviceprofile</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -20,12 +20,15 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreement Sub-Types">
|
<form string="Agreement Sub-Types">
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1><field name="name"/></h1>
|
||||||
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
<group>
|
||||||
|
<field name="agreement_type_id"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group></group>
|
||||||
<field name="agreement_type_id"
|
|
||||||
required="True"/>
|
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<field name="name">Agreement Type List</field>
|
<field name="name">Agreement Type List</field>
|
||||||
<field name="model">agreement.type</field>
|
<field name="model">agreement.type</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree string="Agreement Types" default_order='name'>
|
||||||
<field name="name" string="Type Name"/>
|
<field name="name" string="Type Name"/>
|
||||||
<field name="agreement_subtypes_ids" string="Sub-Types"/>
|
<field name="agreement_subtypes_ids" string="Sub-Types"/>
|
||||||
</tree>
|
</tree>
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
<field name="name">Agreement Type Form</field>
|
<field name="name">Agreement Type Form</field>
|
||||||
<field name="model">agreement.type</field>
|
<field name="model">agreement.type</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Type Form">
|
<form string="Agreement Type">
|
||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<div class="oe_title">
|
||||||
<field name="name"/>
|
<label for="name" class="oe_edit_only"/>
|
||||||
</group>
|
<h1><field name="name"/></h1>
|
||||||
<group string="Sub-Types">
|
</div>
|
||||||
<field name="agreement_subtypes_ids" nolabel="1"/>
|
<field name="agreement_subtypes_ids"
|
||||||
</group>
|
nolabel="1"/>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_type">
|
<record model="ir.actions.act_window" id="partner_agreement_action_type">
|
||||||
<field name="name">Agreement Type</field>
|
<field name="name">Agreement Types</field>
|
||||||
<field name="res_model">agreement.type</field>
|
<field name="res_model">agreement.type</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -41,22 +41,45 @@
|
|||||||
id="agreement_masterdata"
|
id="agreement_masterdata"
|
||||||
parent="agreement_root"
|
parent="agreement_root"
|
||||||
sequence="30"/>
|
sequence="30"/>
|
||||||
|
<menuitem
|
||||||
|
name="Contents"
|
||||||
|
id="agreement_data_contents"
|
||||||
|
parent="agreement_masterdata"
|
||||||
|
sequence="10"/>
|
||||||
|
<menuitem
|
||||||
|
name="Recitals"
|
||||||
|
id="agreement_recitals"
|
||||||
|
parent="agreement_data_contents"
|
||||||
|
sequence="10"
|
||||||
|
action="agreement_recital_action"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Clauses"
|
name="Clauses"
|
||||||
id="agreement_clauses"
|
id="agreement_clauses"
|
||||||
parent="agreement_masterdata"
|
parent="agreement_data_contents"
|
||||||
sequence="10"
|
sequence="20"
|
||||||
action="partner_agreement_action_clause"/>
|
action="partner_agreement_action_clause"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sections"
|
name="Sections"
|
||||||
id="agreement_sections"
|
id="agreement_sections"
|
||||||
parent="agreement_masterdata"
|
parent="agreement_data_contents"
|
||||||
sequence="20"
|
sequence="30"
|
||||||
action="partner_agreement_action_section"/>
|
action="partner_agreement_action_section"/>
|
||||||
|
<menuitem
|
||||||
|
name="Appendices"
|
||||||
|
id="agreement_appendices"
|
||||||
|
parent="agreement_data_contents"
|
||||||
|
sequence="40"
|
||||||
|
action="agreement_appendix_action"/>
|
||||||
|
<menuitem
|
||||||
|
name="Service Profiles"
|
||||||
|
id="agreement_serviceprofiles"
|
||||||
|
parent="agreement_masterdata"
|
||||||
|
sequence="50"
|
||||||
|
action="agreement_serviceprofile_action"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Products"
|
name="Products"
|
||||||
id="agreement_products"
|
id="agreement_products"
|
||||||
sequence="30"
|
sequence="100"
|
||||||
parent="agreement_masterdata"
|
parent="agreement_masterdata"
|
||||||
action="product.product_template_action"/>
|
action="product.product_template_action"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user