[ADD] Notes to ServPro, add ServPro to Agreement

[IMP] Flake8

[IMP] github changes

[IMP] Placeholder in notes remove <p><br></p>
This commit is contained in:
scampbell
2019-06-10 12:33:51 -07:00
parent 44d140e579
commit 297e031e0b
6 changed files with 48 additions and 5 deletions

View File

@@ -15,6 +15,7 @@
'data': [
'security/ir.model.access.csv',
'views/agreement_serviceprofile.xml',
'views/agreement.xml'
],
'development_status': 'Beta',
'maintainers': [

View File

@@ -1 +1,2 @@
from . import agreement_serviceprofile
from . import agreement

View File

@@ -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")

View File

@@ -12,8 +12,10 @@ class AgreementServiceProfile(models.Model):
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.")
active = fields.Boolean(string="Active",
default=True,
help="If unchecked, it will allow you " +
"to hide this service profile"
" without removing it.")
notes = fields.Text(string="Notes")

View File

@@ -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>

View File

@@ -40,6 +40,9 @@
</group>
<group></group>
</group>
<group string="Notes">
<field name="notes" nolabel="1" widget="html"/>
</group>
</sheet>
</form>
</field>