Browse Source

partner_sector: Migration to 9.0

pull/619/head
cubells 8 years ago
committed by mreficent
parent
commit
b0545e4ba1
  1. 8
      partner_sector/README.rst
  2. 1
      partner_sector/__init__.py
  3. 7
      partner_sector/__openerp__.py
  4. 1
      partner_sector/models/__init__.py
  5. 1
      partner_sector/models/res_partner.py
  6. 1
      partner_sector/models/res_partner_sector.py
  7. 1
      partner_sector/tests/__init__.py
  8. 1
      partner_sector/tests/test_res_partner.py
  9. 48
      partner_sector/views/res_partner_sector_view.xml
  10. 87
      partner_sector/views/res_partner_view.xml

8
partner_sector/README.rst

@ -29,7 +29,7 @@ Only companies have sectors.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/134/8.0
:target: https://runbot.odoo-community.org/runbot/134/9.0
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -41,9 +41,8 @@ Bug Tracker
=========== ===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_sector%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
In case of trouble, please check there if your issue has already been reported. If you
spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Credits Credits
======= =======
@ -54,6 +53,7 @@ Contributors
* Rafael Blasco <rafabn@antiun.com> * Rafael Blasco <rafabn@antiun.com>
* Antonio Espinosa <antonioea@antiun.com> * Antonio Espinosa <antonioea@antiun.com>
* Javier Iniesta <javieria@antiun.com> * Javier Iniesta <javieria@antiun.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
Maintainer Maintainer
---------- ----------

1
partner_sector/__init__.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Antonio Espinosa # © 2015 Antiun Ingenieria S.L. - Antonio Espinosa
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models

7
partner_sector/__openerp__.py

@ -1,14 +1,15 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
"name": "Partner Sector", "name": "Partner Sector",
"summary": "Add partner sectors", "summary": "Add partner sectors",
"version": "8.0.1.0.0",
"version": "9.0.1.0.0",
"category": "Customer Relationship Management", "category": "Customer Relationship Management",
"website": "http://www.antiun.com",
"author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)",
"website": "http://www.tecnativa.com",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"application": False, "application": False,
"installable": True, "installable": True,

1
partner_sector/models/__init__.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import res_partner from . import res_partner

1
partner_sector/models/res_partner.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api, exceptions, _ from openerp import models, fields, api, exceptions, _

1
partner_sector/models/res_partner_sector.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api from openerp import models, fields, api

1
partner_sector/tests/__init__.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_res_partner from . import test_res_partner

1
partner_sector/tests/test_res_partner.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta # © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# © 2016 Tecnativa S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase from openerp.tests.common import TransactionCase

48
partner_sector/views/res_partner_sector_view.xml

@ -1,32 +1,30 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Antiun Ingenieria S.L. - Javier Iniesta <!-- © 2015 Antiun Ingenieria S.L. - Javier Iniesta
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<odoo>
<record id="res_partner_sector_action" model="ir.actions.act_window">
<field name="name">Sectors</field>
<field name="res_model">res.partner.sector</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<record id="res_partner_sector_action" model="ir.actions.act_window">
<field name="name">Sectors</field>
<field name="res_model">res.partner.sector</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<record id="res_partner_sector_tree_view" model="ir.ui.view">
<field name="name">Partner Sector tree</field>
<field name="model">res.partner.sector</field>
<field name="arch" type="xml">
<tree string="Sectors" editable="top">
<field name="name"/>
<field name="parent_id"/>
</tree>
</field>
</record>
<record id="res_partner_sector_tree_view" model="ir.ui.view">
<field name="name">Partner Sector tree</field>
<field name="model">res.partner.sector</field>
<field name="arch" type="xml">
<tree string="Sectors" editable="top">
<field name="name"/>
<field name="parent_id"/>
</tree>
</field>
</record>
<menuitem action="res_partner_sector_action"
id="menu_res_partner_sector"
name="Sectors"
parent="base.menu_config_address_book"
sequence="3"/>
<menuitem action="res_partner_sector_action"
id="menu_res_partner_sector"
name="Sectors"
parent="base.menu_config_address_book"
sequence="3"/>
</data>
</openerp>
</odoo>

87
partner_sector/views/res_partner_view.xml

@ -1,54 +1,53 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Antiun Ingenieria S.L. - Javier Iniesta <!-- © 2015 Antiun Ingenieria S.L. - Javier Iniesta
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<odoo>
<record model="ir.ui.view" id="view_partner_form_sector">
<field name="name">Partner form with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phone" position="before">
<field name="sector_id" placeholder="Sector"
options='{"no_open": True}'
attrs="{'invisible': [('is_company', '=', False)]}"/>
<field name="secondary_sector_ids" widget="many2many_tags"
attrs="{'invisible': [('is_company', '=', False)]}"/>
<record model="ir.ui.view" id="view_partner_form_sector">
<field name="name">Partner form with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phone" position="before">
<field name="sector_id" placeholder="Sector"
options='{"no_open": True}'
attrs="{'invisible': [('is_company', '=', False)]}"/>
<field name="secondary_sector_ids" widget="many2many_tags"
attrs="{'invisible': [('is_company', '=', False)]}"/>
</field>
</field> </field>
</field>
</record>
</record>
<record model="ir.ui.view" id="view_partner_tree_sector">
<field name="name">Partner tree with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="email" position="after">
<field name="sector_id"
attrs="{'invisible': [('is_company', '=', False)]}"/>
<record model="ir.ui.view" id="view_partner_tree_sector">
<field name="name">Partner tree with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="email" position="after">
<field name="sector_id"
attrs="{'invisible': [('is_company', '=', False)]}"/>
</field>
</field> </field>
</field>
</record>
</record>
<record model="ir.ui.view" id="view_res_partner_filter_sector">
<field name="name">Partner search with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<field name="category_id" position="after">
<field name="sector_id"
string="Sector"
filter_domain="['|',('sector_id','ilike',self),
('secondary_sector_ids','ilike',self)]"/>
<record model="ir.ui.view" id="view_res_partner_filter_sector">
<field name="name">Partner search with sector</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<field name="category_id" position="after">
<field name="sector_id"
string="Sector"
filter_domain="['|',('sector_id','ilike',self),
('secondary_sector_ids','ilike',self)]"/>
</field>
<filter name="salesperson" position="after">
<filter name="sector"
string="Sector"
domain="[('is_company','=', True)]"
context="{'group_by': 'sector_id'}"/>
</filter>
</field> </field>
<filter string="Salesperson" position="after">
<filter string="Sector"
domain="[('is_company','=', True)]"
context="{'group_by': 'sector_id'}"/>
</filter>
</field>
</record>
</record>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save