Browse Source

[ENH] Migration of the 7.0 module partner_noncommercial. (#286)

* [ENH] Migration of the 7.0 module partner_noncommercial.

This used to be part of therp-oe-staging modules, but seems
to be usefull for more organisations that are primarily or completely
non-commercial. The organisations might be put of by the commercial
lingo that is shown by default.

* [FIX] Add name / mail to contributors.
12.0
Ronald Portier 8 years ago
committed by Holger Brunn
parent
commit
8389329d8e
  1. 81
      partner_noncommercial/README.rst
  2. 3
      partner_noncommercial/__init__.py
  3. 20
      partner_noncommercial/__openerp__.py
  4. 17
      partner_noncommercial/data/ir_translation.xml
  5. 45
      partner_noncommercial/i18n/nl.po
  6. 46
      partner_noncommercial/i18n/partner_noncommercial.pot
  7. 55
      partner_noncommercial/i18n_extra/en.po
  8. 57
      partner_noncommercial/i18n_extra/nl.po
  9. 98
      partner_noncommercial/views/menu.xml
  10. 13
      partner_noncommercial/views/res_partner.xml

81
partner_noncommercial/README.rst

@ -0,0 +1,81 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
======================
Partner Non Commercial
======================
This module changes menu and view descriptions to make partner management
suitable for use in non commercial organisations.
Installation
============
Installing this module needs no special actions.
Configuration
=============
This module requires no special configuration.
Usage
=====
This module changes the Sales main menu to relations. There it gives special
options to work with persons or organisationss.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
: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
Known issues / Roadmap
======================
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
partner_left and partner_right not being filled. To solve this, use the
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
Bug Tracker
===========
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.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Ronald Portier <ronald@therp.nl>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

3
partner_noncommercial/__init__.py

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

20
partner_noncommercial/__openerp__.py

@ -0,0 +1,20 @@
# -*- 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

@ -0,0 +1,17 @@
<?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>

45
partner_noncommercial/i18n/nl.po

@ -0,0 +1,45 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * vwn_crm_base_translations
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-12 09:28+0000\n"
"PO-Revision-Date: 2012-03-12 09:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. 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>"
#. 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"
msgstr "Alle relaties"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
msgid "Organisations"
msgstr "Organisaties"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_person_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_person_form
msgid "Persons"
msgstr "Personen"

46
partner_noncommercial/i18n/partner_noncommercial.pot

@ -0,0 +1,46 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * partner_noncommercial
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-11 15:26+0000\n"
"PO-Revision-Date: 2014-06-11 15:26+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. 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\">Click to add a company in your address book.</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\">Click to add a person in your address book.</p>"
#. 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"
msgstr "All partners"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: view:res.partner:0
msgid "Organisations"
msgstr "Organisations"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_person_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_person_form
msgid "Persons"
msgstr "Persons"

55
partner_noncommercial/i18n_extra/en.po

@ -0,0 +1,55 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * vwn_crm_base_translations
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-12 09:28+0000\n"
"PO-Revision-Date: 2012-03-12 09:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. 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
msgid "Customers"
msgstr "Customers"
#. module: base
#: view:res.partner:0
msgid "Is a Company?"
msgstr "Is an organisation?"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base
#: view:res.partner:0
#: field:res.partner,user_id:0
msgid "Salesperson"
msgstr "Responsible"
#. module: base
#: field:res.partner,parent_id:0
msgid "Related Company"
msgstr "Related organisation"

57
partner_noncommercial/i18n_extra/nl.po

@ -0,0 +1,57 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * vwn_crm_base_translations
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-12 09:28+0000\n"
"PO-Revision-Date: 2012-03-12 09:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. 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
msgid "Customers"
msgstr "Klanten"
#. module: base
#: view:res.partner:0
msgid "Is a Company?"
msgstr "Is een organisatie?"
#. module: base
#: view:res.partner:0
msgid "Sales & Purchases"
msgstr "Details"
#. module: base
#: view:res.partner:0
#: field:res.partner,user_id:0
msgid "Salesperson"
msgstr "Verantwoordelijke"
#. module: base
#: field:res.partner,parent_id:0
msgid "Related Company"
msgstr "Gerelateerde organisatie"

98
partner_noncommercial/views/menu.xml

@ -0,0 +1,98 @@
<?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>
<!-- 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">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"
/>
<!-- 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 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 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"
/>
</data>
</openerp>

13
partner_noncommercial/views/res_partner.xml

@ -0,0 +1,13 @@
<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>
Loading…
Cancel
Save