Browse Source

[IMP] Adapt module to 12.0,

- Remove All Partners action and menu entry as this duplicates default contact view;
- Add some commonly used groupings and filters.
nj-12.0-partner_gogocarto_export_api
Ronald Portier 4 years ago
committed by default
parent
commit
0ff89ba6f9
  1. 6
      partner_noncommercial/README.rst
  2. 60
      partner_noncommercial/i18n/nl.po
  3. 37
      partner_noncommercial/i18n/partner_noncommercial.pot
  4. 49
      partner_noncommercial/i18n/sl.po
  5. 6
      partner_noncommercial/readme/USAGE.rst
  6. 6
      partner_noncommercial/static/description/index.html
  7. 83
      partner_noncommercial/views/menu.xml
  8. 42
      partner_noncommercial/views/res_partner.xml

6
partner_noncommercial/README.rst

@ -43,8 +43,10 @@ To configure this module, you need to:
Usage
=====
This module creates a main menu All partners. There it gives special
options to work with persons or organisationss.
This module changes some strings for partners to make them more appropiate
for non-commercial context, especially renaming companies to organisations. It also
adds some filters that are often used in non-commercial settings, although they can
be usefull within companies too.
Bug Tracker

60
partner_noncommercial/i18n/nl.po

@ -1,61 +1,45 @@
# Translation of OpenERP Server.
# Translation of Odoo.
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Project-Id-Version: Odoo 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 12:32+0000\n"
"PO-Revision-Date: 2012-03-12 09:28+0000\n"
"POT-Creation-Date: 2020-09-29 08:28+0000\n"
"PO-Revision-Date: 2020-09-29 09:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"Language-Team: Therp BV - manual translation\n"
"Language: nl\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,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
#: model:ir.actions.act_window,name:partner_noncommercial.action_all_partner_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_all_partner_form
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "All partners"
msgstr "Alle relaties"
#. module: partner_noncommercial
#: model_terms: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_terms: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."
msgid "City"
msgstr "Plaats"
#. module: partner_noncommercial
#: model_terms: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"
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisation"
msgstr "Organisatie"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations"
msgstr "Organisaties"
#. module: partner_noncommercial
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner
msgid "Partners"
msgstr "Alle relaties"
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Type of contact/address"
msgstr "Soort contact/adres"
#. module: partner_noncommercial
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "With address"
msgstr "Met adres"
#. 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"
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "With email"
msgstr "Met email"

37
partner_noncommercial/i18n/partner_noncommercial.pot

@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-29 08:28+0000\n"
"PO-Revision-Date: 2020-09-29 08:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -14,48 +16,37 @@ msgstr ""
"Plural-Forms: \n"
#. module: partner_noncommercial
#: 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_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "All partners"
msgid "City"
msgstr ""
#. module: partner_noncommercial
#: model_terms:ir.actions.act_window,help:partner_noncommercial.action_person_form
msgid "Click to add a person to your address book."
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisation"
msgstr ""
#. module: partner_noncommercial
#: model_terms:ir.actions.act_window,help:partner_noncommercial.action_company_form
msgid "Click to add an organisation to your address book."
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations"
msgstr ""
#. module: partner_noncommercial
#: model_terms:ir.actions.act_window,help:partner_noncommercial.action_address_form
msgid "Click to add item to your address book."
#: model:ir.ui.menu,name:partner_noncommercial.menu_person_form
msgid "Persons"
msgstr ""
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations"
msgid "Type of contact/address"
msgstr ""
#. module: partner_noncommercial
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner
msgid "Partners"
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "With address"
msgstr ""
#. 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"
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "With email"
msgstr ""

49
partner_noncommercial/i18n/sl.po

@ -20,55 +20,6 @@ msgstr ""
"%100==4 ? 2 : 3);\n"
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_address_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_address_form
#, fuzzy
msgid "All addresses"
msgstr "Vsi partnerji"
#. 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_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "All partners"
msgstr "Vsi partnerji"
#. module: partner_noncommercial
#: model_terms:ir.actions.act_window,help:partner_noncommercial.action_person_form
#, fuzzy
msgid "Click to add a person to your address book."
msgstr "<p class=\"oe_view_nocontent_create\">Dodaj osebo v imenik.</p>"
#. module: partner_noncommercial
#: model_terms: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_terms:ir.actions.act_window,help:partner_noncommercial.action_address_form
msgid "Click to add item to your address book."
msgstr ""
#. module: partner_noncommercial
#: model:ir.actions.act_window,name:partner_noncommercial.action_company_form
#: model:ir.ui.menu,name:partner_noncommercial.menu_company_form
#: model_terms:ir.ui.view,arch_db:partner_noncommercial.view_res_partner_filter
msgid "Organisations"
msgstr "Organizacije"
#. module: partner_noncommercial
#: model:ir.ui.menu,name:partner_noncommercial.menu_partner
#, fuzzy
msgid "Partners"
msgstr "Vsi partnerji"
#. 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 "Osebe"
#~ msgid ""
#~ "<p class=\"oe_view_nocontent_create\">Click to add a company in your "
#~ "address book.</p>"
#~ msgstr "<p class=\"oe_view_nocontent_create\">Dodaj podjetje v imenik.</p>"

6
partner_noncommercial/readme/USAGE.rst

@ -1,3 +1,5 @@
This module creates a main menu All partners. There it gives special
options to work with persons or organisationss.
This module changes some strings for partners to make them more appropiate
for non-commercial context, especially renaming companies to organisations. It also
adds some filters that are often used in non-commercial settings, although they can
be usefull within companies too.

6
partner_noncommercial/static/description/index.html

@ -393,8 +393,10 @@ suitable for use in non commercial organisations.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>This module creates a main menu All partners. There it gives special
options to work with persons or organisationss.</p>
<p>This module changes some strings for partners to make them more appropiate
for non-commercial context, especially renaming companies to organisations. It also
adds some filters that are often used in non-commercial settings, although they can
be usefull within companies too.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>

83
partner_noncommercial/views/menu.xml

@ -1,86 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem
id="menu_partner"
name="Partners"
parent="contacts.menu_contacts"
sequence="11"
/>
<!-- Add menu item to show all partners -->
<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_contact": 1}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<!-- Make sure configuration menu is shown as last item. -->
<record id="contacts.res_partner_menu_config" model="ir.ui.menu">
<field name="sequence">990</field>
</record>
<menuitem
id="menu_all_partner_form"
parent="menu_partner"
action="action_all_partner_form"
sequence="11"
/>
<!-- 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"
/>
<!-- 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 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"
/>
</odoo>

42
partner_noncommercial/views/res_partner.xml

@ -4,14 +4,9 @@
<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 name="mode">extension</field>
<field type="xml" name="arch">
<filter name="type_person" position="before">
<filter
string="All partners"
name="type_contact"
domain="['|', ('is_company', '=', True), ('type', '=', 'contact')]"
/>
</filter>
<!-- Default type_person also contains invoice and delivery
addresses for companies (and persons). -->
<filter name="type_person" position="attributes">
@ -19,9 +14,42 @@
name="domain"
>[('is_company', '=', False), ('type', '=', 'contact')]</attribute>
</filter>
<!-- Change string of Company filter to Organisations. -->
<filter name="type_company" position="attributes">
<attribute name="string">Organisations</attribute>
</filter>
<!-- Add extra filters. -->
<filter name="inactive" position="after">
<separator />
<filter
string="With email"
name="filter_email"
domain="[('email', '!=', False)]"
/>
<filter
string="With address"
name="filter_address"
domain="[('street', '!=', False), ('street', '!=', ''),
('city', '!=', False), ('city', '!=', '')]"
/>
</filter>
<!-- Add extra groupings. -->
<filter name="group_country" position="after">
<filter
name="group_city"
string="City"
context="{'group_by': 'city'}"
/>
<filter
name="group_organisation"
string="Organisation"
context="{'group_by': 'commercial_partner_id'}"
/>
</filter>
</field>
</record>

Loading…
Cancel
Save