Browse Source
Merge pull request #348 from ursais/sc_agree_servicepro
[IMP] agreement_serviceprofile
pull/355/head
Maxime Chambreuil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
48 additions and
5 deletions
-
agreement_serviceprofile/__manifest__.py
-
agreement_serviceprofile/models/__init__.py
-
agreement_serviceprofile/models/agreement.py
-
agreement_serviceprofile/models/agreement_serviceprofile.py
-
agreement_serviceprofile/views/agreement.xml
-
agreement_serviceprofile/views/agreement_serviceprofile.xml
|
@ -15,6 +15,7 @@ |
|
|
'data': [ |
|
|
'data': [ |
|
|
'security/ir.model.access.csv', |
|
|
'security/ir.model.access.csv', |
|
|
'views/agreement_serviceprofile.xml', |
|
|
'views/agreement_serviceprofile.xml', |
|
|
|
|
|
'views/agreement.xml' |
|
|
], |
|
|
], |
|
|
'development_status': 'Beta', |
|
|
'development_status': 'Beta', |
|
|
'maintainers': [ |
|
|
'maintainers': [ |
|
|
|
@ -1 +1,2 @@ |
|
|
from . import agreement_serviceprofile |
|
|
from . import agreement_serviceprofile |
|
|
|
|
|
from . import agreement |
|
@ -0,0 +1,12 @@ |
|
|
|
|
|
# Copyright (C) 2018 - TODAY, Open Source Integrators |
|
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
|
|
from odoo import fields, models |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Agreement(models.Model): |
|
|
|
|
|
_inherit = 'agreement' |
|
|
|
|
|
|
|
|
|
|
|
serviceprofile_ids = fields.One2many('agreement.serviceprofile', |
|
|
|
|
|
'agreement_id', |
|
|
|
|
|
string="Service Profiles") |
|
@ -12,8 +12,10 @@ class AgreementServiceProfile(models.Model): |
|
|
name = fields.Char(string="Name", required=True) |
|
|
name = fields.Char(string="Name", required=True) |
|
|
agreement_id = fields.Many2one('agreement', string="Agreement", |
|
|
agreement_id = fields.Many2one('agreement', string="Agreement", |
|
|
ondelete="cascade") |
|
|
ondelete="cascade") |
|
|
active = fields.Boolean( |
|
|
|
|
|
string="Active", |
|
|
|
|
|
|
|
|
active = fields.Boolean(string="Active", |
|
|
default=True, |
|
|
default=True, |
|
|
help="If unchecked, it will allow you to hide this service profile" |
|
|
|
|
|
|
|
|
help="If unchecked, it will allow you " + |
|
|
|
|
|
"to hide this service profile" |
|
|
" without removing it.") |
|
|
" without removing it.") |
|
|
|
|
|
|
|
|
|
|
|
notes = fields.Text(string="Notes") |
|
@ -0,0 +1,24 @@ |
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
|
|
<odoo> |
|
|
|
|
|
<!-- Agreement Form View --> |
|
|
|
|
|
<record id="agreement_fsm_order_form_view" model="ir.ui.view"> |
|
|
|
|
|
<field name="name">agreement.form.fsm.order.view</field> |
|
|
|
|
|
<field name="model">agreement</field> |
|
|
|
|
|
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view"/> |
|
|
|
|
|
<field name="arch" type="xml"> |
|
|
|
|
|
<notebook position="inside"> |
|
|
|
|
|
<page name="serviceprofiles" string="Service Profiles"> |
|
|
|
|
|
<field name="serviceprofile_ids"> |
|
|
|
|
|
<tree> |
|
|
|
|
|
<field name="name"/> |
|
|
|
|
|
</tree> |
|
|
|
|
|
<form> |
|
|
|
|
|
<field name="name"/> |
|
|
|
|
|
<field name="notes" placeholder="Add Notes Here..."/> |
|
|
|
|
|
</form> |
|
|
|
|
|
</field> |
|
|
|
|
|
</page> |
|
|
|
|
|
</notebook> |
|
|
|
|
|
</field> |
|
|
|
|
|
</record> |
|
|
|
|
|
</odoo> |
|
@ -40,6 +40,9 @@ |
|
|
</group> |
|
|
</group> |
|
|
<group></group> |
|
|
<group></group> |
|
|
</group> |
|
|
</group> |
|
|
|
|
|
<group string="Notes"> |
|
|
|
|
|
<field name="notes" nolabel="1" widget="html"/> |
|
|
|
|
|
</group> |
|
|
</sheet> |
|
|
</sheet> |
|
|
</form> |
|
|
</form> |
|
|
</field> |
|
|
</field> |
|
|