mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[ENH] OCA Standards
This commit is contained in:
@@ -24,6 +24,7 @@ Images
|
|||||||
Contributors
|
Contributors
|
||||||
|
|
||||||
* Patrick Wilson <pwilson@pavlovmedia.com>
|
* Patrick Wilson <pwilson@pavlovmedia.com>
|
||||||
|
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import controllers
|
|
||||||
from . import models
|
from . import models
|
||||||
|
|||||||
@@ -1,31 +1,30 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': "Agreements",
|
"name": "Agreements",
|
||||||
'summary': "Manage Agreements, LOI and Contracts",
|
"summary": "Manage Agreements, LOI and Contracts",
|
||||||
'author': "Pavlov Media",
|
"author": "Pavlov Media, Odoo Community Association (OCA)",
|
||||||
'website': "https://github.com/OCA/contract",
|
"website": "https://github.com/OCA/contract",
|
||||||
'category': 'Partner',
|
"category": "Partner",
|
||||||
'version': '11.0.0.0.1',
|
"license": "AGPL-3",
|
||||||
'depends': [
|
"version": "11.0.0.0.1",
|
||||||
'mail',
|
"depends": [
|
||||||
'sale_management'
|
"mail",
|
||||||
|
"sale_management"
|
||||||
],
|
],
|
||||||
'data': [
|
"data": [
|
||||||
'views/reports.xml',
|
"views/reports.xml",
|
||||||
'views/agreement.xml',
|
"views/agreement.xml",
|
||||||
'views/agreement_clause.xml',
|
"views/agreement_clause.xml",
|
||||||
'views/agreement_section.xml',
|
"views/agreement_section.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",
|
||||||
'views/agreement_renewaltype.xml',
|
"views/agreement_renewaltype.xml",
|
||||||
'views/agreement_increasetype.xml',
|
"views/agreement_increasetype.xml",
|
||||||
'views/res_partner.xml',
|
"views/res_partner.xml",
|
||||||
'security/security.xml',
|
"security/ir.model.access.csv",
|
||||||
'security/ir.model.access.csv',
|
|
||||||
],
|
],
|
||||||
'demo': [
|
"application": True,
|
||||||
'demo/demo.xml',
|
|
||||||
],
|
|
||||||
'application': True,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import controllers
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from odoo import http
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<odoo>
|
|
||||||
<data>
|
|
||||||
<!-- -->
|
|
||||||
<!-- <record id="object0" model="pavlov__bwchange.pavlov__bwchange"> -->
|
|
||||||
<!-- <field name="name">Object 0</field> -->
|
|
||||||
<!-- <field name="value">0</field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <record id="object1" model="pavlov__bwchange.pavlov__bwchange"> -->
|
|
||||||
<!-- <field name="name">Object 1</field> -->
|
|
||||||
<!-- <field name="value">10</field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <record id="object2" model="pavlov__bwchange.pavlov__bwchange"> -->
|
|
||||||
<!-- <field name="name">Object 2</field> -->
|
|
||||||
<!-- <field name="value">20</field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <record id="object3" model="pavlov__bwchange.pavlov__bwchange"> -->
|
|
||||||
<!-- <field name="name">Object 3</field> -->
|
|
||||||
<!-- <field name="value">30</field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <record id="object4" model="pavlov__bwchange.pavlov__bwchange"> -->
|
|
||||||
<!-- <field name="name">Object 4</field> -->
|
|
||||||
<!-- <field name="value">40</field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
<!-- -->
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import partner_agreement
|
from . import partner_agreement
|
||||||
from . import agreement_clause
|
from . import agreement_clause
|
||||||
from . import agreement_section
|
from . import agreement_section
|
||||||
|
|||||||
@@ -1,28 +1,80 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
#Main Agreement clause Records Model
|
|
||||||
|
# Main Agreement clause Records Model
|
||||||
class AgreementClause(models.Model):
|
class AgreementClause(models.Model):
|
||||||
_name = 'partner_agreement.clause'
|
_name = 'agreement.clause'
|
||||||
_order = 'clause_sequence'
|
_order = 'clause_sequence'
|
||||||
|
|
||||||
#General
|
# General
|
||||||
name = fields.Char(string="Title", required=True)
|
name = fields.Char(
|
||||||
clause_sequence = fields.Integer(string="Sequence")
|
string="Title",
|
||||||
agreement = fields.Many2one('partner_agreement.agreement', string="Agreement", ondelete="cascade")
|
required=True
|
||||||
section = fields.Many2one('partner_agreement.section', string="Section", ondelete="cascade")
|
)
|
||||||
content = fields.Html(string="Clause Content")
|
clause_sequence = fields.Integer(
|
||||||
active = fields.Boolean(string="Active", default=True, help="If unchecked, it will allow you to hide the agreement without removing it.")
|
string="Sequence"
|
||||||
|
)
|
||||||
|
agreement_id = fields.Many2one(
|
||||||
|
'agreement',
|
||||||
|
string="Agreement",
|
||||||
|
ondelete="cascade"
|
||||||
|
)
|
||||||
|
section_id = fields.Many2one(
|
||||||
|
'agreement.section',
|
||||||
|
string="Section",
|
||||||
|
ondelete="cascade"
|
||||||
|
)
|
||||||
|
content = fields.Html(
|
||||||
|
string="Clause Content"
|
||||||
|
)
|
||||||
|
active = fields.Boolean(
|
||||||
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
|
"removing it."
|
||||||
|
)
|
||||||
|
|
||||||
#Placeholder fields
|
# Placeholder fields
|
||||||
model_id = fields.Many2one('ir.model', string="Applies to", help="The type of document this template can be used with.")
|
model_id = fields.Many2one(
|
||||||
model_object_field = 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.")
|
'ir.model',
|
||||||
sub_object = 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.")
|
string="Applies to",
|
||||||
sub_model_object_field = 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).")
|
help="The type of document this template can be used with."
|
||||||
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.")
|
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
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
seq = self.env['ir.sequence'].next_by_code('agreement.clause') or '/'
|
seq = self.env['ir.sequence'].next_by_code('agreement.clause') or '/'
|
||||||
vals['clause_sequence'] = seq
|
vals['clause_sequence'] = seq
|
||||||
return super(AgreementClause, self).create(vals)
|
return super(AgreementClause, self).create(vals)
|
||||||
|
|||||||
@@ -1,10 +1,26 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Increase Type Records Model
|
|
||||||
class AgreementIncreaseType(models.Model):
|
|
||||||
_name = 'partner_agreement.increasetype'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Increase Type Records Model
|
||||||
name = fields.Char(string="Title", required=True, help="Increase types describe any increases that may happen during the contract.")
|
class AgreementIncreaseType(models.Model):
|
||||||
description = fields.Text(string="Description", required=True, help="Description of the renewal type.")
|
_name = 'agreement.increasetype'
|
||||||
increase_percent = fields.Integer(string="Increase Percentage", help="Percentage that the amount will increase.")
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Title",
|
||||||
|
required=True,
|
||||||
|
help="Increase types describe any increases that may happen during "
|
||||||
|
"the contract."
|
||||||
|
)
|
||||||
|
description = fields.Text(
|
||||||
|
string="Description",
|
||||||
|
required=True,
|
||||||
|
help="Description of the renewal type."
|
||||||
|
)
|
||||||
|
increase_percent = fields.Integer(
|
||||||
|
string="Increase Percentage",
|
||||||
|
help="Percentage that the amount will increase."
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,9 +1,22 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Section Records Model
|
|
||||||
class AgreementRenewalType(models.Model):
|
|
||||||
_name = 'partner_agreement.renewaltype'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Section Records Model
|
||||||
name = fields.Char(string="Title", required=True, help="Renewal types describe what happens after the agreement/contract expires.")
|
class AgreementRenewalType(models.Model):
|
||||||
description = fields.Text(string="Description", required=True, help="Description of the renewal type.")
|
_name = 'agreement.renewaltype'
|
||||||
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Title",
|
||||||
|
required=True,
|
||||||
|
help="Renewal types describe what happens after the "
|
||||||
|
"agreement/contract expires."
|
||||||
|
)
|
||||||
|
description = fields.Text(
|
||||||
|
string="Description",
|
||||||
|
required=True,
|
||||||
|
help="Description of the renewal type."
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,27 +1,80 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
#Main Agreement Section Records Model
|
|
||||||
|
# Main Agreement Section Records Model
|
||||||
class AgreementSection(models.Model):
|
class AgreementSection(models.Model):
|
||||||
_name = 'partner_agreement.section'
|
_name = 'agreement.section'
|
||||||
_order = 'section_sequence'
|
_order = 'section_sequence'
|
||||||
|
|
||||||
#General
|
# General
|
||||||
name = fields.Char(string="Title", required=True)
|
name = fields.Char(
|
||||||
section_sequence = fields.Integer(string="Sequence")
|
string="Title",
|
||||||
agreement = fields.Many2one('partner_agreement.agreement', string="Agreement", ondelete="cascade")
|
required=True
|
||||||
clauses = fields.One2many('partner_agreement.clause', 'section', string="Clauses")
|
)
|
||||||
content = fields.Html(string="Section Content")
|
section_sequence = fields.Integer(
|
||||||
active = fields.Boolean(string="Active", default=True, help="If unchecked, it will allow you to hide the agreement without removing it.")
|
string="Sequence"
|
||||||
#Placeholder fields
|
)
|
||||||
model_id = fields.Many2one('ir.model', string="Applies to", help="The type of document this template can be used with.")
|
agreement_id = fields.Many2one(
|
||||||
model_object_field = 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.")
|
'agreement',
|
||||||
sub_object = 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.")
|
string="Agreement",
|
||||||
sub_model_object_field = 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).")
|
ondelete="cascade"
|
||||||
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.")
|
clauses_ids = fields.One2many(
|
||||||
|
'agreement.clause',
|
||||||
|
'section_id',
|
||||||
|
string="Clauses"
|
||||||
|
)
|
||||||
|
content = fields.Html(
|
||||||
|
string="Section Content"
|
||||||
|
)
|
||||||
|
active = fields.Boolean(
|
||||||
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
|
"removing it."
|
||||||
|
)
|
||||||
|
|
||||||
@api.model
|
# Placeholder fields
|
||||||
def create(self, vals):
|
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 '/'
|
seq = self.env['ir.sequence'].next_by_code('agreement.section') or '/'
|
||||||
vals['section_sequence'] = seq
|
vals['section_sequence'] = seq
|
||||||
return super(AgreementSection, self).create(vals)
|
return super(AgreementSection, self).create(vals)
|
||||||
|
|||||||
@@ -1,12 +1,30 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Section Records Model
|
|
||||||
class AgreementStage(models.Model):
|
|
||||||
_name = 'partner_agreement.stage'
|
|
||||||
_order = 'sequence'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Section Records Model
|
||||||
name = fields.Char(string="Stage Name", required=True)
|
class AgreementStage(models.Model):
|
||||||
description = fields.Text(string="Description", required=False)
|
_name = 'agreement.stage'
|
||||||
sequence = fields.Integer(string="Sequence", default="1", required=False)
|
_order = 'sequence'
|
||||||
fold = fields.Boolean(string="Is Folded", required=False, help="This stage is folded in the kanban view by deafault.")
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Stage Name",
|
||||||
|
required=True
|
||||||
|
)
|
||||||
|
description = fields.Text(
|
||||||
|
string="Description",
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
sequence = fields.Integer(
|
||||||
|
string="Sequence",
|
||||||
|
default="1",
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
fold = fields.Boolean(
|
||||||
|
string="Is Folded",
|
||||||
|
required=False,
|
||||||
|
help="This stage is folded in the kanban view by deafault."
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Status Records Model
|
|
||||||
class AgreementStatus(models.Model):
|
|
||||||
_name = 'partner_agreement.type'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Status Records Model
|
||||||
name = fields.Char(string="Title", required=True)
|
class AgreementStatus(models.Model):
|
||||||
|
_name = 'agreement.type'
|
||||||
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Title",
|
||||||
|
required=True
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,9 +1,19 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Section Records Model
|
|
||||||
class AgreementSubtype(models.Model):
|
|
||||||
_name = 'partner_agreement.subtype'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Section Records Model
|
||||||
name = fields.Char(string="Title", required=True)
|
class AgreementSubtype(models.Model):
|
||||||
agreement_type = fields.Many2one('partner_agreement.type', string="Agreement Type")
|
_name = 'agreement.subtype'
|
||||||
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Title",
|
||||||
|
required=True
|
||||||
|
)
|
||||||
|
agreement_type_id = fields.Many2one(
|
||||||
|
'agreement.type',
|
||||||
|
string="Agreement Type"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
#Main Agreement Section Records Model
|
|
||||||
class AgreementType(models.Model):
|
|
||||||
_name = 'partner_agreement.type'
|
|
||||||
|
|
||||||
#General
|
# Main Agreement Section Records Model
|
||||||
name = fields.Char(string="Title", required=True)
|
class AgreementType(models.Model):
|
||||||
agreement_subtypes = fields.One2many('partner_agreement.subtype', 'agreement_type', string="Agreement")
|
_name = 'agreement.type'
|
||||||
|
|
||||||
|
# General
|
||||||
|
name = fields.Char(
|
||||||
|
string="Title",
|
||||||
|
required=True
|
||||||
|
)
|
||||||
|
agreement_subtypes_ids = fields.One2many(
|
||||||
|
'agreement.subtype',
|
||||||
|
'agreement_type_id',
|
||||||
|
string="Agreement"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,123 +1,435 @@
|
|||||||
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
#Main Agreement Records Model
|
|
||||||
|
# Main Agreement Records Model
|
||||||
class Agreement(models.Model):
|
class Agreement(models.Model):
|
||||||
_name = 'partner_agreement.agreement'
|
_name = 'agreement'
|
||||||
_inherit = ['mail.thread']
|
_inherit = ['mail.thread']
|
||||||
|
|
||||||
#General
|
# General
|
||||||
name = fields.Char(string="Title", required=True)
|
name = fields.Char(
|
||||||
is_template = fields.Boolean(string="Is a Template?", default=False, copy=False, help="Make this agreement a template.")
|
string="Title",
|
||||||
version = fields.Integer(string="Version", default=1, help="The versions are used to keep track of document history and previous versions can be referenced.", copy=False)
|
required=True
|
||||||
revision = fields.Integer(string="Revision", default=0, help="The revision will increase with every save event.", copy=False)
|
)
|
||||||
description = fields.Text(string="Description", help="Description of the agreement", track_visibility='onchange')
|
is_template = fields.Boolean(
|
||||||
start_date = fields.Date(string="Start Date", help="When the agreement starts.", track_visibility='onchange')
|
string="Is a Template?",
|
||||||
end_date = fields.Date(string="End Date", help="When the agreement ends.", track_visibility='onchange')
|
default=False,
|
||||||
color = fields.Integer()
|
copy=False,
|
||||||
active = fields.Boolean(string="Active", default=True, help="If unchecked, it will allow you to hide the agreement without removing it.")
|
help="Make this agreement a template."
|
||||||
company_signed_date = fields.Date(string="Company Signed Date", help="Date the contract was signed by Company.", track_visibility='onchange')
|
)
|
||||||
customer_signed_date = fields.Date(string="Customer Signed Date", help="Date the contract was signed by Customer.", track_visibility='onchange')
|
version = fields.Integer(
|
||||||
customer_term = fields.Integer(string="Customer Term (Months)", help="Number of months this agreement/contract is in effect with customer.", track_visibility='onchange')
|
string="Version",
|
||||||
vendor_term = fields.Integer(string="Vendor Term (Months)", help="Number of months this agreement/contract is in effect with vendor.", track_visibility='onchange')
|
default=1,
|
||||||
expiration_notice = fields.Integer(string="Exp. Notice (Days)", help="Number of Days before expiration to be notified.", track_visibility='onchange')
|
copy=False,
|
||||||
change_notice = fields.Integer(string="Change Notice (Days)", help="Number of Days to be notified before changes.", track_visibility='onchange')
|
help="The versions are used to keep track of document history and "
|
||||||
special_terms = fields.Text(string="Special Terms", help="Any terms that you have agreed to and want to track on the agreement/contract.", track_visibility='onchange')
|
"previous versions can be referenced."
|
||||||
contract_value = fields.Monetary(compute='_compute_contract_value', string="Contract Value", help="Total value of the contract over ther entire term.", store=True)
|
)
|
||||||
contract_id = fields.Char(string="ID", help="ID used for internal contract tracking.", track_visibility='onchange')
|
revision = fields.Integer(
|
||||||
total_company_mrc = fields.Monetary('Company MRC', currency_field='currency_id', help="Total company monthly recurring costs.")#, compute='_compute_company_mrc')
|
string="Revision",
|
||||||
total_customer_mrc = fields.Monetary('Customer MRC', currency_field='currency_id', help="Total custemer monthly recurring costs.")
|
default=0,
|
||||||
total_company_nrc = fields.Monetary('Company NRC', currency_field='currency_id', help="Total company non-recurring costs.")
|
copy=False,
|
||||||
total_customer_nrc = fields.Monetary('Customer NRC', currency_field='currency_id', help="Total custemer non-monthly recurring costs.")
|
help="The revision will increase with every save event."
|
||||||
increase_type = fields.Many2one('partner_agreement.increasetype', string="Increase Type", help="The amount that certain rates may increase.", track_visibility='onchange')
|
)
|
||||||
termination_requested = fields.Date(string="Termination Requested Date", help="Date that a request for termination was received.", track_visibility='onchange')
|
description = fields.Text(
|
||||||
termination_date = fields.Date(string="Termination Date", help="Date that the contract was terminated.", track_visibility='onchange')
|
string="Description",
|
||||||
customer_address = fields.Char(related='customer.contact_address', string="Address")
|
track_visibility='onchange',
|
||||||
customer_street = fields.Char(related='customer.street', string="Street")
|
help="Description of the agreement"
|
||||||
customer_street2 = fields.Char(related='customer.street2', string="Street 2")
|
)
|
||||||
customer_city = fields.Char(related='customer.city', string="City")
|
start_date = fields.Date(
|
||||||
customer_state = fields.Many2one(related='customer.state_id', string="State")
|
string="Start Date",
|
||||||
customer_zip = fields.Char(related='customer.zip', string="Zip")
|
track_visibility='onchange',
|
||||||
vendor_address = fields.Char(related='vendor.contact_address', string="Address")
|
help="When the agreement starts."
|
||||||
vendor_street = fields.Char(related='vendor.street', string="Street")
|
)
|
||||||
vendor_street2 = fields.Char(related='vendor.street2', string="Street 2")
|
end_date = fields.Date(
|
||||||
vendor_city = fields.Char(related='vendor.city', string="City")
|
string="End Date",
|
||||||
vendor_state = fields.Many2one(related='vendor.state_id', string="State")
|
track_visibility='onchange',
|
||||||
vendor_zip = fields.Char(related='vendor.zip', string="Zip")
|
help="When the agreement ends."
|
||||||
reviewed_date = fields.Date(string="Reviewed Date", track_visibility='onchange')
|
)
|
||||||
reviewed_by = fields.Many2one('res.users', string="Reviewed By", track_visibility='onchange')
|
color = fields.Integer()
|
||||||
approved_date = fields.Date(string="Approved Date", track_visibility='onchange')
|
active = fields.Boolean(
|
||||||
approved_by = fields.Many2one('res.users', string="Approved By", track_visibility='onchange')
|
string="Active",
|
||||||
|
default=True,
|
||||||
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
|
"removing it."
|
||||||
|
)
|
||||||
|
company_signed_date = fields.Date(
|
||||||
|
string="Company Signed Date",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Date the contract was signed by Company."
|
||||||
|
)
|
||||||
|
customer_signed_date = fields.Date(
|
||||||
|
string="Customer Signed Date",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Date the contract was signed by Customer."
|
||||||
|
)
|
||||||
|
customer_term = fields.Integer(
|
||||||
|
string="Customer Term (Months)",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Number of months this agreement/contract is in effect with "
|
||||||
|
"customer."
|
||||||
|
)
|
||||||
|
vendor_term = fields.Integer(
|
||||||
|
string="Vendor Term (Months)",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Number of months this agreement/contract is in effect with "
|
||||||
|
"vendor."
|
||||||
|
)
|
||||||
|
expiration_notice = fields.Integer(
|
||||||
|
string="Exp. Notice (Days)",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Number of Days before expiration to be notified."
|
||||||
|
)
|
||||||
|
change_notice = fields.Integer(
|
||||||
|
string="Change Notice (Days)",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Number of Days to be notified before changes."
|
||||||
|
)
|
||||||
|
special_terms = fields.Text(
|
||||||
|
string="Special Terms",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Any terms that you have agreed to and want to track on the "
|
||||||
|
"agreement/contract."
|
||||||
|
)
|
||||||
|
contract_value = fields.Monetary(
|
||||||
|
compute='_compute_contract_value',
|
||||||
|
string="Contract Value",
|
||||||
|
help="Total value of the contract over ther entire term.",
|
||||||
|
store=True
|
||||||
|
)
|
||||||
|
contract_id = fields.Char(
|
||||||
|
string="ID",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="ID used for internal contract tracking.")
|
||||||
|
total_company_mrc = fields.Monetary(
|
||||||
|
'Company MRC',
|
||||||
|
currency_field='currency_id',
|
||||||
|
help="Total company monthly recurring costs."
|
||||||
|
)
|
||||||
|
total_customer_mrc = fields.Monetary(
|
||||||
|
'Customer MRC',
|
||||||
|
currency_field='currency_id',
|
||||||
|
help="Total custemer monthly recurring costs."
|
||||||
|
)
|
||||||
|
total_company_nrc = fields.Monetary(
|
||||||
|
'Company NRC',
|
||||||
|
currency_field='currency_id',
|
||||||
|
help="Total company non-recurring costs."
|
||||||
|
)
|
||||||
|
total_customer_nrc = fields.Monetary(
|
||||||
|
'Customer NRC',
|
||||||
|
currency_field='currency_id',
|
||||||
|
help="Total custemer non-monthly recurring costs."
|
||||||
|
)
|
||||||
|
increase_type_id = fields.Many2one(
|
||||||
|
'agreement.increasetype',
|
||||||
|
string="Increase Type",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="The amount that certain rates may increase."
|
||||||
|
)
|
||||||
|
termination_requested = fields.Date(
|
||||||
|
string="Termination Requested Date",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Date that a request for termination was received."
|
||||||
|
)
|
||||||
|
termination_date = fields.Date(
|
||||||
|
string="Termination Date",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Date that the contract was terminated."
|
||||||
|
)
|
||||||
|
customer_address = fields.Char(
|
||||||
|
related='customer_id.contact_address',
|
||||||
|
string="Address"
|
||||||
|
)
|
||||||
|
customer_street = fields.Char(
|
||||||
|
related='customer_id.street',
|
||||||
|
string="Street"
|
||||||
|
)
|
||||||
|
customer_street2 = fields.Char(
|
||||||
|
related='customer_id.street2',
|
||||||
|
string="Street 2"
|
||||||
|
)
|
||||||
|
customer_city = fields.Char(
|
||||||
|
related='customer_id.city',
|
||||||
|
string="City"
|
||||||
|
)
|
||||||
|
customer_state_id = fields.Many2one(
|
||||||
|
related='customer_id.state_id',
|
||||||
|
string="State"
|
||||||
|
)
|
||||||
|
customer_zip = fields.Char(
|
||||||
|
related='customer_id.zip',
|
||||||
|
string="Zip"
|
||||||
|
)
|
||||||
|
vendor_address = fields.Char(
|
||||||
|
related='vendor_id.contact_address',
|
||||||
|
string="Address"
|
||||||
|
)
|
||||||
|
vendor_street = fields.Char(
|
||||||
|
related='vendor_id.street',
|
||||||
|
string="Street"
|
||||||
|
)
|
||||||
|
vendor_street2 = fields.Char(
|
||||||
|
related='vendor_id.street2',
|
||||||
|
string="Street 2"
|
||||||
|
)
|
||||||
|
vendor_city = fields.Char(
|
||||||
|
related='vendor_id.city',
|
||||||
|
string="City"
|
||||||
|
)
|
||||||
|
vendor_state_id = fields.Many2one(
|
||||||
|
related='vendor_id.state_id',
|
||||||
|
string="State"
|
||||||
|
)
|
||||||
|
vendor_zip = fields.Char(
|
||||||
|
related='vendor_id.zip',
|
||||||
|
string="Zip"
|
||||||
|
)
|
||||||
|
reviewed_date = fields.Date(
|
||||||
|
string="Reviewed Date",
|
||||||
|
track_visibility='onchange'
|
||||||
|
)
|
||||||
|
reviewed_user_id = fields.Many2one(
|
||||||
|
'res.users',
|
||||||
|
string="Reviewed By",
|
||||||
|
track_visibility='onchange'
|
||||||
|
)
|
||||||
|
approved_date = fields.Date(
|
||||||
|
string="Approved Date",
|
||||||
|
track_visibility='onchange'
|
||||||
|
)
|
||||||
|
approved_user_id = fields.Many2one(
|
||||||
|
'res.users',
|
||||||
|
string="Approved By",
|
||||||
|
track_visibility='onchange'
|
||||||
|
)
|
||||||
|
|
||||||
currency_id = fields.Many2one('res.currency', string='Currency')
|
currency_id = fields.Many2one(
|
||||||
customer = fields.Many2one('res.partner', string="Customer", copy=True, help="The customer this agreement is related to (If Applicable).")
|
'res.currency',
|
||||||
vendor = fields.Many2one('res.partner', string="Vendor", copy=True, help="The vendor this agreement is related to (If Applicable).")
|
string='Currency'
|
||||||
customer_contact = fields.Many2one('res.partner', string="Customer Contact", copy=True, help="The primary customer contact (If Applicable).")
|
)
|
||||||
customer_contact_phone = fields.Char(related='customer_contact.phone', string="Phone")
|
customer_id = fields.Many2one(
|
||||||
customer_contact_email = fields.Char(related='customer_contact.email', string="Email")
|
'res.partner',
|
||||||
|
string="Customer",
|
||||||
|
copy=True,
|
||||||
|
help="The customer this agreement is related to (If Applicable)."
|
||||||
|
)
|
||||||
|
vendor_id = fields.Many2one(
|
||||||
|
'res.partner',
|
||||||
|
string="Vendor",
|
||||||
|
copy=True,
|
||||||
|
help="The vendor this agreement is related to (If Applicable)."
|
||||||
|
)
|
||||||
|
customer_contact_id = fields.Many2one(
|
||||||
|
'res.partner',
|
||||||
|
string="Customer Contact",
|
||||||
|
copy=True,
|
||||||
|
help="The primary customer contact (If Applicable)."
|
||||||
|
)
|
||||||
|
customer_contact_phone = fields.Char(
|
||||||
|
related='customer_contact_id.phone',
|
||||||
|
string="Phone"
|
||||||
|
)
|
||||||
|
customer_contact_email = fields.Char(
|
||||||
|
related='customer_contact_id.email',
|
||||||
|
string="Email"
|
||||||
|
)
|
||||||
|
|
||||||
vendor_contact = fields.Many2one('res.partner', string="Vendor Contact", copy=True, help="The primary vendor contact (If Applicable).")
|
vendor_contact_id = fields.Many2one(
|
||||||
vendor_contact_phone = fields.Char(related='vendor_contact.phone', string="Phone")
|
'res.partner',
|
||||||
vendor_contact_email = fields.Char(related='vendor_contact.email', string="Email")
|
string="Vendor Contact",
|
||||||
type = fields.Many2one('partner_agreement.type', string="Agreement Type", help="Select the type of agreement.", track_visibility='onchange')
|
copy=True,
|
||||||
subtype = fields.Many2one('partner_agreement.subtype', string="Agreement Sub-type", help="Select the sub-type of this agreement. Sub-Types are related to agreement types.", track_visibility='onchange')
|
help="The primary vendor contact (If Applicable)."
|
||||||
sale_order = fields.Many2one('sale.order', string="Sales Order", help="Select the Sales Order that this agreement is related to.", copy=False, track_visibility='onchange')
|
)
|
||||||
payment_term = fields.Many2one('account.payment.term', string="Payment Term", help="Terms of payments.", track_visibility='onchange')
|
vendor_contact_phone = fields.Char(
|
||||||
assigned_to = fields.Many2one('res.users', string="Assigned To", help="Select the user who manages this agreement.", track_visibility='onchange')
|
related='vendor_contact_id.phone',
|
||||||
company_signed_by = fields.Many2one('res.users', string="Company Signed By", help="The user at our company who authorized/signed the agreement or contract.", track_visibility='onchange')
|
string="Phone"
|
||||||
customer_signed_by = fields.Many2one('res.partner', string="Customer Signed By", help="Contact on the account that signed the agreement/contract.", track_visibility='onchange')
|
)
|
||||||
parent_agreement = fields.Many2one('partner_agreement.agreement', string="Parent Agreement", help="Link this agreement to a parent agreement. For example if this agreement is an amendment to another agreement. This list will only show other agreements related to the same account.")
|
vendor_contact_email = fields.Char(
|
||||||
renewal_type = fields.Many2one('partner_agreement.renewaltype', string="Renewal Type", help="Describes what happens after the contract expires.", track_visibility='onchange')
|
related='vendor_contact_id.email',
|
||||||
|
string="Email"
|
||||||
|
)
|
||||||
|
agreement_type_id = fields.Many2one(
|
||||||
|
'agreement.type',
|
||||||
|
string="Agreement Type",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Select the type of agreement."
|
||||||
|
)
|
||||||
|
agreement_subtype_id = fields.Many2one(
|
||||||
|
'agreement.subtype',
|
||||||
|
string="Agreement Sub-type",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Select the sub-type of this agreement. Sub-Types are related to "
|
||||||
|
"agreement types."
|
||||||
|
)
|
||||||
|
sale_order_id = fields.Many2one(
|
||||||
|
'sale.order',
|
||||||
|
string="Sales Order",
|
||||||
|
track_visibility='onchange',
|
||||||
|
copy=False,
|
||||||
|
help="Select the Sales Order that this agreement is related to."
|
||||||
|
)
|
||||||
|
payment_term_id = fields.Many2one(
|
||||||
|
'account.payment.term',
|
||||||
|
string="Payment Term",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Terms of payments."
|
||||||
|
)
|
||||||
|
assigned_user_id = fields.Many2one(
|
||||||
|
'res.users',
|
||||||
|
string="Assigned To",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Select the user who manages this agreement."
|
||||||
|
)
|
||||||
|
company_signed_user_id = fields.Many2one(
|
||||||
|
'res.users',
|
||||||
|
string="Company Signed By",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="The user at our company who authorized/signed the agreement or "
|
||||||
|
"contract."
|
||||||
|
)
|
||||||
|
customer_signed_user_id = fields.Many2one(
|
||||||
|
'res.partner',
|
||||||
|
string="Customer Signed By",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Contact on the account that signed the agreement/contract."
|
||||||
|
)
|
||||||
|
parent_agreement_id = fields.Many2one(
|
||||||
|
'agreement',
|
||||||
|
string="Parent Agreement",
|
||||||
|
help="Link this agreement to a parent agreement. For example if this "
|
||||||
|
"agreement is an amendment to another agreement. This list will "
|
||||||
|
"only show other agreements related to the same account."
|
||||||
|
)
|
||||||
|
renewal_type_id = fields.Many2one(
|
||||||
|
'agreement.renewaltype',
|
||||||
|
string="Renewal Type",
|
||||||
|
track_visibility='onchange',
|
||||||
|
help="Describes what happens after the contract expires."
|
||||||
|
)
|
||||||
|
|
||||||
order_lines_services = fields.One2many(related='sale_order.order_line', string="Service Order Lines", copy=False)
|
order_lines_services_ids = fields.One2many(
|
||||||
# order_lines_nonservices = fields.One2many(related='sale_order.order_line', string="Non Service Order Lines", copy=False, store=False)
|
related='sale_order_id.order_line',
|
||||||
sections = fields.One2many('partner_agreement.section', 'agreement', string="Sections", copy=True)
|
string="Service Order Lines",
|
||||||
clauses = fields.One2many('partner_agreement.clause', 'agreement', string="Clauses", copy=True)
|
copy=False
|
||||||
previous_version_agreements = fields.One2many('partner_agreement.agreement', 'parent_agreement', string="Child Agreements", copy=False, domain=[('active', '=', False)])
|
)
|
||||||
child_agreements = fields.One2many('partner_agreement.agreement', 'parent_agreement', string="Child Agreements", copy=False, domain=[('active', '=', True)])
|
sections_ids = fields.One2many(
|
||||||
products = fields.Many2many('product.template', string="Products", copy=False)
|
'agreement.section',
|
||||||
state = fields.Selection([('draft', 'Draft'),('active', 'Active'),('inactive', 'Inactive')], default='draft', track_visibility='always')
|
'agreement_id',
|
||||||
notification_address = fields.Many2one('res.partner', string="Notification Address", help="The address to send notificaitons to, if different from customer address.(Address Type = Other)")
|
string="Sections",
|
||||||
signed_contract_filename = fields.Char(string="Filename")
|
copy=True
|
||||||
signed_contract = fields.Binary(string="Signed Document", track_visibility='always')
|
)
|
||||||
|
clauses_ids = fields.One2many(
|
||||||
|
'agreement.clause',
|
||||||
|
'agreement_id',
|
||||||
|
string="Clauses",
|
||||||
|
copy=True
|
||||||
|
)
|
||||||
|
previous_version_agreements_ids = fields.One2many(
|
||||||
|
'agreement',
|
||||||
|
'parent_agreement_id',
|
||||||
|
string="Child Agreements",
|
||||||
|
copy=False,
|
||||||
|
domain=[('active', '=', False)]
|
||||||
|
)
|
||||||
|
child_agreements_ids = fields.One2many(
|
||||||
|
'agreement',
|
||||||
|
'parent_agreement_id',
|
||||||
|
string="Child Agreements",
|
||||||
|
copy=False,
|
||||||
|
domain=[('active', '=', True)]
|
||||||
|
)
|
||||||
|
products_ids = fields.Many2many(
|
||||||
|
'product.template',
|
||||||
|
string="Products",
|
||||||
|
copy=False
|
||||||
|
)
|
||||||
|
state = fields.Selection([
|
||||||
|
('draft', 'Draft'),
|
||||||
|
('active', 'Active'),
|
||||||
|
('inactive', 'Inactive')],
|
||||||
|
default='draft',
|
||||||
|
track_visibility='always'
|
||||||
|
)
|
||||||
|
notification_address_id = fields.Many2one(
|
||||||
|
'res.partner',
|
||||||
|
string="Notification Address",
|
||||||
|
help="The address to send notificaitons to, if different from "
|
||||||
|
"customer address.(Address Type = Other)"
|
||||||
|
)
|
||||||
|
signed_contract_filename = fields.Char(
|
||||||
|
string="Filename"
|
||||||
|
)
|
||||||
|
signed_contract = fields.Binary(
|
||||||
|
string="Signed Document",
|
||||||
|
track_visibility='always'
|
||||||
|
)
|
||||||
|
|
||||||
#compute contract_value field
|
# compute contract_value field
|
||||||
@api.depends('total_customer_mrc','total_customer_nrc','customer_term')
|
@api.depends('total_customer_mrc', 'total_customer_nrc', 'customer_term')
|
||||||
def _compute_contract_value (self):
|
def _compute_contract_value(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
record.contract_value = (record.total_customer_mrc * record.customer_term) + record.total_customer_nrc
|
record.contract_value =\
|
||||||
|
(record.total_customer_mrc * record.customer_term) +\
|
||||||
|
record.total_customer_nrc
|
||||||
|
|
||||||
#compute total_company_mrc field
|
# compute total_company_mrc field
|
||||||
#@api.multi
|
@api.depends('order_lines_services_ids', 'sale_order_id')
|
||||||
@api.depends('order_lines_services','sale_order')
|
def _compute_company_mrc(self):
|
||||||
def _compute_company_mrc(self):
|
order_lines = self.env['sale.order.line'].search(
|
||||||
order_lines = self.env['sale.order.line'].search([('is_service', '=', True)])
|
[('is_service', '=', True)])
|
||||||
amount_total = sum(order_lines.mapped('purchase_price'))
|
amount_total = sum(order_lines.mapped('purchase_price'))
|
||||||
for record in self:
|
for record in self:
|
||||||
record.total_company_mrc = amount_total
|
record.total_company_mrc = amount_total
|
||||||
|
|
||||||
#Used for Kanban grouped_by view
|
# Used for Kanban grouped_by view
|
||||||
@api.model
|
@api.model
|
||||||
def _read_group_stage_ids(self,stages,domain,order):
|
def _read_group_stage_ids(self, stages, domain, order):
|
||||||
stage_ids = self.env['partner_agreement.stage'].search([])
|
stage_ids = self.env['agreement.stage'].search([])
|
||||||
return stage_ids
|
return stage_ids
|
||||||
|
|
||||||
stage = fields.Many2one('partner_agreement.stage', string="Stage", group_expand='_read_group_stage_ids', help="Select the current stage of the agreement.")
|
stage_id = fields.Many2one(
|
||||||
|
'agreement.stage',
|
||||||
|
string="Stage",
|
||||||
|
group_expand='_read_group_stage_ids',
|
||||||
|
help="Select the current stage of the agreement."
|
||||||
|
)
|
||||||
|
|
||||||
#Create New Version Button
|
# Create New Version Button
|
||||||
@api.multi
|
@api.multi
|
||||||
def create_new_version(self, vals):
|
def create_new_version(self, vals):
|
||||||
self.write({'state': 'draft'}) #Make sure status is draft
|
for rec in self:
|
||||||
self.copy(default={'name': self.name + ' - OLD VERSION', 'active': False, 'parent_agreement': self.id}) #Make a current copy and mark it as old
|
if not rec.state == 'draft':
|
||||||
self.write({'version': self.version + 1}) #Increment the Version
|
# Make sure status is draft
|
||||||
#Reset revision to 0 since it's a new version
|
rec.state = 'draft'
|
||||||
vals['revision'] = 0
|
default_vals = {'name': '{0} - OLD VERSION'.format(rec.name),
|
||||||
return super(Agreement, self).write(vals)
|
'active': False,
|
||||||
|
'parent_agreement_id': rec.id}
|
||||||
|
# Make a current copy and mark it as old
|
||||||
|
rec.copy(default=default_vals)
|
||||||
|
# Increment the Version
|
||||||
|
rec.version = rec.version + 1
|
||||||
|
# Reset revision to 0 since it's a new version
|
||||||
|
vals['revision'] = 0
|
||||||
|
return super(Agreement, self).write(vals)
|
||||||
|
|
||||||
def create_new_agreement(self):
|
def create_new_agreement(self):
|
||||||
res = self.copy(default={'name': 'NEW', 'active': True, 'version': 1, 'revision': 0, 'state': 'draft', 'start_date': "", 'end_date':""})
|
default_vals = {'name': 'NEW',
|
||||||
return {'res_model': 'partner_agreement.agreement', 'type': 'ir.actions.act_window', 'view_mode': 'form', 'view_type': 'form', 'res_id': res.id}
|
'active': True,
|
||||||
|
'version': 1,
|
||||||
|
'revision': 0,
|
||||||
|
'state': 'draft'}
|
||||||
|
res = self.copy(default=default_vals)
|
||||||
|
return {'res_model': 'agreement',
|
||||||
|
'type': 'ir.actions.act_window',
|
||||||
|
'view_mode': 'form',
|
||||||
|
'view_type': 'form',
|
||||||
|
'res_id': res.id}
|
||||||
|
|
||||||
#Increments the revision on each save action
|
# Increments the revision on each save action
|
||||||
def write(self, vals):
|
@api.multi
|
||||||
vals['revision'] = self.revision + 1
|
def write(self, vals):
|
||||||
return super(Agreement, self).write(vals)
|
vals['revision'] = self.revision + 1
|
||||||
|
return super(Agreement, self).write(vals)
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
from odoo import models, fields, api
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
class Product(models.Model):
|
class Product(models.Model):
|
||||||
|
|
||||||
_inherit = 'product.template'
|
_inherit = 'product.template'
|
||||||
|
|
||||||
agreements = fields.Many2many('partner_agreement.agreement', string="Agreements")
|
agreements_ids = fields.Many2many(
|
||||||
|
'agreement',
|
||||||
|
string="Agreements"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
from odoo import models, fields, api
|
# Copyright (C) 2018 - TODAY, Pavlov Media
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
class Partner(models.Model):
|
class Partner(models.Model):
|
||||||
|
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
agreements = fields.One2many('partner_agreement.agreement', 'name', string="Agreements")
|
agreements_ids = fields.One2many(
|
||||||
|
'agreement',
|
||||||
|
'name',
|
||||||
|
string="Agreements"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
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_partner_agreement_agreement,,1,1,1,1
|
access_agreement_allusers,agreement all users,model_agreement,,1,1,1,1
|
||||||
access_agreement_section_allusers,section all users,model_partner_agreement_section,,1,1,1,1
|
access_agreement_section_allusers,section all users,model_agreement_section,,1,1,1,1
|
||||||
access_agreement_clause_allusers,clause all users,model_partner_agreement_clause,,1,1,1,1
|
access_agreement_clause_allusers,clause all users,model_agreement_clause,,1,1,1,1
|
||||||
access_agreement_stage_allusers,stage all users,model_partner_agreement_stage,,1,1,1,1
|
access_agreement_stage_allusers,stage all users,model_agreement_stage,,1,1,1,1
|
||||||
access_agreement_type_allusers,type all users,model_partner_agreement_type,,1,1,1,1
|
access_agreement_type_allusers,type all users,model_agreement_type,,1,1,1,1
|
||||||
access_agreement_subtype_allusers,subtype all users,model_partner_agreement_subtype,,1,1,1,1
|
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,,1,1,1,1
|
||||||
access_agreement_renewaltype_allusers,renewaltype all users,model_partner_agreement_renewaltype,,1,1,1,1
|
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,,1,1,1,1
|
||||||
access_agreement_increasetype_allusers,increasetype all users,model_partner_agreement_increasetype,,1,1,1,1
|
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,,1,1,1,1
|
||||||
|
|||||||
|
@@ -1,4 +0,0 @@
|
|||||||
<odoo>
|
|
||||||
<!-- This holds the security groups -->
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -1,331 +1,328 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement List View-->
|
<!-- Agreement List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_list_view">
|
<record model="ir.ui.view" id="partner_agreement_list_view">
|
||||||
<field name="name">Agreement List</field>
|
<field name="name">Agreement List</field>
|
||||||
<field name="model">partner_agreement.agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree default_order='name'>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="customer"/>
|
<field name="customer_id"/>
|
||||||
<field name="vendor"/>
|
<field name="vendor_id"/>
|
||||||
<field name="parent_agreement"/>
|
<field name="parent_agreement_id"/>
|
||||||
<field name="type"/>
|
<field name="agreement_type_id"/>
|
||||||
<field name="subtype"/>
|
<field name="agreement_subtype_id"/>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Form View -->
|
<!-- Agreement Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_form_view">
|
<record model="ir.ui.view" id="partner_agreement_form_view">
|
||||||
<field name="name">Agreement Form</field>
|
<field name="name">Agreement Form</field>
|
||||||
<field name="model">partner_agreement.agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Form">
|
<form string="Agreements Form">
|
||||||
<header>
|
<header>
|
||||||
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
|
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
|
||||||
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
|
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
|
||||||
<field name="state" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
|
<field name="state" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Agreement Name"/>
|
<label for="name" class="oe_edit_only" string="Agreement Name"/>
|
||||||
<h1>
|
<h1>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group string="General" colspan="2" col="4">
|
<group string="General" colspan="2" col="4">
|
||||||
<field name="contract_id" string="Internal ID"/>
|
<field name="contract_id" string="Internal ID"/>
|
||||||
<field name="stage" widget="selection" requried="True"/>
|
<field name="stage_id" widget="selection" requried="True"/>
|
||||||
<field name="parent_agreement" domain="[('customer', '=', customer)]"/>
|
<field name="parent_agreement_id" domain="[('customer_id', '=', customer_id)]"/>
|
||||||
<field name="type" widget="selection" requried="True"/>
|
<field name="agreement_type_id" widget="selection" requried="True"/>
|
||||||
<field name="assigned_to" attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
|
<field name="assigned_user_id" attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
|
||||||
<field name="subtype" widget="selection" domain="[('agreement_type', '=', type)]"/>
|
<field name="agreement_subtype_id" widget="selection" domain="[('agreement_type_id', '=', agreement_type_id)]"/>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="description" string="Description" requried="True"/>
|
<field name="description" string="Description" requried="True"/>
|
||||||
</group>
|
</group>
|
||||||
|
<group name="customer_vendor_information">
|
||||||
<group name="customer_vendor_information">
|
<group name="customer_left" string="Customer Information">
|
||||||
<group name="customer_left" string="Customer Information">
|
<div class="o_address_format">
|
||||||
<div class="o_address_format">
|
<field name="customer_id" domain="[('customer', '=', True)]"/>
|
||||||
<field name="customer" domain="[('customer', '=', True)]"/>
|
<field name="customer_street" placeholder="Street..." class="o_address_street" readonly="1"/>
|
||||||
<field name="customer_street" placeholder="Street..." class="o_address_street" readonly="1"/>
|
<field name="customer_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
|
||||||
<field name="customer_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
|
<field name="customer_city" placeholder="City" class="o_address_city" readonly="1"/>
|
||||||
<field name="customer_city" placeholder="City" class="o_address_city" readonly="1"/>
|
<field name="customer_state_id" class="o_address_state" placeholder="State" options="{"no_open": True}" readonly="1"/>
|
||||||
<field name="customer_state" class="o_address_state" placeholder="State" options="{"no_open": True}" readonly="1"/>
|
<field name="customer_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
|
||||||
<field name="customer_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
|
</div>
|
||||||
|
</group>
|
||||||
|
<group name="vendor_right" string="Vendor Information">
|
||||||
|
<div class="o_address_format">
|
||||||
|
<field name="vendor_id" domain="[('supplier', '=', True)]"/>
|
||||||
|
<field name="vendor_street" placeholder="Street..." class="o_address_street" readonly="1"/>
|
||||||
|
<field name="vendor_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
|
||||||
|
<field name="vendor_city" placeholder="City" class="o_address_city" readonly="1"/>
|
||||||
|
<field name="vendor_state_id" class="o_address_state" placeholder="State" options="{"no_open": True}" readonly="1"/>
|
||||||
|
<field name="vendor_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<group name="contact_left" string="Primary Contact">
|
||||||
|
<field name="customer_contact_id" domain="[('parent_id', '=', customer_id)]" nolabel="1"/>
|
||||||
|
<field name="customer_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
||||||
|
<field name="customer_contact_email" widget="email" readonly="1" nolabel="1"/>
|
||||||
|
</group>
|
||||||
|
<group name="contact_right" string="Primary Contact">
|
||||||
|
<field name="vendor_contact_id" domain="[('parent_id', '=', vendor_id)]" nolabel="1"/>
|
||||||
|
<field name="vendor_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
||||||
|
<field name="vendor_contact_email" widget="email" readonly="1" nolabel="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group name="term_information">
|
||||||
|
<group name="termdates_left" string="Term Dates">
|
||||||
|
<field name="start_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
|
||||||
|
<field name="end_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
|
||||||
|
<field name="expiration_notice"/>
|
||||||
|
<field name="change_notice"/>
|
||||||
|
<field name="notification_address_id" domain="['|',('parent_id','=',customer_id),('parent_id','=',vendor_id)]"/>
|
||||||
|
<field name="termination_requested"/>
|
||||||
|
<field name="termination_date"/>
|
||||||
|
</group>
|
||||||
|
<group name="paymentterm_right" string="Payment Terms">
|
||||||
|
<field name="customer_term" attrs="{'invisible': [('customer_id', '=', False)]}"/>
|
||||||
|
<field name="vendor_term" attrs="{'invisible': [('vendor_id', '=', False)]}"/>
|
||||||
|
<field name="payment_term_id" widget="selection"/>
|
||||||
|
<field name="renewal_type_id" widget="selection"/>
|
||||||
|
<field name="increase_type_id" widget="selection"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="special_terms"/>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page name="contract_document" string="Contract Document">
|
||||||
|
<div>
|
||||||
|
<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"/>
|
||||||
|
</div>
|
||||||
|
<group colspan="2" col="4">
|
||||||
|
<field name="customer_signed_date"/>
|
||||||
|
<field name="company_signed_date"/>
|
||||||
|
<field name="customer_signed_user_id" domain="[('parent_id', '=', customer_id)]"/>
|
||||||
|
<field name="company_signed_user_id"/>
|
||||||
|
<field name="signed_contract" filename="signed_contract_filename"/>
|
||||||
|
<field name="signed_contract_filename" invisible="1"/>
|
||||||
|
</group>
|
||||||
|
<group colspan="2" col="2" default_order='section_sequence'>
|
||||||
|
<field name="sections_ids" string="Contract Sections" context="{'default_agreement': active_id}">
|
||||||
|
<tree default_order='section_sequence'>
|
||||||
|
<field name="section_sequence" widget="handle"/>
|
||||||
|
<field name="name"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</group>
|
||||||
|
<group colspan="2" col="2" default_order='section_id, clause_sequence'>
|
||||||
|
<field name="clauses_ids" string="Contract Clauses" context="{'default_agreement': active_id}">
|
||||||
|
<tree default_order='section_id, clause_sequence'>
|
||||||
|
<field name="clause_sequence" widget="handle"/>
|
||||||
|
<field name="section_id"/>
|
||||||
|
<field name="name"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
<page name="products" string="MRC and NRC Products">
|
||||||
|
<group string="Financial Details" colspan="2" col="4">
|
||||||
|
<field name="total_company_mrc"/>
|
||||||
|
<field name="total_customer_mrc"/>
|
||||||
|
<field name="total_company_nrc"/>
|
||||||
|
<field name="total_customer_nrc"/>
|
||||||
|
<field name="currency_id"/>
|
||||||
|
<field name="contract_value" readonly="1"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="sale_order_id" domain="[('partner_id', '=', customer_id)]"/>
|
||||||
|
</group>
|
||||||
|
<group string="Sales Order Lines">
|
||||||
|
<field name="order_lines_services_ids" nolabel="1" readonly="1"/>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
<page colspan="2" col="4" name="child_agreements" string="Child Agreements">
|
||||||
|
<field name="child_agreements_ids">
|
||||||
|
<tree default_order='version desc'>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="version"/>
|
||||||
|
<field name="revision"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
<page colspan="2" col="4" name="old_versions" string="Revisions">
|
||||||
|
<field name="previous_version_agreements_ids" string="Previouse Versions">
|
||||||
|
<tree default_order='version desc'>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="version"/>
|
||||||
|
<field name="revision"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
<page colspan="2" col="4" name="peformance" string="Performance">
|
||||||
|
<p>This section is a place where finincial records will show the current performance of this agreement. </p>
|
||||||
|
<p>Perhaps include invoices with total vs costs? </p>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
<group colspan="2" col="4" string="Administration">
|
||||||
|
<field name="reviewed_date"/>
|
||||||
|
<field name="approved_date"/>
|
||||||
|
<field name="reviewed_user_id"/>
|
||||||
|
<field name="approved_user_id"/>
|
||||||
|
<field name="is_template"/>
|
||||||
|
</group>
|
||||||
|
<footer>
|
||||||
|
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
|
||||||
|
| Created By: <field name="create_uid" readonly="True"/>
|
||||||
|
| Created On: <field name="create_date" readonly="True"/>
|
||||||
|
</footer>
|
||||||
|
</sheet>
|
||||||
|
<div class="oe_chatter">
|
||||||
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||||||
|
<field name="message_ids" widget="mail_thread"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</form>
|
||||||
<group name="vendor_right" string="Vendor Information">
|
</field>
|
||||||
<div class="o_address_format">
|
|
||||||
<field name="vendor" domain="[('supplier', '=', True)]"/>
|
|
||||||
<field name="vendor_street" placeholder="Street..." class="o_address_street" readonly="1"/>
|
|
||||||
<field name="vendor_street2" placeholder="Street 2..." class="o_address_street" readonly="1"/>
|
|
||||||
<field name="vendor_city" placeholder="City" class="o_address_city" readonly="1"/>
|
|
||||||
<field name="vendor_state" class="o_address_state" placeholder="State" options="{"no_open": True}" readonly="1"/>
|
|
||||||
<field name="vendor_zip" placeholder="ZIP" class="o_address_zip" readonly="1"/>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group name="contact_left" string="Primary Contact">
|
|
||||||
<field name="customer_contact" domain="[('parent_id', '=', customer)]" nolabel="1"/>
|
|
||||||
<field name="customer_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
|
||||||
<field name="customer_contact_email" widget="email" readonly="1" nolabel="1"/>
|
|
||||||
</group>
|
|
||||||
<group name="contact_right" string="Primary Contact">
|
|
||||||
<field name="vendor_contact" domain="[('parent_id', '=', vendor)]" nolabel="1"/>
|
|
||||||
<field name="vendor_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
|
||||||
<field name="vendor_contact_email" widget="email" readonly="1" nolabel="1"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group name="term_information">
|
|
||||||
<group name="termdates_left" string="Term Dates">
|
|
||||||
<field name="start_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
|
|
||||||
<field name="end_date" requried="True" attrs="{'required': [('is_template', '=', False)], 'readonly':[('is_template', '=', True)]}"/>
|
|
||||||
<field name="expiration_notice"/>
|
|
||||||
<field name="change_notice"/>
|
|
||||||
<field name="notification_address" domain="['|',('parent_id','=',customer),('parent_id','=',vendor)]"/>
|
|
||||||
<field name="termination_requested"/>
|
|
||||||
<field name="termination_date"/>
|
|
||||||
</group>
|
|
||||||
<group name="paymentterm_right" string="Payment Terms">
|
|
||||||
<field name="customer_term" attrs="{'invisible': [('customer', '=', False)]}"/>
|
|
||||||
<field name="vendor_term" attrs="{'invisible': [('vendor', '=', False)]}"/>
|
|
||||||
<field name="payment_term" widget="selection"/>
|
|
||||||
<field name="renewal_type" widget="selection"/>
|
|
||||||
<field name="increase_type" widget="selection"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<group>
|
|
||||||
<field name="special_terms"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<notebook>
|
|
||||||
<page name="contract_document" string="Contract Document">
|
|
||||||
<div>
|
|
||||||
<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"/>
|
|
||||||
</div>
|
|
||||||
<group colspan="2" col="4">
|
|
||||||
<field name="customer_signed_date"/>
|
|
||||||
<field name="company_signed_date"/>
|
|
||||||
<field name="customer_signed_by" domain="[('parent_id', '=', customer)]"/>
|
|
||||||
<field name="company_signed_by"/>
|
|
||||||
<field name="signed_contract" filename="signed_contract_filename"/>
|
|
||||||
<field name="signed_contract_filename" invisible="1"/>
|
|
||||||
</group>
|
|
||||||
<group colspan="2" col="2" default_order='section_sequence'>
|
|
||||||
<field name="sections" string="Contract Sections" context="{'default_agreement': active_id}">
|
|
||||||
<tree default_order='section_sequence'>
|
|
||||||
<field name="section_sequence" widget="handle"/>
|
|
||||||
<field name="name"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<group colspan="2" col="2" default_order='section, clause_sequence'>
|
|
||||||
<field name="clauses" string="Contract Clauses" context="{'default_agreement': active_id}">
|
|
||||||
<tree default_order='section, clause_sequence'>
|
|
||||||
<field name="clause_sequence" widget="handle"/>
|
|
||||||
<field name="section"/>
|
|
||||||
<field name="name"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
<page name="products" string="MRC and NRC Products">
|
|
||||||
<group string="Financial Details" colspan="2" col="4">
|
|
||||||
<field name="total_company_mrc"/>
|
|
||||||
<field name="total_customer_mrc"/>
|
|
||||||
<field name="total_company_nrc"/>
|
|
||||||
<field name="total_customer_nrc"/>
|
|
||||||
<field name="currency_id"/>
|
|
||||||
<field name="contract_value" readonly="1"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="sale_order" domain="[('partner_id', '=', customer)]"/>
|
|
||||||
</group>
|
|
||||||
<group string="Sales Order Lines">
|
|
||||||
<field name="order_lines_services" nolabel="1" readonly="1"/>
|
|
||||||
</group>
|
|
||||||
<!-- <group string="Non-Service Products Order Lines">
|
|
||||||
<field name="order_lines_nonservices" nolabel="1"/>
|
|
||||||
</group>-->
|
|
||||||
</page>
|
|
||||||
<page colspan="2" col="4" name="child_agreements" string="Child Agreements">
|
|
||||||
<field name="child_agreements">
|
|
||||||
<tree default_order='version desc'>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="version"/>
|
|
||||||
<field name="revision"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
<page colspan="2" col="4" name="old_versions" string="Revisions">
|
|
||||||
<field name="previous_version_agreements" string="Previouse Versions">
|
|
||||||
<tree default_order='version desc'>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="version"/>
|
|
||||||
<field name="revision"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
<page colspan="2" col="4" name="peformance" string="Performance">
|
|
||||||
<p>This section is a place where finincial records will show the current performance of this agreement. </p>
|
|
||||||
<p>Perhaps include invoices with total vs costs? </p>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
|
||||||
<group colspan="2" col="4" string="Administration">
|
|
||||||
<field name="reviewed_date"/>
|
|
||||||
<field name="approved_date"/>
|
|
||||||
<field name="reviewed_by"/>
|
|
||||||
<field name="approved_by"/>
|
|
||||||
<field name="is_template"/>
|
|
||||||
</group>
|
|
||||||
<footer>
|
|
||||||
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
|
|
||||||
| Created By: <field name="create_uid" readonly="True"/>
|
|
||||||
| Created On: <field name="create_date" readonly="True"/>
|
|
||||||
</footer>
|
|
||||||
</sheet>
|
|
||||||
<div class="oe_chatter">
|
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
|
||||||
<field name="message_ids" widget="mail_thread"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Kanban View -->
|
<!-- Agreement Kanban View -->
|
||||||
<record id="view_project_agreement_kanban" model="ir.ui.view">
|
<record id="view_project_agreement_kanban" model="ir.ui.view">
|
||||||
<field name="name">Agreement Kanban</field>
|
<field name="name">Agreement Kanban</field>
|
||||||
<field name="model">partner_agreement.agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<kanban default_group_by="stage">
|
<kanban default_group_by="stage_id">
|
||||||
<field name="color"/>
|
<field name="color"/>
|
||||||
<field name="assigned_to"/>
|
<field name="assigned_user_id"/>
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
||||||
<div class="oe_kanban_content">
|
<div class="oe_kanban_content">
|
||||||
<div class="o_kanban_record_top">
|
<div class="o_kanban_record_top">
|
||||||
<div class="o_kanban_record_headings">
|
<div class="o_kanban_record_headings">
|
||||||
<strong class="o_kanban_record_title"><field name="name"/></strong><br/>
|
<strong class="o_kanban_record_title">
|
||||||
<div class="o_kanban_record_subtitle text-muted">
|
<field name="name"/>
|
||||||
<field name="customer" invisible="context.get('default_customer', False)"/>
|
</strong><br/>
|
||||||
<t t-if="record.start_date.raw_value and record.start_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
<div class="o_kanban_record_subtitle text-muted">
|
||||||
<div t-attf-class="#{red || ''}"><i><field name="start_date"/></i></div>
|
<field name="customer_id" invisible="context.get('default_customer_id', False)"/>
|
||||||
</div>
|
<t t-if="record.start_date.raw_value and record.start_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||||
</div>
|
<div t-attf-class="#{red || ''}">
|
||||||
|
<i><field name="start_date"/></i>
|
||||||
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
</div>
|
||||||
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
|
</div>
|
||||||
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
|
</div>
|
||||||
</a>
|
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
|
||||||
<li t-if="widget.editable"><a type="edit">Edit</a></li>
|
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
|
||||||
<li class="divider"/>
|
</a>
|
||||||
<li class="dropdown-header">Record's Colour</li>
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||||
<li>
|
<li t-if="widget.editable"><a type="edit">Edit</a></li>
|
||||||
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
<li class="divider"/>
|
||||||
</li>
|
<li class="dropdown-header">Record's Colour</li>
|
||||||
</ul>
|
<li>
|
||||||
</div>
|
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
||||||
</div>
|
</li>
|
||||||
|
</ul>
|
||||||
<div class="o_kanban_record_body">
|
</div>
|
||||||
<field name="type"/> - <field name="subtype"/>
|
</div>
|
||||||
</div>
|
<div class="o_kanban_record_body">
|
||||||
|
<field name="agreement_type_id"/> - <field name="agreement_subtype_id"/>
|
||||||
<div class="o_kanban_record_bottom">
|
</div>
|
||||||
<div class="oe_kanban_bottom_left">
|
<div class="o_kanban_record_bottom">
|
||||||
V: <field name="version"/>
|
<div class="oe_kanban_bottom_left">
|
||||||
</div>
|
V: <field name="version"/>
|
||||||
<div class="oe_kanban_bottom_right">
|
</div>
|
||||||
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_to.raw_value)" t-att-title="record.assigned_to.value" width="36" height="36" class="oe_kanban_avatar"/>
|
<div class="oe_kanban_bottom_right">
|
||||||
</div>
|
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)" t-att-title="record.assigned_user_id.value" width="36" height="36" class="oe_kanban_avatar"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_clear"/>
|
</div>
|
||||||
</div>
|
<div class="oe_clear"/>
|
||||||
</t>
|
</div>
|
||||||
</templates>
|
</t>
|
||||||
</kanban>
|
</templates>
|
||||||
</field>
|
</kanban>
|
||||||
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Search View -->
|
<!-- Agreement Search View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_search_view">
|
<record model="ir.ui.view" id="partner_agreement_search_view">
|
||||||
<field name="name">Agreement Search</field>
|
<field name="name">Agreement Search</field>
|
||||||
<field name="model">partner_agreement.agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Agreement Search">
|
<search string="Agreement Search">
|
||||||
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
|
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
|
||||||
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
|
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
|
||||||
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
|
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
|
||||||
<filter name="group_customer" string="customers" icon="terp-partner" context="{'group_by':'customer'}"/>
|
<filter name="group_customer_id" string="customers" icon="terp-partner" context="{'group_by':'customer_id'}"/>
|
||||||
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
|
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Adding a new filter to the order line search view -->
|
<!-- Adding a new filter to the order line search view -->
|
||||||
<record id="order_lines_search_view" model="ir.ui.view">
|
<record id="order_lines_search_view" model="ir.ui.view">
|
||||||
<field name="name">Order Lines Search</field>
|
<field name="name">Order Lines Search</field>
|
||||||
<field name="model">sale.order.line</field>
|
<field name="model">sale.order.line</field>
|
||||||
<field name="type">search</field>
|
<field name="type">search</field>
|
||||||
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
|
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="/search/filter[1]" position="after">
|
<xpath expr="/search/filter[1]" position="after">
|
||||||
<filter name="filter_service_product_type" string="Service Type" domain="[('type', '=', 'service')]"/>
|
<filter name="filter_service_product_type" string="Service Type" domain="[('type', '=', 'service')]"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- actions opening views on models -->
|
<!-- actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_agreement">
|
<record model="ir.actions.act_window" id="partner_agreement_agreement">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
<field name="res_model">partner_agreement.agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
<field name="context">{"search_default_filter_non_template":1}</field>
|
<field name="context">{"search_default_filter_non_template":1}</field>
|
||||||
<field name="view_mode">kanban,tree,form</field>
|
<field name="view_mode">kanban,tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
|
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
<field name="res_model">partner_agreement.agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
<field name="context">{"search_default_filter_templates":1}</field>
|
<field name="context">{"search_default_filter_templates":1}</field>
|
||||||
<field name="view_mode">tree,kanban,form</field>
|
<field name="view_mode">tree,kanban,form</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- ########################### MENU ITEMS ############################### -->
|
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem name="Agreements" id="partner_agreement.menu_root" web_icon="partner_agreement,static/description/icon.png" sequence="51"/>
|
<menuitem
|
||||||
|
name="Agreements"
|
||||||
|
id="partner_agreement_menu_root"
|
||||||
|
web_icon="agreement,static/description/icon.png"
|
||||||
|
sequence="51"/>
|
||||||
|
|
||||||
<!-- menu categories -->
|
<!-- menu categories -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreements"
|
name="Agreements"
|
||||||
id="partner_agreement.menu_1"
|
id="partner_agreement_menu_1"
|
||||||
parent="partner_agreement.menu_root"
|
parent="partner_agreement_menu_root"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
action="partner_agreement_agreement"/>
|
action="partner_agreement_agreement"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Templates"
|
name="Templates"
|
||||||
id="partner_agreement.menu_4"
|
id="partner_agreement_menu_4"
|
||||||
parent="partner_agreement.menu_root"
|
parent="partner_agreement_menu_root"
|
||||||
sequence="20"
|
sequence="20"
|
||||||
action="partner_agreement_agreement_templates"/>
|
action="partner_agreement_agreement_templates"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreement Parts"
|
name="Agreement Parts"
|
||||||
id="partner_agreement.menu_2"
|
id="partner_agreement_menu_2"
|
||||||
sequence="30"
|
sequence="30"
|
||||||
parent="partner_agreement.menu_root"/>
|
parent="partner_agreement_menu_root"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Configuration"
|
name="Configuration"
|
||||||
id="partner_agreement.menu_3"
|
id="partner_agreement_menu_3"
|
||||||
sequence="40"
|
sequence="40"
|
||||||
parent="partner_agreement.menu_root"/>
|
parent="partner_agreement_menu_root"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,103 +1,102 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- Agreement Clauses Sequences-->
|
<!-- Agreement Clauses Sequences-->
|
||||||
<record id="seq_agreement_clause" model="ir.sequence">
|
<record id="seq_agreement_clause" model="ir.sequence">
|
||||||
<field name="name">agreement_clause_sequencer</field>
|
<field name="name">agreement_clause_sequencer</field>
|
||||||
<field name="code">agreement.clause</field>
|
<field name="code">agreement.clause</field>
|
||||||
<field name="prefix">0</field>
|
<field name="prefix">0</field>
|
||||||
<field name="padding">1</field>
|
<field name="padding">1</field>
|
||||||
</record>
|
</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">partner_agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='agreement, clause_sequence'>
|
<tree default_order='agreement_id, clause_sequence'>
|
||||||
<field name="clause_sequence" widget="handle"/>
|
<field name="clause_sequence" widget="handle"/>
|
||||||
<field name="agreement"/>
|
<field name="agreement_id"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="section"/>
|
<field name="section_id"/>
|
||||||
<field name="content" widget="html"/>
|
<field name="content" widget="html"/>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Form View -->
|
<!-- Agreement Clause Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_clause_form_view">
|
<record model="ir.ui.view" id="partner_agreement_clause_form_view">
|
||||||
<field name="name">Agreement clause Form</field>
|
<field name="name">Agreement clause Form</field>
|
||||||
<field name="model">partner_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="Agreements Clause Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<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" string="Clause Name"/>
|
||||||
<h1><field name="name"/></h1>
|
<h1><field name="name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement"/>
|
<field name="agreement_id"/>
|
||||||
<!-- <field name='section_parent_id' string="Parent Section" readonly="True"/> -->
|
<field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
|
||||||
<field name="section" domain="[('agreement', '=', agreement)]"/>
|
<field name="content" widget="html"/>
|
||||||
<field name="content" widget="html"/>
|
</group>
|
||||||
</group>
|
<notebook>
|
||||||
<notebook>
|
<page string="Dynamic Placeholder Generator">
|
||||||
<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.
|
||||||
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="model_id"/>
|
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
||||||
<field name="model_object_field" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
<field name="sub_object_id" readonly="1"/>
|
||||||
<field name="sub_object" 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="sub_model_object_field" domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"/>
|
<field name="null_value"/>
|
||||||
<field name="null_value"/>
|
<field name="copyvalue"/>
|
||||||
<field name="copyvalue"/>
|
</group>
|
||||||
</group>
|
</page>
|
||||||
</page>
|
</notebook>
|
||||||
</notebook>
|
Sequence #<field name="clause_sequence"/>
|
||||||
Sequence #<field name="clause_sequence"/>
|
</sheet>
|
||||||
</sheet>
|
</form>
|
||||||
</form>
|
</field>
|
||||||
</field>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Search View -->
|
<!-- Agreement Clause Search View -->
|
||||||
<record model="ir.ui.view" id="agreement_clause_search_view">
|
<record model="ir.ui.view" id="agreement_clause_search_view">
|
||||||
<field name="name">Agreement Clause Search</field>
|
<field name="name">Agreement Clause Search</field>
|
||||||
<field name="model">partner_agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Agreement Clause Search">
|
<search string="Agreement Clause Search">
|
||||||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement'}"/>
|
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
||||||
<filter name="group_section" icon="terp-partner" context="{'group_by':'section'}"/>
|
<filter name="group_section" icon="terp-partner" context="{'group_by':'section_id'}"/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Pivot View -->
|
<!-- Agreement Clause Pivot View -->
|
||||||
<record model="ir.ui.view" id="agreement_clause_pivot_view">
|
<record model="ir.ui.view" id="agreement_clause_pivot_view">
|
||||||
<field name="name">Agreement Clause Pivot</field>
|
<field name="name">Agreement Clause Pivot</field>
|
||||||
<field name="model">partner_agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<pivot string="Agreement Clause Pivot">
|
<pivot string="Agreement Clause Pivot">
|
||||||
<field name="agreement" type="row"/>
|
<field name="agreement_id" type="row"/>
|
||||||
<field name="section" type="row"/>
|
<field name="section_id" type="row"/>
|
||||||
<field name="name" type="row"/>
|
<field name="name" type="row"/>
|
||||||
</pivot>
|
</pivot>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</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">Agreement Clauses</field>
|
||||||
<field name="res_model">partner_agreement.clause</field>
|
<field name="res_model">agreement.clause</field>
|
||||||
<field name="view_mode">tree,pivot,form</field>
|
<field name="view_mode">tree,pivot,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Clauses"
|
name="Clauses"
|
||||||
id="partner_agreement_clauses_menu_1"
|
id="partner_agreement_clauses_menu_1"
|
||||||
parent="partner_agreement.menu_2"
|
parent="agreement.partner_agreement_menu_2"
|
||||||
sequence="32"
|
sequence="32"
|
||||||
action="partner_agreement_action_clause"/>
|
action="partner_agreement_action_clause"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,53 +1,51 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement Increase Type List View-->
|
<!-- Agreement Increase Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_increasetype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_increasetype_list_view">
|
||||||
<field name="name">Agreement Increase Type List</field>
|
<field name="name">Agreement Increase Type List</field>
|
||||||
<field name="model">partner_agreement.increasetype</field>
|
<field name="model">agreement.increasetype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree default_order='name'>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="increase_percent"/>
|
<field name="increase_percent"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Increase Type Form View -->
|
<!-- Agreement Increase Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
|
||||||
<field name="name">Agreement Increase Type Form</field>
|
<field name="name">Agreement Increase Type Form</field>
|
||||||
<field name="model">partner_agreement.increasetype</field>
|
<field name="model">agreement.increasetype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Type Form">
|
<form string="Agreements Type Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Type"/>
|
<label for="name" class="oe_edit_only" string="Type"/>
|
||||||
<h1><field name="name"/></h1>
|
<h1><field name="name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="increase_percent"/>
|
<field name="increase_percent"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_increasetype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_increasetype">
|
||||||
<field name="name">Agreement Increase Type</field>
|
<field name="name">Agreement Increase Type</field>
|
||||||
<field name="res_model">partner_agreement.increasetype</field>
|
<field name="res_model">agreement.increasetype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Increase Types"
|
name="Increase Types"
|
||||||
id="partner_agreement_increasetype_menu_1"
|
id="partner_agreement_increasetype_menu_1"
|
||||||
parent="partner_agreement.menu_3"
|
parent="agreement.partner_agreement_menu_3"
|
||||||
sequence="45"
|
sequence="45"
|
||||||
action="partner_agreement_action_increasetype"/>
|
action="partner_agreement_action_increasetype"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,51 +1,49 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement Renewal Type List View-->
|
<!-- Agreement Renewal Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_renewaltype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_renewaltype_list_view">
|
||||||
<field name="name">Agreement Renewal Type List</field>
|
<field name="name">Agreement Renewal Type List</field>
|
||||||
<field name="model">partner_agreement.renewaltype</field>
|
<field name="model">agreement.renewaltype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree default_order='name'>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Renewal Type Form View -->
|
<!-- Agreement Renewal Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_renewaltype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_renewaltype_form_view">
|
||||||
<field name="name">Agreement Renewal Type Form</field>
|
<field name="name">Agreement Renewal Type Form</field>
|
||||||
<field name="model">partner_agreement.renewaltype</field>
|
<field name="model">agreement.renewaltype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Type Form">
|
<form string="Agreements Type Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Type"/>
|
<label for="name" class="oe_edit_only" string="Type"/>
|
||||||
<h1><field name="name"/></h1>
|
<h1><field name="name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_renewaltype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_renewaltype">
|
||||||
<field name="name">Agreement Renewal Type</field>
|
<field name="name">Agreement Renewal Type</field>
|
||||||
<field name="res_model">partner_agreement.renewaltype</field>
|
<field name="res_model">agreement.renewaltype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Renewal Types"
|
name="Renewal Types"
|
||||||
id="partner_agreement_renewaltype_menu_1"
|
id="partner_agreement_renewaltype_menu_1"
|
||||||
parent="partner_agreement.menu_3"
|
parent="agreement.partner_agreement_menu_3"
|
||||||
sequence="44"
|
sequence="44"
|
||||||
action="partner_agreement_action_renewaltype"/>
|
action="partner_agreement_action_renewaltype"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,97 +1,96 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- Agreement Sections Sequences-->
|
<!-- Agreement Sections Sequences-->
|
||||||
<record id="seq_agreement_section" model="ir.sequence">
|
<record id="seq_agreement_section" model="ir.sequence">
|
||||||
<field name="name">agreement_section_sequencer</field>
|
<field name="name">agreement_section_sequencer</field>
|
||||||
<field name="code">agreement.section</field>
|
<field name="code">agreement.section</field>
|
||||||
<field name="prefix">0</field>
|
<field name="prefix">0</field>
|
||||||
<field name="padding">1</field>
|
<field name="padding">1</field>
|
||||||
</record>
|
</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">partner_agreement.section</field>
|
<field name="model">agreement.section</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='agreement, section_sequence'>
|
<tree default_order='agreement_id, section_sequence'>
|
||||||
<field name="agreement" string="Agreement"/>
|
<field name="agreement_id" string="Agreement"/>
|
||||||
<field name="section_sequence" string="Sequence"/>
|
<field name="section_sequence" string="Sequence"/>
|
||||||
<field name="name" string="Section Name"/>
|
<field name="name" string="Section Name"/>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Sections Form View -->
|
<!-- Agreement Sections Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_form_view">
|
<record model="ir.ui.view" id="partner_agreement_section_form_view">
|
||||||
<field name="name">Agreement Section Form</field>
|
<field name="name">Agreement Section Form</field>
|
||||||
<field name="model">partner_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="Agreements Section Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<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" string="Section Name"/>
|
||||||
<h1><field name="name" string="Section Name"/></h1>
|
<h1><field name="name" string="Section Name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement" string="Agreement"/>
|
<field name="agreement_id" string="Agreement"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name='content' string="Content"/>
|
<field name='content' string="Content"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Clauses">
|
<page string="Clauses">
|
||||||
<field name="clauses" string="Clauses" context="{'default_section': active_id,'default_agreement': agreement}">
|
<field name="clauses_ids" string="Clauses" context="{'default_section_id': active_id,'default_agreement_id': agreement_id}">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="clause_sequence" widget="handle"/>
|
<field name="clause_sequence" widget="handle"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="content"/>
|
<field name="content"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page string="Dynamic Placeholder Generator">
|
<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.
|
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="model_id"/>
|
||||||
<field name="model_object_field" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
<field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
|
||||||
<field name="sub_object" readonly="1"/>
|
<field name="sub_object_id" readonly="1"/>
|
||||||
<field name="sub_model_object_field" domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"/>
|
<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="null_value"/>
|
||||||
<field name="copyvalue"/>
|
<field name="copyvalue"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
Sequence #<field name="section_sequence" readonly="1"/>
|
Sequence #<field name="section_sequence" readonly="1"/>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Section Search View -->
|
<!-- Agreement Section Search View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_search_view">
|
<record model="ir.ui.view" id="partner_agreement_section_search_view">
|
||||||
<field name="name">Agreement Section Search</field>
|
<field name="name">Agreement Section Search</field>
|
||||||
<field name="model">partner_agreement.section</field>
|
<field name="model">agreement.section</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Agreement Section Search">
|
<search string="Agreement Section Search">
|
||||||
<filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement'}"/>
|
<filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_section">
|
<record model="ir.actions.act_window" id="partner_agreement_action_section">
|
||||||
<field name="name">Agreement Sections</field>
|
<field name="name">Agreement Sections</field>
|
||||||
<field name="res_model">partner_agreement.section</field>
|
<field name="res_model">agreement.section</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sections"
|
name="Sections"
|
||||||
id="partner_agreement_sections_menu_1"
|
id="partner_agreement_sections_menu_1"
|
||||||
parent="partner_agreement.menu_2"
|
parent="agreement.partner_agreement_menu_2"
|
||||||
sequence="31"
|
sequence="31"
|
||||||
action="partner_agreement_action_section"/>
|
action="partner_agreement_action_section"/>
|
||||||
|
</odoo>
|
||||||
</data>
|
|
||||||
</odoo>
|
|
||||||
@@ -1,52 +1,50 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement Stage List View-->
|
<!-- Agreement Stage List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_stage_list_view">
|
<record model="ir.ui.view" id="partner_agreement_stage_list_view">
|
||||||
<field name="name">Agreement Stage List</field>
|
<field name="name">Agreement Stage List</field>
|
||||||
<field name="model">partner_agreement.stage</field>
|
<field name="model">agreement.stage</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='sequence, name'>
|
<tree default_order='sequence, name'>
|
||||||
<field name="sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="name" string="Stage Name"/>
|
<field name="name" string="Stage Name"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Stage Form View -->
|
<!-- Agreement Stage Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_stage_form_view">
|
<record model="ir.ui.view" id="partner_agreement_stage_form_view">
|
||||||
<field name="name">Agreement Stage Form</field>
|
<field name="name">Agreement Stage Form</field>
|
||||||
<field name="model">partner_agreement.stage</field>
|
<field name="model">agreement.stage</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Stage Form">
|
<form string="Agreements Stage Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Stage Name"/>
|
<label for="name" class="oe_edit_only" string="Stage Name"/>
|
||||||
<h1><field name="name" string="Stage Name"/></h1>
|
<h1><field name="name" string="Stage Name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
<field name="fold"/>
|
<field name="fold"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_stage">
|
<record model="ir.actions.act_window" id="partner_agreement_action_stage">
|
||||||
<field name="name">Agreement Stage</field>
|
<field name="name">Agreement Stage</field>
|
||||||
<field name="res_model">partner_agreement.stage</field>
|
<field name="res_model">agreement.stage</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Stages"
|
name="Stages"
|
||||||
id="partner_agreement_stage_menu_1"
|
id="partner_agreement_stage_menu_1"
|
||||||
parent="partner_agreement.menu_3"
|
parent="agreement.partner_agreement_menu_3"
|
||||||
sequence="41"
|
sequence="41"
|
||||||
action="partner_agreement_action_stage"/>
|
action="partner_agreement_action_stage"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,51 +1,49 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement Sub Type List View-->
|
<!-- Agreement Sub Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_subtype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_subtype_list_view">
|
||||||
<field name="name">Agreement Subtype List</field>
|
<field name="name">Agreement Subtype List</field>
|
||||||
<field name="model">partner_agreement.subtype</field>
|
<field name="model">agreement.subtype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree default_order='name'>
|
||||||
<field name="name" string="Sub-Type Name"/>
|
<field name="name" string="Sub-Type Name"/>
|
||||||
<field name="agreement_type" string="Agreement Type"/>
|
<field name="agreement_type_id" string="Agreement Type"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Sub Type Form View -->
|
<!-- Agreement Sub Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_subtype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_subtype_form_view">
|
||||||
<field name="name">Agreement Sub Type Form</field>
|
<field name="name">Agreement Sub Type Form</field>
|
||||||
<field name="model">partner_agreement.subtype</field>
|
<field name="model">agreement.subtype</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreements Sub Type Form">
|
<form string="Agreements Sub Type Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Sub-Type Name"/>
|
<label for="name" class="oe_edit_only" string="Sub-Type Name"/>
|
||||||
<h1><field name="name" string="Sub-Type Name"/></h1>
|
<h1><field name="name" string="Sub-Type Name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement_type" string="Agreement Type" required="True"/>
|
<field name="agreement_type_id" string="Agreement Type" required="True"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_subtype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_subtype">
|
||||||
<field name="name">Agreement Sub Type</field>
|
<field name="name">Agreement Sub Type</field>
|
||||||
<field name="res_model">partner_agreement.subtype</field>
|
<field name="res_model">agreement.subtype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sub-Types"
|
name="Sub-Types"
|
||||||
id="partner_agreement_subtype_menu_1"
|
id="partner_agreement_subtype_menu_1"
|
||||||
parent="partner_agreement.menu_3"
|
parent="agreement.partner_agreement_menu_3"
|
||||||
sequence="43"
|
sequence="43"
|
||||||
action="partner_agreement_action_subtype"/>
|
action="partner_agreement_action_subtype"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,51 +1,49 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- explicit list view definition -->
|
|
||||||
|
|
||||||
<!-- Agreement Type List View-->
|
<!-- Agreement Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_type_list_view">
|
<record model="ir.ui.view" id="partner_agreement_type_list_view">
|
||||||
<field name="name">Agreement Type List</field>
|
<field name="name">Agreement Type List</field>
|
||||||
<field name="model">partner_agreement.type</field>
|
<field name="model">agreement.type</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order='name'>
|
<tree default_order='name'>
|
||||||
<field name="name" string="Type Name"/>
|
<field name="name" string="Type Name"/>
|
||||||
<field name="agreement_subtypes" string="Sub-Types"/>
|
<field name="agreement_subtypes_ids" string="Sub-Types"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Type Form View -->
|
<!-- Agreement Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_type_form_view">
|
<record model="ir.ui.view" id="partner_agreement_type_form_view">
|
||||||
<field name="name">Agreement Type Form</field>
|
<field name="name">Agreement Type Form</field>
|
||||||
<field name="model">partner_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="Agreements Type Form">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Type"/>
|
<label for="name" class="oe_edit_only" string="Type"/>
|
||||||
<h1><field name="name" string="Type Name"/></h1>
|
<h1><field name="name" string="Type Name"/></h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement_subtypes" string="Sub-Types"/>
|
<field name="agreement_subtypes_ids" string="Sub-Types"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- 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 Type</field>
|
||||||
<field name="res_model">partner_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>
|
||||||
|
|
||||||
<!-- Menu Items -->
|
<!-- Menu Items -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Types"
|
name="Types"
|
||||||
id="partner_agreement_type_menu_1"
|
id="partner_agreement_type_menu_1"
|
||||||
parent="partner_agreement.menu_3"
|
parent="agreement.partner_agreement_menu_3"
|
||||||
sequence="42"
|
sequence="42"
|
||||||
action="partner_agreement_action_type"/>
|
action="partner_agreement_action_type"/>
|
||||||
</data>
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,48 +1,49 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<report
|
<report
|
||||||
id="partner_agreement_contract_document"
|
id="partner_agreement_contract_document"
|
||||||
model="partner_agreement.agreement"
|
model="agreement"
|
||||||
string="Contract Document"
|
string="Contract Document"
|
||||||
name="partner_agreement.report_agreement_document"
|
name="agreement.report_agreement_document"
|
||||||
file="partner_agreement.report_agreement_document"
|
file="agreement.report_agreement_document"
|
||||||
report_type="qweb-pdf"/>
|
report_type="qweb-pdf"/>
|
||||||
|
|
||||||
<report
|
<report
|
||||||
id="partner_agreement_contract_document_preview"
|
id="partner_agreement_contract_document_preview"
|
||||||
model="partner_agreement.agreement"
|
model="agreement"
|
||||||
string="Contract Document Preview"
|
string="Contract Document Preview"
|
||||||
name="partner_agreement.report_agreement_document"
|
name="agreement.report_agreement_document"
|
||||||
file="partner_agreement.report_agreement_document"
|
file="agreement.report_agreement_document"
|
||||||
report_type="qweb-html"/>
|
report_type="qweb-html"/>
|
||||||
|
|
||||||
<template id="report_agreement_document">
|
<template id="report_agreement_document">
|
||||||
<t t-name="partner_agreement.report_agreement_document">
|
<t t-name="agreement.report_agreement_document">
|
||||||
<t t-call="web.html_container">
|
<t t-call="web.html_container">
|
||||||
<t t-foreach="docs" t-as="doc">
|
<t t-foreach="docs" t-as="doc">
|
||||||
<t t-call="web.external_layout">
|
<t t-call="web.external_layout">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<h3>!!! THIS IS JUST AN EXAMPLE REPORT TO SHOW HOW SECTIONS/CLAUSES CAN LOOK. MORE WORK IS NEEDED FOR FORMATTING</h3>
|
<h3>!!! THIS IS JUST AN EXAMPLE REPORT TO SHOW HOW SECTIONS/CLAUSES CAN LOOK. MORE WORK IS NEEDED FOR FORMATTING</h3>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tbody class="section_tbody">
|
<tbody class="section_tbody">
|
||||||
<tr t-foreach="doc.sections" t-as="s">
|
<tr t-foreach="doc.sections_ids" t-as="s">
|
||||||
<h3 t-field="s.name"/>
|
<h3 t-field="s.name"/>
|
||||||
<span t-field="s.content"/>
|
<span t-field="s.content"/>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tbody class="clause_tbody">
|
<tbody class="clause_tbody">
|
||||||
<tr t-foreach="s.clauses" t-as="c">
|
<tr t-foreach="s.clauses_ids" t-as="c">
|
||||||
<h4 style="padding:20px" t-field="c.name"/>
|
<h4 style="padding:20px" t-field="c.name"/>
|
||||||
<h5 style="padding:20px" t-field="c.content"/>
|
<h5 style="padding:20px" t-field="c.content"/>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
</odoo>
|
||||||
</odoo>
|
|
||||||
@@ -1,19 +1,17 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="partner_form">
|
<record model="ir.ui.view" id="partner_form">
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<data>
|
<xpath expr="//page[@name='internal_notes']" position="after">
|
||||||
<xpath expr="//page[@name='internal_notes']" position="after">
|
<page name="agreement" string="Agreements">
|
||||||
<page name="agreement" string="Agreements">
|
<group colspan="2" col="2">
|
||||||
<group colspan="2" col="2">
|
<field name="agreements_ids" string="Agreements" />
|
||||||
<field name="agreements" string="Agreements" />
|
</group>
|
||||||
</group>
|
</page>
|
||||||
</page>
|
</xpath>
|
||||||
</xpath>
|
</field>
|
||||||
</data>
|
</record>
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user