diff --git a/partner_handbill/i18n/es.po b/partner_handbill/i18n/es.po
deleted file mode 100644
index dfcadcb1115..00000000000
--- a/partner_handbill/i18n/es.po
+++ /dev/null
@@ -1,43 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * partner_handbill
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-05 10:29+0000\n"
-"PO-Revision-Date: 2015-08-05 12:30+0100\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: \n"
-"X-Generator: Poedit 1.5.4\n"
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Confirmed purchase order"
-msgstr "Pedido de compra confirmado"
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Group By"
-msgstr "Agrupar por"
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-#: field:res.partner,handbill:0
-msgid "Handbill"
-msgstr "Prospecto"
-
-#. module: partner_handbill
-#: model:ir.model,name:partner_handbill.model_res_partner
-msgid "Partner"
-msgstr "Empresa"
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Suppliers"
-msgstr "Proveedores"
diff --git a/partner_handbill/i18n/partner_handbill.pot b/partner_handbill/i18n/partner_handbill.pot
deleted file mode 100644
index 5cd81a5db1d..00000000000
--- a/partner_handbill/i18n/partner_handbill.pot
+++ /dev/null
@@ -1,43 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * partner_handbill
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-05 10:29+0000\n"
-"PO-Revision-Date: 2015-08-05 10:29+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_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Confirmed purchase order"
-msgstr ""
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Group By"
-msgstr ""
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-#: field:res.partner,handbill:0
-msgid "Handbill"
-msgstr ""
-
-#. module: partner_handbill
-#: model:ir.model,name:partner_handbill.model_res_partner
-msgid "Partner"
-msgstr ""
-
-#. module: partner_handbill
-#: view:res.partner:partner_handbill.partner_extended_search_view
-msgid "Suppliers"
-msgstr ""
-
diff --git a/partner_handbill/README.rst b/partner_prospect/README.rst
similarity index 85%
rename from partner_handbill/README.rst
rename to partner_prospect/README.rst
index 20ba3943995..2759225906a 100644
--- a/partner_handbill/README.rst
+++ b/partner_prospect/README.rst
@@ -1,10 +1,12 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
-Partner handbill
+Partner prospect
================
-This module controls with a check if a costumer has a sale order confirmed.
+With this module you can easily distinguise if a partner is currently customer
+or prospect. A prospect partner will be those to which you still haven't sold
+anything, considering sales as non cancelled nor draft sale orders to that partner.
Usage
diff --git a/partner_handbill/__init__.py b/partner_prospect/__init__.py
similarity index 100%
rename from partner_handbill/__init__.py
rename to partner_prospect/__init__.py
diff --git a/partner_handbill/__openerp__.py b/partner_prospect/__openerp__.py
similarity index 61%
rename from partner_handbill/__openerp__.py
rename to partner_prospect/__openerp__.py
index d3b20c0c4b2..ad0b1d0abd9 100644
--- a/partner_handbill/__openerp__.py
+++ b/partner_prospect/__openerp__.py
@@ -15,18 +15,26 @@
# along with this program. If not, see .
#
##############################################################################
+
{
- "name": "Partner handbill",
+ "name": "Partner Prospect",
"version": "1.0",
"author": "AvanzOSC, "
- "Serv. Tecnol. Avanzados - Pedro M. Baeza",
- "website": "www.avanzosc.es",
- "category": "MISC",
- "contributors": ["Esther Martín ",
- "Pedro M. Baeza ",
- "Ana Juaristi ",
- "Oihane Crucelaegui "],
- "depends": ["base", "sale"],
- "data": ["views/partner_view.xml"],
+ "Serv. Tecnol. Avanzados - Pedro M. Baeza,"
+ "Odoo Community Association (OCA)",
+ "website": "http://www.avanzosc.es",
+ "category": "Sales Management",
+ "contributors": [
+ "Esther Martín ",
+ "Pedro M. Baeza ",
+ "Ana Juaristi ",
+ "Oihane Crucelaegui ",
+ ],
+ "depends": [
+ "sale",
+ ],
+ "data": [
+ "views/res_partner_view.xml",
+ ],
"installable": True
}
diff --git a/partner_prospect/i18n/es.po b/partner_prospect/i18n/es.po
new file mode 100644
index 00000000000..898354fecae
--- /dev/null
+++ b/partner_prospect/i18n/es.po
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * partner_prospect
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-08-12 12:31+0000\n"
+"PO-Revision-Date: 2015-08-12 12:31+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_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Group By"
+msgstr "Agrupar por"
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Actual Customer"
+msgstr "Cliente real"
+
+#. module: partner_prospect
+#: model:ir.model,name:partner_prospect.model_res_partner
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+#: field:res.partner,prospect:0
+msgid "Prospect"
+msgstr "Cliente eventual"
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Suppliers"
+msgstr "Proveedores"
+
diff --git a/partner_prospect/i18n/partner_prospect.pot b/partner_prospect/i18n/partner_prospect.pot
new file mode 100644
index 00000000000..3c47d85a418
--- /dev/null
+++ b/partner_prospect/i18n/partner_prospect.pot
@@ -0,0 +1,43 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * partner_prospect
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-08-12 12:31+0000\n"
+"PO-Revision-Date: 2015-08-12 12:31+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_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Group By"
+msgstr ""
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Actual Customer"
+msgstr ""
+
+#. module: partner_prospect
+#: model:ir.model,name:partner_prospect.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+#: field:res.partner,prospect:0
+msgid "Prospect"
+msgstr ""
+
+#. module: partner_prospect
+#: view:res.partner:partner_prospect.res_partner_prospect_search_view
+msgid "Suppliers"
+msgstr ""
+
diff --git a/partner_handbill/models/__init__.py b/partner_prospect/models/__init__.py
similarity index 89%
rename from partner_handbill/models/__init__.py
rename to partner_prospect/models/__init__.py
index 8eea9180bc8..09361e42b34 100644
--- a/partner_handbill/models/__init__.py
+++ b/partner_prospect/models/__init__.py
@@ -3,4 +3,4 @@
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
-from . import partner_handbill
+from . import res_partner
diff --git a/partner_handbill/models/partner_handbill.py b/partner_prospect/models/res_partner.py
similarity index 69%
rename from partner_handbill/models/partner_handbill.py
rename to partner_prospect/models/res_partner.py
index 7216f906b93..40a89d3cfbf 100644
--- a/partner_handbill/models/partner_handbill.py
+++ b/partner_prospect/models/res_partner.py
@@ -11,9 +11,9 @@ class ResPartner(models.Model):
@api.one
@api.depends('sale_order_ids', 'sale_order_ids.state')
- def _compute_handbill(self):
- self.handbill = not self.sale_order_ids.filtered(
+ def _compute_prospect(self):
+ self.prospect = not self.sale_order_ids.filtered(
lambda r: r.state not in ('draft', 'sent', 'cancel'))
- handbill = fields.Boolean(string='Handbill', readonly=True,
- compute='_compute_handbill', store=True)
+ prospect = fields.Boolean(
+ string='Prospect', compute='_compute_prospect', store=True)
diff --git a/partner_prospect/static/description/icon.png b/partner_prospect/static/description/icon.png
new file mode 100644
index 00000000000..3a0328b516c
Binary files /dev/null and b/partner_prospect/static/description/icon.png differ
diff --git a/partner_handbill/tests/__init__.py b/partner_prospect/tests/__init__.py
similarity index 100%
rename from partner_handbill/tests/__init__.py
rename to partner_prospect/tests/__init__.py
diff --git a/partner_handbill/tests/test_partner_handbill.py b/partner_prospect/tests/test_partner_prospect.py
similarity index 56%
rename from partner_handbill/tests/test_partner_handbill.py
rename to partner_prospect/tests/test_partner_prospect.py
index 1ed61da5228..c6554a7c845 100644
--- a/partner_handbill/tests/test_partner_handbill.py
+++ b/partner_prospect/tests/test_partner_prospect.py
@@ -6,33 +6,29 @@
from openerp.tests.common import TransactionCase
-class TestPartnerHandbill(TransactionCase):
+class TestPartnerProspect(TransactionCase):
def setUp(self):
- super(TestPartnerHandbill, self).setUp()
+ super(TestPartnerProspect, self).setUp()
self.sale_order_model = self.env['sale.order']
self.partner_model = self.env['res.partner']
self.partner1 = self.partner_model.create({'name': 'Partner1'})
self.partner2 = self.partner_model.create({'name': 'Partner2'})
self.product = self.env.ref('product.product_product_4')
self.sale_order_line_model = self.env['sale.order.line']
- self.sale_order_partner1 = self.sale_order_model.create(
- {'partner_id': self.partner1.id,
- 'order_policy': 'manual',
- 'order_line': [(0, 0, {
- 'product_id': self.product.id,
- })],
- })
+ self.sale_order_partner1 = self.sale_order_model.create({
+ 'partner_id': self.partner1.id,
+ 'order_policy': 'manual',
+ 'order_line': [(0, 0, {'product_id': self.product.id, })],
+ })
self.sale_order_partner1.action_button_confirm()
- self.sale_order_partner2 = self.sale_order_model.create(
- {'partner_id': self.partner2.id,
- 'order_policy': 'manual',
- 'order_line': [(0, 0, {
- 'product_id': self.product.id,
- })],
- })
+ self.sale_order_partner2 = self.sale_order_model.create({
+ 'partner_id': self.partner2.id,
+ 'order_policy': 'manual',
+ 'order_line': [(0, 0, {'product_id': self.product.id, })],
+ })
self.sale_order_partner2.action_quotation_send()
- def test_partner_handbill_check(self):
- self.assertFalse(self.partner1.handbill, 'Partner is handbill')
- self.assertTrue(self.partner2.handbill, 'Partner2 is not handbill')
+ def test_partner_prospect_check(self):
+ self.assertFalse(self.partner1.prospect, 'Partner1 is a prospect')
+ self.assertTrue(self.partner2.prospect, 'Partner2 is not a prospect')
diff --git a/partner_handbill/views/partner_view.xml b/partner_prospect/views/res_partner_view.xml
similarity index 54%
rename from partner_handbill/views/partner_view.xml
rename to partner_prospect/views/res_partner_view.xml
index 55ce84ddea5..042d0b359d1 100644
--- a/partner_handbill/views/partner_view.xml
+++ b/partner_prospect/views/res_partner_view.xml
@@ -1,46 +1,46 @@
-
- partner.extended.form
+
+ res.partner.prospect.form
res.partner
-
- partner.extended.tree
+
+ res.partner.prospect.tree
res.partner
-
+
-
- partner.extended.search
+
+ res.partner.prospect.search
res.partner
-
+
+
+
-
+
-
+
- {
- "search_default_customer":1,
- "search_default_handbill":1}
+ {"search_default_customer": 1, "search_default_noprospect": 1}