Browse Source

[MIG] Migrate partner_noncommercial from 8.0 to 10.0

12.0
Ronald Portier 6 years ago
committed by Holger Brunn
parent
commit
3b5f2a27fe
  1. 17
      partner_noncommercial/README.rst
  2. 3
      partner_noncommercial/__init__.py
  3. 20
      partner_noncommercial/__manifest__.py
  4. 20
      partner_noncommercial/__openerp__.py
  5. 17
      partner_noncommercial/data/ir_translation.xml
  6. 64
      partner_noncommercial/i18n/nl.po
  7. 36
      partner_noncommercial/i18n/partner_noncommercial.pot
  8. 30
      partner_noncommercial/i18n_extra/en.po
  9. 31
      partner_noncommercial/i18n_extra/nl.po
  10. 190
      partner_noncommercial/views/menu.xml
  11. 41
      partner_noncommercial/views/res_partner.xml

17
partner_noncommercial/README.rst

@ -27,10 +27,7 @@ options to work with persons or organisationss.
.. 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/partner-contact/8.0
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
:target: https://runbot.odoo-community.org/runbot/partner-contact/10.0
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -39,9 +36,9 @@ After installing this module a situation has been encountered where the new
menu's were added to the database, but not shown in the UI. This was due to menu's were added to the database, but not shown in the UI. This was due to
partner_left and partner_right not being filled. To solve this, use the partner_left and partner_right not being filled. To solve this, use the
generic solution when the menu-system has been messed up: generic solution when the menu-system has been messed up:
1. stop server
2. drop parent_left and parent_right columns frm ir_ui_menu table
3. start server while updating base module
1. stop server
2. drop parent_left and parent_right columns from ir_ui_menu table
3. start server while updating base module
Bug Tracker Bug Tracker
@ -58,7 +55,8 @@ Credits
Images Images
------ ------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
* Odoo Community Association:
`Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors Contributors
------------ ------------
@ -78,4 +76,5 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.
To contribute to this module, please visit
https://github.com/oca/partner-contact

3
partner_noncommercial/__init__.py

@ -1,3 +1,2 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2016 Therp BV (http://therp.nl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

20
partner_noncommercial/__manifest__.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2018 Therp BV (https://therp.nl).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner Non Commercial',
'version': '10.0.1.0.0',
'author': 'Therp BV,Camptocamp,Odoo Community Association (OCA)',
'website': 'https://github.com/oca/partner-contact',
'complexity': 'normal',
'category': 'Customer Relationship Management',
'license': 'AGPL-3',
'depends': [
'sales_team', # Contains address book configuration
],
'data': [
'views/menu.xml',
'views/res_partner.xml',
],
'installable': True,
}

20
partner_noncommercial/__openerp__.py

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Therp BV (http://therp.nl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner Non Commercial',
'version': '8.0.1.0.0',
"author": "Therp BV,Camptocamp,Odoo Community Association (OCA)",
"complexity": "normal",
"category": "Customer Relationship Management",
'license': 'AGPL-3',
'depends': [
'base',
],
'data': [
'data/ir_translation.xml',
'views/menu.xml',
'views/res_partner.xml',
],
'installable': True,
}

17
partner_noncommercial/data/ir_translation.xml

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'model'), ('name', '=', 'ir.ui.menu,name'), ('res_id', '=', ref('base.menu_base_partner'))]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'model'), ('name', '=', 'ir.ui.menu,name'), ('res_id', '=', ref('base.menu_sales'))]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'model'), ('name', '=', 'ir.actions.act_window,name'), ('res_id', '=', ref('base.action_partner_customer_form'))]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'model'), ('name', '=', 'ir.actions.act_window,name'), ('res_id', '=', ref('base.action_partner_form'))]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'model'), ('name', '=', 'ir.ui.menu,name'), ('res_id', '=', ref('base.menu_partner_form'))]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'view'), ('name', '=', 'res.partner'), ('res_id', '=', 0)]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'view'), ('name', '=', 'res.partner'), ('res_id', '=', 0)]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'view'), ('name', '=', 'res.partner'), ('res_id', '=', 0)]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'view'), ('name', '=', 'res.partner'), ('res_id', '=', 0)]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'field'), ('name', '=', 'res.partner,user_id'), ('res_id', '=', 0)]" />
<delete model="ir.translation" search="[('module', '=', 'base'), ('type', '=', 'field'), ('name', '=', 'res.partner,parent_id'), ('res_id', '=', 0)]" />
</data>
</openerp>

64
partner_noncommercial/i18n/nl.po

@ -1,54 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_noncommercial
# Translation of OpenERP Server.
# #
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 03:19+0000\n"
"PO-Revision-Date: 2017-06-13 03:19+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"Language: nl\n"
"POT-Creation-Date: 2017-12-01 12:32+0000\n"
"PO-Revision-Date: 2012-03-12 09:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: \n"
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_company_form
msgid ""
"<p class=\"oe_view_nocontent_create\">Click to add a company in your address "
"book.</p>"
msgstr ""
"<p class=\"oe_view_nocontent_create\">Klik voor het toevoegen van een "
"organisatie in het adresboek.</p>"
#. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_person_form
msgid ""
"<p class=\"oe_view_nocontent_create\">Click to add a person in your address "
"book.</p>"
msgstr ""
"<p class=\"oe_view_nocontent_create\">Klik voor het toevoegen van een "
"persoon in het adresboek.</p>"
#: model:ir.actions.act_window,name:partner_noncommercial.action_address_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_address_form
msgid "All addresses"
msgstr "Alle adressen"
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_all_partner_form #: model:ir.actions.act_window,name:partner_noncommercial.action_all_partner_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_all_partner_form #: model:ir.ui.menu,name:partner_noncommercial.menu_all_partner_form
#: model:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "All partners" msgid "All partners"
msgstr "Alle relaties" msgstr "Alle relaties"
#. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_person_form
msgid "Click to add a person to your address book."
msgstr "Klik voor het toevoegen van een persoon aan het adresboek."
#. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_company_form
msgid "Click to add an organisation to your address book."
msgstr "Klik voor het toevoegen van een organisatie aan het adresboek."
#. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_address_form
msgid "Click to add item to your address book."
msgstr "Klik voor toevoeging aan het adresboek"
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form #: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form #: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: view:res.partner:partner_noncommercial.view_res_partner_filter
#: model:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations" msgid "Organisations"
msgstr "Organisaties" msgstr "Organisaties"
#. module: partner_noncommercial
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner_main
msgid "Partners"
msgstr "Alle relaties"
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_person_form #: model:ir.actions.act_window,name:partner_noncommercial.action_person_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_person_form #: model:ir.ui.menu,name:partner_noncommercial.menu_person_form

36
partner_noncommercial/i18n/partner_noncommercial.pot

@ -4,8 +4,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 12:32+0000\n"
"PO-Revision-Date: 2017-12-01 12:32+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -14,28 +16,46 @@ msgstr ""
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_company_form
msgid "<p class=\"oe_view_nocontent_create\">Click to add a company in your address book.</p>"
#: model:ir.actions.act_window,name:partner_noncommercial.action_address_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_address_form
msgid "All addresses"
msgstr ""
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_all_partner_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_all_partner_form
#: model:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "All partners"
msgstr "" msgstr ""
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_person_form #: model:ir.actions.act_window,help:partner_noncommercial.action_person_form
msgid "<p class=\"oe_view_nocontent_create\">Click to add a person in your address book.</p>"
msgid "Click to add a person to your address book."
msgstr "" msgstr ""
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_all_partner_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_all_partner_form
msgid "All partners"
#: model:ir.actions.act_window,help:partner_noncommercial.action_company_form
msgid "Click to add an organisation to your address book."
msgstr ""
#. module: partner_noncommercial
#: model:ir.actions.act_window,help:partner_noncommercial.action_address_form
msgid "Click to add item to your address book."
msgstr "" msgstr ""
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form #: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form #: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: view:res.partner:partner_noncommercial.view_res_partner_filter
#: model:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#. module: partner_noncommercial
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner_main
msgid "Partners"
msgstr ""
#. module: partner_noncommercial #. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_person_form #: model:ir.actions.act_window,name:partner_noncommercial.action_person_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_person_form #: model:ir.ui.menu,name:partner_noncommercial.menu_person_form

30
partner_noncommercial/i18n_extra/en.po

@ -1,6 +1,4 @@
# Translation of OpenERP Server. # Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * vwn_crm_base_translations
# #
msgid "" msgid ""
msgstr "" msgstr ""
@ -16,32 +14,14 @@ msgstr ""
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: base #. module: base
#: model:ir.ui.menu,name:base.menu_base_partner
msgid "Sales"
msgstr "Partners"
#. module: base
#: model:ir.ui.menu,name:base.menu_sales
msgid "Sales"
msgstr "Address book"
#. module: base
#: model:ir.actions.act_window,name:base.action_partner_customer_form
#: model:ir.actions.act_window,name:base.action_partner_form
#: model:ir.ui.menu,name:base.menu_partner_form
#: view:res.partner:0 #: view:res.partner:0
msgid "Customers"
msgstr "Customers"
#. module: base
#: view:res.partner:0
msgid "Is a Company?"
msgid "Is a Company?"
msgstr "Is an organisation?" msgstr "Is an organisation?"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base #. module: base
#: view:res.partner:0 #: view:res.partner:0

31
partner_noncommercial/i18n_extra/nl.po

@ -1,6 +1,4 @@
# Translation of OpenERP Server. # Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * vwn_crm_base_translations
# #
msgid "" msgid ""
msgstr "" msgstr ""
@ -16,32 +14,14 @@ msgstr ""
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: base #. module: base
#: model:ir.ui.menu,name:base.menu_base_partner
msgid "Sales"
msgstr "Relaties"
#. module: base
#: model:ir.ui.menu,name:base.menu_sales
msgid "Sales"
msgstr "Adresboek"
#. module: base
#: model:ir.actions.act_window,name:base.action_partner_customer_form
#: model:ir.actions.act_window,name:base.action_partner_form
#: model:ir.ui.menu,name:base.menu_partner_form
#: view:res.partner:0 #: view:res.partner:0
msgid "Customers"
msgstr "Klanten"
#. module: base
#: view:res.partner:0
msgid "Is a Company?"
msgid "Is a Company?"
msgstr "Is een organisatie?" msgstr "Is een organisatie?"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base #. module: base
#: view:res.partner:0 #: view:res.partner:0
@ -54,4 +34,3 @@ msgstr "Verantwoordelijke"
msgid "Related Company" msgid "Related Company"
msgstr "Gerelateerde organisatie" msgstr "Gerelateerde organisatie"

190
partner_noncommercial/views/menu.xml

@ -1,98 +1,110 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Configuring authorities is complicated, because there is a
mismatch between the record ID's used for group names, and the
actual names:
group_user - Employee
group_sale_salesman - User
group_sale_sales_manager - Manager
-->
<!-- Make Partners menu available to all employee's. -->
<record
id="base.menu_base_partner"
model="ir.ui.menu"
>
<field
name="groups_id"
eval="[(4,ref('base.group_user'))]"
/>
</record>
<odoo>
<!--
Configuring authorities is complicated, because there is a
mismatch between the record ID's used for group names, and the
actual names:
base.group_user - Employee
sales_team.group_sale_salesman - User
sales_team.group_sale_sales_manager - Manager
-->
<!-- Provide non-commercial partner menu -->
<menuitem
id="menu_partner_main"
name="Partners"
groups="base.group_user"
sequence="4"
/>
<menuitem
id="menu_partner"
name="Partners"
parent="menu_partner_main"
groups="base.group_user"
sequence="4"
/>
<!-- Limit customer menu to only sales persons. -->
<record
id="base.menu_partner_form"
model="ir.ui.menu"
>
<field
name="groups_id"
eval="[(4,ref('base.group_sale_salesman'))]"
/>
</record>
<!-- Add menu item to show all relations -->
<record id="action_all_partner_form" model="ir.actions.act_window">
<field name="name">All partners</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{"search_default_type_relation": 1}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
</record>
<menuitem
id="menu_all_partner_form"
parent="menu_partner"
action="action_all_partner_form"
sequence="11"
/>
<!-- Add menu item to show all relations -->
<record id="action_all_partner_form" model="ir.actions.act_window">
<field name="name">All partners</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
</record>
<menuitem
id="menu_all_partner_form"
parent="base.menu_sales"
action="action_all_partner_form"
sequence="21"
<!-- Add menu item to show only organisations -->
<record id="action_company_form" model="ir.actions.act_window">
<field name="name">Organisations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{"search_default_type_company": 1,"default_is_company": True}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"
>Click to add an organisation to your address book.</p></field>
</record>
<menuitem
id="menu_company_form"
parent="menu_partner"
action="action_company_form"
sequence="21"
/> />
<!-- Note on formatting:
Make sure there is no unneeded whitespace whatever in the
contents of a help field. Because that will become part of the
pot file on exporting a language, and make translation very
cumbersome.
-->
<!-- Add menu item to show only persons -->
<record id="action_person_form" model="ir.actions.act_window">
<field name="name">Persons</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{"search_default_type_person": 1,"default_is_company": False}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"
>Click to add a person to your address book.</p></field>
</record>
<menuitem
id="menu_person_form"
parent="menu_partner"
action="action_person_form"
sequence="31"
/>
<!-- Add menu item to show only organisations -->
<record id="action_company_form" model="ir.actions.act_window">
<field name="name">Organisations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_type_company": 1,"default_is_company": True}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"
>Click to add a company in your address book.</p></field>
</record>
<menuitem
id="menu_company_form"
parent="base.menu_sales"
action="action_company_form"
sequence="31"
<!-- Add menu item to show all relations and other addresses -->
<record id="action_address_form" model="ir.actions.act_window">
<field name="name">All addresses</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"
>Click to add item to your address book.</p></field>
</record>
<menuitem
id="menu_address_form"
parent="menu_partner"
action="action_address_form"
sequence="41"
/> />
<!-- Add menu item to show only persons -->
<record id="action_person_form" model="ir.actions.act_window">
<field name="name">Persons</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_type_person": 1,"default_is_company": False}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create"
>Click to add a person in your address book.</p></field>
</record>
<menuitem
id="menu_person_form"
parent="base.menu_sales"
action="action_person_form"
sequence="41"
<!-- Move address book configuration to partner menu -->
<menuitem
id="sales_team.menu_config_address_book"
name="Contacts"
parent="menu_partner"
sequence="90"
/> />
</data>
</openerp>
</odoo>

41
partner_noncommercial/views/res_partner.xml

@ -1,13 +1,28 @@
<openerp>
<data>
<record id="view_res_partner_filter" model="ir.ui.view">
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="model">res.partner</field>
<field type="xml" name="arch">
<filter name="type_company" position="attributes">
<attribute name="string">Organisations</attribute>
</filter>
</field>
</record>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_res_partner_filter" model="ir.ui.view">
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="model">res.partner</field>
<field type="xml" name="arch">
<filter name="type_person" position="before">
<filter
string="All partners"
name="type_relation"
domain="['|',('is_company','=',1),('type','=','contact')]"
/>
</filter>
<!-- Default type_person also contains invoice and delivery
addresses for companies (and persons). -->
<filter name="type_person" position="attributes">
<attribute
name="domain"
>[('is_company','=',0),('type','=','contact')]</attribute>
</filter>
<filter name="type_company" position="attributes">
<attribute name="string">Organisations</attribute>
</filter>
</field>
</record>
</odoo>
Loading…
Cancel
Save