Browse Source

[IMP] agreement_serviceprofile

pull/368/head
Maxime Chambreuil 5 years ago
parent
commit
a8314fbd2c
  1. 3
      agreement_serviceprofile/__init__.py
  2. 6
      agreement_serviceprofile/__manifest__.py
  3. 4
      agreement_serviceprofile/data/serviceprofile_stage.xml
  4. 5
      agreement_serviceprofile/models/agreement_serviceprofile.py
  5. 25
      agreement_serviceprofile/readme/CONTRIBUTORS.rst
  6. 15
      agreement_serviceprofile/views/agreement.xml
  7. 6
      agreement_serviceprofile/views/agreement_serviceprofile.xml

3
agreement_serviceprofile/__init__.py

@ -1 +1,4 @@
# Copyright (C) 2018 Pavlov Media
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models from . import models

6
agreement_serviceprofile/__manifest__.py

@ -1,10 +1,10 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# Copyright (C) 2018 Pavlov Media
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
'name': 'Agreement Service Profile', 'name': 'Agreement Service Profile',
'summary': "Adds an Agreement Service Profile object", 'summary': "Adds an Agreement Service Profile object",
'version': '12.0.1.0.0',
'version': '12.0.1.1.0',
'category': 'Contract', 'category': 'Contract',
'author': 'Pavlov Media, ' 'author': 'Pavlov Media, '
'Open Source Integrators, ' 'Open Source Integrators, '

4
agreement_serviceprofile/data/serviceprofile_stage.xml

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- # Copyright (C) 2018 Pavlov Media
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1"> <odoo noupdate="1">
<record id="servpro_stage_draft" model="agreement.stage"> <record id="servpro_stage_draft" model="agreement.stage">

5
agreement_serviceprofile/models/agreement_serviceprofile.py

@ -26,7 +26,10 @@ class AgreementServiceProfile(models.Model):
notes = fields.Text(string="Notes") notes = fields.Text(string="Notes")
product_id = fields.Many2one('product.template', 'Service', product_id = fields.Many2one('product.template', 'Service',
domain="[('type', '=', 'service')]")
domain="[('type', '=', 'service')]",
required=True)
partner_id = fields.Many2one(related='agreement_id.partner_id',
string='Partner')
# Used for Kanban grouped_by view # Used for Kanban grouped_by view
@api.model @api.model

25
agreement_serviceprofile/readme/CONTRIBUTORS.rst

@ -1,7 +1,18 @@
* Patrick Wilson <pwilson@pavlovmedia.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* Brian McMaster <brian@mcmpest.com>
* `Pavlov Media <https://www.pavlovmedia.com>`_:
* Patrick Wilson <pwilson@pavlovmedia.com>
* `Open Source Integrators <https://www.opensourceintegrators.com>`_:
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* `Serpent Consulting Services Pvt. Ltd. <https://www.serpentcs.com>`_:
* Murtuza Saleh <murtuzasaleh@serpentcs.com>
* `Mc Master Lawn and Pest Services <https://www.mcmpest.com>`_:
* Brian McMaster <brian@mcmpest.com>

15
agreement_serviceprofile/views/agreement.xml

@ -11,10 +11,21 @@
<field name="serviceprofile_ids"> <field name="serviceprofile_ids">
<tree> <tree>
<field name="name"/> <field name="name"/>
<field name="product_id"/>
</tree> </tree>
<form> <form>
<field name="name"/>
<field name="notes" placeholder="Add Notes Here..."/>
<group>
<group>
<field name="name"/>
</group>
<group>
<field name="product_id"/>
</group>
</group>
<group string="Notes">
<field name="notes" nolabel="1"
placeholder="Add notes here..."/>
</group>
</form> </form>
</field> </field>
</page> </page>

6
agreement_serviceprofile/views/agreement_serviceprofile.xml

@ -9,6 +9,7 @@
<tree string="Service Profiles" default_order='agreement_id'> <tree string="Service Profiles" default_order='agreement_id'>
<field name="name"/> <field name="name"/>
<field name="agreement_id"/> <field name="agreement_id"/>
<field name="partner_id"/>
<field name="product_id"/> <field name="product_id"/>
<field name="active" invisible="1"/> <field name="active" invisible="1"/>
</tree> </tree>
@ -87,7 +88,10 @@
<search> <search>
<filter string="Agreement" name="group_agreement" <filter string="Agreement" name="group_agreement"
icon="terp-partner" icon="terp-partner"
context="{'group_by':'agreement_id'}"/>
context="{'group_by': 'agreement_id'}"/>
<filter string="Product" name="group_product"
icon="terp-product"
context="{'group_by': 'product_id'}"/>
</search> </search>
</field> </field>
</record> </record>

Loading…
Cancel
Save