mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[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:
@@ -15,6 +15,7 @@
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/agreement_serviceprofile.xml',
|
||||
'views/agreement.xml'
|
||||
],
|
||||
'development_status': 'Beta',
|
||||
'maintainers': [
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from . import agreement_serviceprofile
|
||||
from . import agreement
|
||||
|
||||
12
agreement_serviceprofile/models/agreement.py
Normal file
12
agreement_serviceprofile/models/agreement.py
Normal 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")
|
||||
@@ -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",
|
||||
active = fields.Boolean(string="Active",
|
||||
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.")
|
||||
|
||||
notes = fields.Text(string="Notes")
|
||||
|
||||
24
agreement_serviceprofile/views/agreement.xml
Normal file
24
agreement_serviceprofile/views/agreement.xml
Normal 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>
|
||||
@@ -40,6 +40,9 @@
|
||||
</group>
|
||||
<group></group>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
<field name="notes" nolabel="1" widget="html"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user