Ronald Portier
6 years ago
committed by
Holger Brunn
11 changed files with 231 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
@ -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). |
@ -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"?> |
<?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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue