Browse Source
Merge pull request #237 from ursais/11.0-imp-agreement
Merge pull request #237 from ursais/11.0-imp-agreement
[IMP] agreement 11.0.0.1.0pull/239/head
Maxime Chambreuil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 477 additions and 308 deletions
-
5agreement/__manifest__.py
-
3agreement/models/__init__.py
-
24agreement/models/agreement.py
-
24agreement/models/agreement_appendix.py
-
65agreement/models/agreement_clause.py
-
24agreement/models/agreement_recital.py
-
65agreement/models/agreement_section.py
-
18agreement/models/agreement_serviceprofile.py
-
1agreement/models/agreement_stage.py
-
15agreement/models/agreement_status.py
-
16agreement/models/agreement_subtype.py
-
18agreement/models/agreement_type.py
-
5agreement/models/product_template.py
-
1agreement/models/res_partner.py
-
42agreement/report/agreement.xml
-
6agreement/security/ir.model.access.csv
-
61agreement/views/agreement.xml
-
68agreement/views/agreement_appendix.xml
-
68agreement/views/agreement_clause.xml
-
68agreement/views/agreement_recital.xml
-
62agreement/views/agreement_section.xml
-
62agreement/views/agreement_serviceprofile.xml
-
13agreement/views/agreement_subtype.xml
-
18agreement/views/agreement_type.xml
-
33agreement/views/menu.xml
@ -0,0 +1,24 @@ |
|||
# Copyright (C) 2018 - TODAY, Pavlov Media |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class AgreementAppendix(models.Model): |
|||
_name = 'agreement.appendix' |
|||
_description = 'Agreement Appendices' |
|||
_order = "sequence" |
|||
|
|||
name = fields.Char(string="Name", required=True) |
|||
title = fields.Char(string="Title", required=True, |
|||
help="The title is displayed on the PDF." |
|||
"The name is not.") |
|||
sequence = fields.Integer(string="Sequence", default=10) |
|||
content = fields.Html(string="Content") |
|||
agreement_id = fields.Many2one('agreement', string="Agreement", |
|||
ondelete="cascade") |
|||
active = fields.Boolean( |
|||
string="Active", |
|||
default=True, |
|||
help="If unchecked, it will allow you to hide this appendix without " |
|||
"removing it.") |
@ -0,0 +1,24 @@ |
|||
# Copyright (C) 2018 - TODAY, Pavlov Media |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class AgreementRecital(models.Model): |
|||
_name = 'agreement.recital' |
|||
_description = 'Agreement Recitals' |
|||
_order = "sequence" |
|||
|
|||
name = fields.Char(string="Name", required=True) |
|||
title = fields.Char(string="Title", |
|||
help="The title is displayed on the PDF." |
|||
"The name is not.") |
|||
sequence = fields.Integer(string="Sequence", default=10) |
|||
content = fields.Html(string="Content") |
|||
agreement_id = fields.Many2one('agreement', string="Agreement", |
|||
ondelete="cascade") |
|||
active = fields.Boolean( |
|||
string="Active", |
|||
default=True, |
|||
help="If unchecked, it will allow you to hide this recital without " |
|||
"removing it.") |
@ -0,0 +1,18 @@ |
|||
# Copyright (C) 2018 - TODAY, Pavlov Media |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class AgreementServiceProfile(models.Model): |
|||
_name = 'agreement.serviceprofile' |
|||
_description = 'Agreement Service Profiles' |
|||
|
|||
name = fields.Char(string="Name", required=True) |
|||
agreement_id = fields.Many2one('agreement', string="Agreement", |
|||
ondelete="cascade") |
|||
active = fields.Boolean( |
|||
string="Active", |
|||
default=True, |
|||
help="If unchecked, it will allow you to hide this service profile" |
|||
" without removing it.") |
@ -1,15 +0,0 @@ |
|||
# Copyright (C) 2018 - TODAY, Pavlov Media |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import models, fields |
|||
|
|||
|
|||
# Main Agreement Status Records Model |
|||
class AgreementStatus(models.Model): |
|||
_name = 'agreement.type' |
|||
|
|||
# General |
|||
name = fields.Char( |
|||
string="Title", |
|||
required=True |
|||
) |
@ -1,19 +1,13 @@ |
|||
# Copyright (C) 2018 - TODAY, Pavlov Media |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import models, fields |
|||
from odoo import fields, models |
|||
|
|||
|
|||
# Main Agreement Section Records Model |
|||
class AgreementSubtype(models.Model): |
|||
_name = 'agreement.subtype' |
|||
_description = 'Agreement Subtypes' |
|||
|
|||
# General |
|||
name = fields.Char( |
|||
string="Title", |
|||
required=True |
|||
) |
|||
agreement_type_id = fields.Many2one( |
|||
'agreement.type', |
|||
string="Agreement Type" |
|||
) |
|||
name = fields.Char(string="Name", required=True) |
|||
agreement_type_id = fields.Many2one('agreement.type', |
|||
string="Agreement Type") |
@ -1,20 +1,14 @@ |
|||
# 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 fields, models |
|||
|
|||
|
|||
# Main Agreement Section Records Model |
|||
class AgreementType(models.Model): |
|||
_name = 'agreement.type' |
|||
_description = 'Agreement Types' |
|||
|
|||
# General |
|||
name = fields.Char( |
|||
string="Title", |
|||
required=True |
|||
) |
|||
agreement_subtypes_ids = fields.One2many( |
|||
'agreement.subtype', |
|||
'agreement_type_id', |
|||
string="Agreement" |
|||
) |
|||
name = fields.Char(string="Name", required=True) |
|||
agreement_subtypes_ids = fields.One2many('agreement.subtype', |
|||
'agreement_type_id', |
|||
string="Subtypes") |
@ -0,0 +1,68 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
|
|||
<!-- Agreement Appendix List View--> |
|||
<record model="ir.ui.view" id="agreement_appendix_tree"> |
|||
<field name="name">Agreement Appendix Tree</field> |
|||
<field name="model">agreement.appendix</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Appendices" default_order='agreement_id, sequence'> |
|||
<field name="sequence" widget="handle"/> |
|||
<field name="name"/> |
|||
<field name="title"/> |
|||
<field name="agreement_id"/> |
|||
<field name="active" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Appendix Form View --> |
|||
<record model="ir.ui.view" id="agreement_appendix_form"> |
|||
<field name="name">Agreement Appendix Form</field> |
|||
<field name="model">agreement.appendix</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Appendix"> |
|||
<sheet> |
|||
<div class="oe_button_box" name="button_box"> |
|||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> |
|||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/> |
|||
</button> |
|||
</div> |
|||
<div class="oe_title"> |
|||
<label for="name" class="oe_edit_only"/> |
|||
<h1><field name="name"/></h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="title"/> |
|||
<field name="agreement_id"/> |
|||
</group> |
|||
<group> |
|||
<field name="sequence"/> |
|||
</group> |
|||
</group> |
|||
<field name="content" widget="html"/> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Appendix Search View --> |
|||
<record model="ir.ui.view" id="agreement_appendix_search"> |
|||
<field name="name">Agreement Appendix Search</field> |
|||
<field name="model">agreement.appendix</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Actions opening views on models --> |
|||
<record model="ir.actions.act_window" id="agreement_appendix_action"> |
|||
<field name="name">Appendices</field> |
|||
<field name="res_model">agreement.appendix</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,68 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
|
|||
<!-- Agreement Recital List View--> |
|||
<record model="ir.ui.view" id="agreement_recital_tree"> |
|||
<field name="name">Agreement Recital Tree</field> |
|||
<field name="model">agreement.recital</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Recitals" default_order='agreement_id, sequence'> |
|||
<field name="sequence" widget="handle"/> |
|||
<field name="name"/> |
|||
<field name="title"/> |
|||
<field name="agreement_id"/> |
|||
<field name="active" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Recital Form View --> |
|||
<record model="ir.ui.view" id="agreement_recital_form"> |
|||
<field name="name">Agreement Recital Form</field> |
|||
<field name="model">agreement.recital</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Recital"> |
|||
<sheet> |
|||
<div class="oe_button_box" name="button_box"> |
|||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> |
|||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/> |
|||
</button> |
|||
</div> |
|||
<div class="oe_title"> |
|||
<label for="name" class="oe_edit_only"/> |
|||
<h1><field name="name"/></h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="title"/> |
|||
<field name="agreement_id"/> |
|||
</group> |
|||
<group> |
|||
<field name="sequence"/> |
|||
</group> |
|||
</group> |
|||
<field name="content" widget="html"/> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Recital Search View --> |
|||
<record model="ir.ui.view" id="agreement_recital_search"> |
|||
<field name="name">Agreement Recital Search</field> |
|||
<field name="model">agreement.recital</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Actions opening views on models --> |
|||
<record model="ir.actions.act_window" id="agreement_recital_action"> |
|||
<field name="name">Recitals</field> |
|||
<field name="res_model">agreement.recital</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,62 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
|
|||
<!-- Agreement Service Profile List View--> |
|||
<record model="ir.ui.view" id="agreement_serviceprofile_tree"> |
|||
<field name="name">Agreement Service Profile Tree</field> |
|||
<field name="model">agreement.serviceprofile</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Service Profiles" default_order='agreement_id'> |
|||
<field name="name"/> |
|||
<field name="agreement_id"/> |
|||
<field name="active" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Service Profile Form View --> |
|||
<record model="ir.ui.view" id="agreement_serviceprofile_form"> |
|||
<field name="name">Agreement Service Profile Form</field> |
|||
<field name="model">agreement.serviceprofile</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Service Profile"> |
|||
<sheet> |
|||
<div class="oe_button_box" name="button_box"> |
|||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> |
|||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/> |
|||
</button> |
|||
</div> |
|||
<div class="oe_title"> |
|||
<label for="name" class="oe_edit_only"/> |
|||
<h1><field name="name"/></h1> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="agreement_id"/> |
|||
</group> |
|||
<group></group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Agreement Service Profile Search View --> |
|||
<record model="ir.ui.view" id="agreement_serviceprofile_search"> |
|||
<field name="name">Agreement Service Profile Search</field> |
|||
<field name="model">agreement.serviceprofile</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Actions opening views on models --> |
|||
<record model="ir.actions.act_window" id="agreement_serviceprofile_action"> |
|||
<field name="name">Service Profiles</field> |
|||
<field name="res_model">agreement.serviceprofile</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue