Ronald Portier
6 years ago
15 changed files with 337 additions and 238 deletions
-
17partner_noncommercial/README.rst
-
3partner_noncommercial/__init__.py
-
20partner_noncommercial/__manifest__.py
-
20partner_noncommercial/__openerp__.py
-
17partner_noncommercial/data/ir_translation.xml
-
64partner_noncommercial/i18n/nl.po
-
36partner_noncommercial/i18n/partner_noncommercial.pot
-
30partner_noncommercial/i18n_extra/en.po
-
31partner_noncommercial/i18n_extra/nl.po
-
190partner_noncommercial/views/menu.xml
-
41partner_noncommercial/views/res_partner.xml
-
72partner_noncommercial_multi_relation/README.rst
-
2partner_noncommercial_multi_relation/__init__.py
-
21partner_noncommercial_multi_relation/__manifest__.py
-
11partner_noncommercial_multi_relation/views/menu.xml
@ -1,3 +1,2 @@ |
|||
# -*- 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). |
@ -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, |
|||
} |
@ -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, |
|||
} |
@ -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> |
|||
|
@ -1,98 +1,110 @@ |
|||
<?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> |
@ -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> |
@ -0,0 +1,72 @@ |
|||
.. 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 Multi Relation |
|||
===================================== |
|||
|
|||
This is an autoinstallable glue module between partner_noncommercial and |
|||
partner_multi_relation. It will change the partner_multi_relation menu-items |
|||
to be visible on the non commercial partner menu, instead of on the |
|||
standard sales menu. |
|||
|
|||
Installation |
|||
============ |
|||
|
|||
This module should be automatically installed when partner_noncommercial and |
|||
partner_multi_relation are installed. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
This module requires no configuration. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
This module changes the location of the menu_items provided by the |
|||
partner_multi_relation* modules. |
|||
|
|||
.. 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/10.0 |
|||
|
|||
|
|||
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://github.com/oca/partner-contact |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017-2018 Therp BV (https://therp.nl). |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
{ |
|||
'name': 'Partner Non Commercial Multi Relation', |
|||
'version': '10.0.1.0.0', |
|||
'author': 'Therp BV,Odoo Community Association (OCA)', |
|||
'website': 'https://github.com/oca/partner-contact', |
|||
'complexity': 'normal', |
|||
'category': 'Customer Relationship Management', |
|||
'license': 'AGPL-3', |
|||
'depends': [ |
|||
'partner_noncommercial', |
|||
'partner_multi_relation', |
|||
], |
|||
'data': [ |
|||
'views/menu.xml', |
|||
], |
|||
'installable': True, |
|||
'auto_install': True, |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
|
|||
<menuitem |
|||
id="partner_multi_relation.menu_res_partner_relation_sales" |
|||
parent="partner_noncommercial.menu_partner" |
|||
name="Partner Relations" |
|||
sequence="36" |
|||
/> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue