Browse Source
Prepare module for OCA.
Prepare module for OCA.
This means: - Add proper README. - Use new-style copyright & license headers. - Update translation. - Remove .pot. - Drop CRM dependency. - Move fields into Sales & Purchases tab. - Rename some fields. - Probably something more.pull/224/head
Jairo Llopis
9 years ago
15 changed files with 242 additions and 467 deletions
-
82partner_capital/README.rst
-
9partner_capital/__init__.py
-
31partner_capital/__openerp__.py
-
155partner_capital/i18n/crm_capital.pot
-
146partner_capital/i18n/es.po
-
16partner_capital/models/__init__.py
-
37partner_capital/models/crm_lead.py
-
12partner_capital/models/crm_turnover_range.py
-
25partner_capital/models/res_partner.py
-
14partner_capital/models/res_partner_turnover_range.py
-
8partner_capital/security/ir.model.access.csv
-
78partner_capital/views/crm_lead_view.xml
-
29partner_capital/views/crm_turnover_range_view.xml
-
33partner_capital/views/res_partner_turnover_range_view.xml
-
34partner_capital/views/res_partner_view.xml
@ -1,18 +1,82 @@ |
|||
Capital in CRM |
|||
================ |
|||
.. 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 |
|||
|
|||
This module allows to set capital country, capital registered and turnover |
|||
for companies in the CRM main objects (lead, opportunity, partner), and |
|||
propagate them through the workflow. |
|||
=============== |
|||
Partners Capital |
|||
=============== |
|||
|
|||
By capital country we mean country of origin of the capital of the company |
|||
By capital registered we mean the amount of money registered in comercial |
|||
registry, aka social capital or just capital of a company |
|||
By turnover we can define a range an a concret amount |
|||
This module extends the functionality of partners to support setting capital |
|||
country, registered capital amount and turnover. |
|||
|
|||
By capital country we mean country of origin of the capital of the company. |
|||
|
|||
By registered capital amount we mean the amount of money registered in the |
|||
corresponding commercial registry, A.K.A. social capital or just capital of a |
|||
company. |
|||
|
|||
By turnover we can define a range for a concrete amount. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
To use this module, you need to: |
|||
|
|||
* Go to any partner's form. |
|||
* You will find the new fields in *Sales & Purchases > Capital*. |
|||
|
|||
To manage turnover ranges, you need to: |
|||
|
|||
* Go to *Sales > Configuration > Address Book > Turnover ranges*. |
|||
|
|||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|||
:alt: Try me on Runbot |
|||
:target: https://runbot.odoo-community.org/runbot/134/8.0 |
|||
|
|||
Known issues / Roadmap |
|||
====================== |
|||
|
|||
* Add automatic rules to calculate turnover range and company size. |
|||
* Allow customization of company sizes. |
|||
|
|||
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 |
|||
<https://github.com/OCA/ |
|||
partner-contact/issues/new?body=module:%20 |
|||
partner_capital%0Aversion:%20 |
|||
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Images |
|||
------ |
|||
|
|||
* `Antiun Ingeniería S.L. <http://www.antiun.com>`_: Icon. |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Antonio Espinosa <antonioea@antiun.com> |
|||
* Rafael Blasco <rafabn@antiun.com> |
|||
* Jairo Llopis <yajo.sk8@gmail.com> |
|||
|
|||
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. |
@ -1,6 +1,7 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# For copyright and license notices, see __openerp__.py file in root directory |
|||
############################################################################## |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) |
|||
# Antonio Espinosa <antonioea@antiun.com> |
|||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
@ -1,155 +0,0 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * crm_capital |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2015-05-26 15:15+0000\n" |
|||
"PO-Revision-Date: 2015-05-26 15:15+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: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Big" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_leads_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_oppor_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: field:crm.lead,capital_country:0 |
|||
#: view:res.partner:crm_capital.view_partner_form_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#: field:res.partner,capital_country:0 |
|||
msgid "Capital country" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.lead,capital_registered:0 |
|||
#: field:res.partner,capital_registered:0 |
|||
msgid "Capital registered" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: field:crm.lead,company_size:0 |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#: field:res.partner,company_size:0 |
|||
msgid "Company size" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: help:crm.lead,capital_country:0 |
|||
#: help:res.partner,capital_country:0 |
|||
msgid "Country of origin of the capital of this company" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,id:0 |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: model:ir.model,name:crm_capital.model_crm_lead |
|||
msgid "Lead/Opportunity" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Medium" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Micro" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,name:0 |
|||
msgid "Name" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: model:ir.model,name:crm_capital.model_res_partner |
|||
msgid "Partner" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
msgid "Sales Team" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
msgid "Salesperson" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Small" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
msgid "Turnover" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.lead,turnover_number:0 |
|||
#: field:res.partner,turnover_number:0 |
|||
msgid "Turnover number" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_leads_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_oppor_capital |
|||
#: field:crm.lead,turnover_range:0 |
|||
#: model:ir.model,name:crm_capital.model_crm_turnover_range |
|||
#: view:res.partner:crm_capital.view_partner_form_capital |
|||
#: field:res.partner,turnover_range:0 |
|||
msgid "Turnover range" |
|||
msgstr "" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.turnover_range:crm_capital.crm_turnover_range_tree_view |
|||
#: model:ir.actions.act_window,name:crm_capital.crm_turnover_range_action |
|||
#: model:ir.ui.menu,name:crm_capital.menu_crm_turnover_range |
|||
msgid "Turnover ranges" |
|||
msgstr "" |
|||
|
@ -1,155 +1,133 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * crm_capital |
|||
# * partner_capital |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2015-05-26 15:15+0000\n" |
|||
"PO-Revision-Date: 2015-05-26 15:15+0000\n" |
|||
"POT-Creation-Date: 2015-12-16 17:27+0000\n" |
|||
"PO-Revision-Date: 2015-12-16 18:29+0100\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Content-Transfer-Encoding: 8bit\n" |
|||
"Plural-Forms: \n" |
|||
"Language: es\n" |
|||
"X-Generator: Poedit 1.8.5\n" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#. module: partner_capital |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Big" |
|||
msgstr "Grande" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_leads_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_oppor_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: field:crm.lead,capital_country:0 |
|||
#: view:res.partner:crm_capital.view_partner_form_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#. module: partner_capital |
|||
#: view:res.partner:partner_capital.view_partner_form_capital |
|||
msgid "Capital" |
|||
msgstr "Capital" |
|||
|
|||
#. module: partner_capital |
|||
#: field:res.partner,capital_amount:0 |
|||
msgid "Capital amount" |
|||
msgstr "Capital amount" |
|||
|
|||
#. module: partner_capital |
|||
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
|||
#: field:res.partner,capital_country:0 |
|||
msgid "Capital country" |
|||
msgstr "Nacionalidad del capital" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.lead,capital_registered:0 |
|||
#: field:res.partner,capital_registered:0 |
|||
msgid "Capital registered" |
|||
msgstr "Capital social" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: field:crm.lead,company_size:0 |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#. module: partner_capital |
|||
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
|||
#: field:res.partner,company_size:0 |
|||
msgid "Company size" |
|||
msgstr "Tamaño de la companía" |
|||
|
|||
#. module: crm_capital |
|||
#: help:crm.lead,capital_country:0 |
|||
#. module: partner_capital |
|||
#: help:res.partner,capital_country:0 |
|||
msgid "Country of origin of the capital of this company" |
|||
msgstr "País de origen del capital social de esta empresa" |
|||
msgid "Country of origin of this company's capital." |
|||
msgstr "País de origen del capital de esta empresa." |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,create_uid:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "Creado por" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,create_date:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "Creado en" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,id:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,id:0 |
|||
msgid "ID" |
|||
msgstr "ID" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,write_uid:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "Última actualización por" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,write_date:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "última actualización en" |
|||
|
|||
#. module: crm_capital |
|||
#: model:ir.model,name:crm_capital.model_crm_lead |
|||
msgid "Lead/Opportunity" |
|||
msgstr "Iniciativa/Oportunidad" |
|||
msgstr "Última actualización en" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#. module: partner_capital |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Medium" |
|||
msgstr "Medio" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#. module: partner_capital |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Micro" |
|||
msgstr "Micro" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.turnover_range,name:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner.turnover_range,name:0 |
|||
msgid "Name" |
|||
msgstr "Nombre" |
|||
|
|||
#. module: crm_capital |
|||
#: model:ir.model,name:crm_capital.model_res_partner |
|||
#. module: partner_capital |
|||
#: model:ir.model,name:partner_capital.model_res_partner |
|||
msgid "Partner" |
|||
msgstr "Empresa" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
msgid "Sales Team" |
|||
msgstr "Equipo de ventas" |
|||
#. module: partner_capital |
|||
#: help:res.partner,capital_amount:0 |
|||
msgid "Publicly registered capital amount." |
|||
msgstr "Importe del capital públicamente registrado." |
|||
|
|||
#. module: crm_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#. module: partner_capital |
|||
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
|||
msgid "Salesperson" |
|||
msgstr "Comercial" |
|||
|
|||
#. module: crm_capital |
|||
#: selection:crm.lead,company_size:0 |
|||
#. module: partner_capital |
|||
#: selection:res.partner,company_size:0 |
|||
msgid "Small" |
|||
msgstr "Pequeño" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_leads_filter_capital |
|||
#: view:crm.lead:crm_capital.view_crm_case_opportunities_filter_capital |
|||
#: view:res.partner:crm_capital.view_res_partner_filter_capital |
|||
#. module: partner_capital |
|||
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
|||
msgid "Turnover" |
|||
msgstr "Facturación" |
|||
|
|||
#. module: crm_capital |
|||
#: field:crm.lead,turnover_number:0 |
|||
#: field:res.partner,turnover_number:0 |
|||
msgid "Turnover number" |
|||
msgstr "Número de facturación" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_leads_capital |
|||
#: view:crm.lead:crm_capital.crm_case_form_view_oppor_capital |
|||
#: field:crm.lead,turnover_range:0 |
|||
#: model:ir.model,name:crm_capital.model_crm_turnover_range |
|||
#: view:res.partner:crm_capital.view_partner_form_capital |
|||
#: field:res.partner,turnover_range:0 |
|||
#. module: partner_capital |
|||
#: field:res.partner,turnover_amount:0 |
|||
msgid "Turnover amount" |
|||
msgstr "Cantidad de facturación" |
|||
|
|||
#. module: partner_capital |
|||
#: model:ir.model,name:partner_capital.model_res_partner_turnover_range |
|||
#: field:res.partner,turnover_range_id:0 |
|||
msgid "Turnover range" |
|||
msgstr "Rango de facturación" |
|||
|
|||
#. module: crm_capital |
|||
#: view:crm.turnover_range:crm_capital.crm_turnover_range_tree_view |
|||
#: model:ir.actions.act_window,name:crm_capital.crm_turnover_range_action |
|||
#: model:ir.ui.menu,name:crm_capital.menu_crm_turnover_range |
|||
#. module: partner_capital |
|||
#: model:ir.actions.act_window,name:partner_capital.res_partner_turnover_range_action |
|||
#: model:ir.ui.menu,name:partner_capital.menu_res_partner_turnover_range |
|||
#: view:res.partner.turnover_range:partner_capital.res_partner_turnover_range_tree_view |
|||
msgid "Turnover ranges" |
|||
msgstr "Rangos de facturación" |
|||
|
@ -1,8 +1,10 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# For copyright and license notices, see __openerp__.py file in root directory |
|||
############################################################################## |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) |
|||
# Antonio Espinosa <antonioea@antiun.com> |
|||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import crm_turnover_range |
|||
from . import crm_lead |
|||
from . import res_partner |
|||
from . import ( |
|||
res_partner_turnover_range, |
|||
res_partner, |
|||
) |
@ -1,37 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# For copyright and license notices, see __openerp__.py file in root directory |
|||
############################################################################## |
|||
from openerp import models, fields |
|||
|
|||
|
|||
class CrmLead(models.Model): |
|||
_inherit = 'crm.lead' |
|||
|
|||
capital_country = fields.Many2one( |
|||
'res.country', string="Capital country", |
|||
help="Country of origin of the capital of this company") |
|||
capital_registered = fields.Integer(string="Capital registered") |
|||
turnover_range = fields.Many2one(comodel_name='crm.turnover_range') |
|||
turnover_number = fields.Integer() |
|||
company_size = fields.Selection( |
|||
string="Company size", |
|||
selection=[('micro', 'Micro'), ('small', 'Small'), |
|||
('medium', 'Medium'), ('big', 'Big')]) |
|||
|
|||
def _lead_create_contact(self, cr, uid, lead, name, is_company, |
|||
parent_id=False, context=None): |
|||
"""Propagate capital_country and capital_registered to created partner. |
|||
""" |
|||
partner_id = super(CrmLead, self)._lead_create_contact( |
|||
cr, uid, lead, name, is_company, parent_id=parent_id, |
|||
context=context) |
|||
self.pool['res.partner'].write( |
|||
cr, uid, partner_id, { |
|||
'capital_country': lead.capital_country.id, |
|||
'capital_registered': lead.capital_registered, |
|||
'turnover_range': lead.turnover_range.id, |
|||
'turnover_number': lead.turnover_number, |
|||
'company_size': lead.company_size, |
|||
}, context=context) |
|||
return partner_id |
@ -1,12 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# For copyright and license notices, see __openerp__.py file in root directory |
|||
############################################################################## |
|||
from openerp import models, fields |
|||
|
|||
|
|||
class CrmTurnoverRange(models.Model): |
|||
_name = 'crm.turnover_range' |
|||
_description = "Turnover range" |
|||
|
|||
name = fields.Char(required=True, translate=True) |
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) |
|||
# Antonio Espinosa <antonioea@antiun.com> |
|||
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from openerp import models, fields |
|||
|
|||
|
|||
class ResPartnerTurnoverRange(models.Model): |
|||
_name = 'res.partner.turnover_range' |
|||
_description = "Turnover range" |
|||
|
|||
name = fields.Char(required=True, translate=True) |
@ -1,5 +1,5 @@ |
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
|||
"access_crm_turnover_public","crm_turnover_range group_public","model_crm_turnover_range","base.group_public",1,0,0,0 |
|||
"access_crm_turnover_portal","crm_turnover_range group_portal","model_crm_turnover_range","base.group_portal",1,0,0,0 |
|||
"access_crm_turnover_group_partner_manager","crm_turnover_range group_partner_manager","model_crm_turnover_range","base.group_partner_manager",1,1,1,1 |
|||
"access_crm_turnover_group_user","crm_turnover_range group_user","model_crm_turnover_range","base.group_user",1,0,0,0 |
|||
"access_crm_turnover_public","res_partner_turnover_range group_public","model_res_partner_turnover_range","base.group_public",1,0,0,0 |
|||
"access_crm_turnover_portal","res_partner_turnover_range group_portal","model_res_partner_turnover_range","base.group_portal",1,0,0,0 |
|||
"access_crm_turnover_group_partner_manager","res_partner_turnover_range group_partner_manager","model_res_partner_turnover_range","base.group_partner_manager",1,1,1,1 |
|||
"access_crm_turnover_group_user","res_partner_turnover_range group_user","model_res_partner_turnover_range","base.group_user",1,0,0,0 |
@ -1,78 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record model="ir.ui.view" id="crm_case_form_view_leads"> |
|||
<field name="name">Add capital fields</field> |
|||
<field name="model">crm.lead</field> |
|||
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="partner_id" position="before"> |
|||
<field name="capital_country" placeholder="Capital country" |
|||
options='{"no_open": True}'/> |
|||
<field name="capital_registered"/> |
|||
<field name="turnover_range" placeholder="Turnover range" |
|||
options='{"no_open": True}'/> |
|||
<field name="turnover_number"/> |
|||
<field name="company_size"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_crm_case_leads_filter"> |
|||
<field name="name">Add capital fields for grouping</field> |
|||
<field name="model">crm.lead</field> |
|||
<field name="inherit_id" ref="crm.view_crm_case_leads_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<filter string="Sales Team" position="after"> |
|||
<filter string="Capital country" |
|||
domain="[]" |
|||
context="{'group_by': 'capital_country'}"/> |
|||
<filter string="Turnover" |
|||
domain="[]" |
|||
context="{'group_by': 'turnover_number'}"/> |
|||
<filter string="Company size" |
|||
domain="[]" |
|||
context="{'group_by': 'company_size'}"/> |
|||
</filter> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="crm_case_form_view_oppor"> |
|||
<field name="name">Add capital fields</field> |
|||
<field name="model">crm.lead</field> |
|||
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="partner_id" position="before"> |
|||
<field name="capital_country" placeholder="Capital country" |
|||
options='{"no_open": True}'/> |
|||
<field name="capital_registered"/> |
|||
<field name="turnover_range" placeholder="Turnover range" |
|||
options='{"no_open": True}'/> |
|||
<field name="turnover_number"/> |
|||
<field name="company_size"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_crm_case_opportunities_filter"> |
|||
<field name="name">Add capital fields for grouping</field> |
|||
<field name="model">crm.lead</field> |
|||
<field name="inherit_id" ref="crm.view_crm_case_opportunities_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<filter string="Sales Team" position="after"> |
|||
<filter string="Capital country" |
|||
domain="[]" |
|||
context="{'group_by': 'capital_country'}"/> |
|||
<filter string="Turnover" |
|||
domain="[]" |
|||
context="{'group_by': 'turnover_number'}"/> |
|||
<filter string="Company size" |
|||
domain="[]" |
|||
context="{'group_by': 'company_size'}"/> |
|||
</filter> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -1,29 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="crm_turnover_range_action" model="ir.actions.act_window"> |
|||
<field name="name">Turnover ranges</field> |
|||
<field name="res_model">crm.turnover_range</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
|
|||
<record id="crm_turnover_range_tree_view" model="ir.ui.view"> |
|||
<field name="name">CRM Turnover range tree</field> |
|||
<field name="model">crm.turnover_range</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Turnover ranges" editable="top"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem action="crm_turnover_range_action" |
|||
id="menu_crm_turnover_range" |
|||
name="Turnover ranges" |
|||
parent="base.menu_crm_config_lead" |
|||
sequence="5"/> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- © 2015 Antiun Ingeniería S.L. - Antonio Espinosa |
|||
© 2015 Antiun Ingeniería S.L. - Jairo Llopis |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="res_partner_turnover_range_action" model="ir.actions.act_window"> |
|||
<field name="name">Turnover ranges</field> |
|||
<field name="res_model">res.partner.turnover_range</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
|
|||
<record id="res_partner_turnover_range_tree_view" model="ir.ui.view"> |
|||
<field name="name">CRM Turnover range tree</field> |
|||
<field name="model">res.partner.turnover_range</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Turnover ranges" editable="top"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem action="res_partner_turnover_range_action" |
|||
id="menu_res_partner_turnover_range" |
|||
name="Turnover ranges" |
|||
parent="base.menu_config_address_book" |
|||
sequence="5"/> |
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue