Iván Todorovich
9 years ago
42 changed files with 1379 additions and 0 deletions
-
4README.md
-
82partner_capital/README.rst
-
6partner_capital/__init__.py
-
21partner_capital/__openerp__.py
-
133partner_capital/i18n/es.po
-
9partner_capital/models/__init__.py
-
33partner_capital/models/res_partner.py
-
13partner_capital/models/res_partner_turnover_range.py
-
5partner_capital/security/ir.model.access.csv
-
BINpartner_capital/static/description/icon.png
-
31partner_capital/views/res_partner_turnover_range_view.xml
-
49partner_capital/views/res_partner_view.xml
-
75partner_contact_department/README.rst
-
9partner_contact_department/__init__.py
-
29partner_contact_department/__openerp__.py
-
93partner_contact_department/i18n/es.po
-
9partner_contact_department/models/__init__.py
-
38partner_contact_department/models/res_partner.py
-
5partner_contact_department/security/ir.model.access.csv
-
BINpartner_contact_department/static/description/icon.png
-
47partner_contact_department/views/res_partner_department_view.xml
-
49partner_contact_department/views/res_partner_view.xml
-
74partner_contact_job_position/README.rst
-
9partner_contact_job_position/__init__.py
-
29partner_contact_job_position/__openerp__.py
-
101partner_contact_job_position/i18n/es.po
-
9partner_contact_job_position/models/__init__.py
-
38partner_contact_job_position/models/res_partner.py
-
5partner_contact_job_position/security/ir.model.access.csv
-
BINpartner_contact_job_position/static/description/icon.png
-
42partner_contact_job_position/views/res_partner_job_position_view.xml
-
41partner_contact_job_position/views/res_partner_view.xml
-
72partner_employee_quantity/README.rst
-
6partner_employee_quantity/__init__.py
-
24partner_employee_quantity/__openerp__.py
-
91partner_employee_quantity/i18n/es.po
-
6partner_employee_quantity/models/__init__.py
-
25partner_employee_quantity/models/res_partner.py
-
5partner_employee_quantity/security/ir.model.access.csv
-
BINpartner_employee_quantity/static/description/icon.png
-
27partner_employee_quantity/views/res_partner_employee_quantity_range_view.xml
-
35partner_employee_quantity/views/res_partner_view.xml
@ -0,0 +1,82 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
================ |
||||
|
Partners Capital |
||||
|
================ |
||||
|
|
||||
|
This module extends the functionality of partners to support setting the |
||||
|
country of origin of capital, 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. |
@ -0,0 +1,6 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,21 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
{ |
||||
|
'name': 'Partners Capital', |
||||
|
'version': '8.0.1.0.0', |
||||
|
'category': 'Customer Relationship Management', |
||||
|
'author': 'Antiun Ingeniería S.L.', |
||||
|
'website': 'http://www.antiun.com', |
||||
|
'depends': [ |
||||
|
'base', |
||||
|
], |
||||
|
'data': [ |
||||
|
'views/res_partner_turnover_range_view.xml', |
||||
|
'views/res_partner_view.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
], |
||||
|
"installable": True, |
||||
|
} |
@ -0,0 +1,133 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * partner_capital |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 8.0\n" |
||||
|
"Report-Msgid-Bugs-To: \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: 8bit\n" |
||||
|
"Plural-Forms: \n" |
||||
|
"Language: es\n" |
||||
|
"X-Generator: Poedit 1.8.5\n" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: selection:res.partner,company_size:0 |
||||
|
msgid "Big" |
||||
|
msgstr "Grande" |
||||
|
|
||||
|
#. 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: 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: partner_capital |
||||
|
#: help:res.partner,capital_country:0 |
||||
|
msgid "Country of origin of this company's capital." |
||||
|
msgstr "País de origen del capital de esta empresa." |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Creado por" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Creado en" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Última actualización por" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Última actualización en" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: selection:res.partner,company_size:0 |
||||
|
msgid "Medium" |
||||
|
msgstr "Medio" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: selection:res.partner,company_size:0 |
||||
|
msgid "Micro" |
||||
|
msgstr "Micro" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: field:res.partner.turnover_range,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nombre" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: model:ir.model,name:partner_capital.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Empresa" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: help:res.partner,capital_amount:0 |
||||
|
msgid "Publicly registered capital amount." |
||||
|
msgstr "Importe del capital públicamente registrado." |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Comercial" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: selection:res.partner,company_size:0 |
||||
|
msgid "Small" |
||||
|
msgstr "Pequeño" |
||||
|
|
||||
|
#. module: partner_capital |
||||
|
#: view:res.partner:partner_capital.view_res_partner_filter_capital |
||||
|
msgid "Turnover" |
||||
|
msgstr "Facturación" |
||||
|
|
||||
|
#. 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: 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" |
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from . import ( |
||||
|
res_partner_turnover_range, |
||||
|
res_partner, |
||||
|
) |
@ -0,0 +1,33 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from openerp import models, fields |
||||
|
|
||||
|
|
||||
|
class ResPartner(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
capital_country_id = fields.Many2one( |
||||
|
'res.country', |
||||
|
"Capital country", |
||||
|
oldname="capital_country", |
||||
|
help="Country of origin of this company's capital.") |
||||
|
capital_amount = fields.Float( |
||||
|
"Capital amount", |
||||
|
oldname="capital_registered", |
||||
|
help="Publicly registered capital amount.") |
||||
|
capital_currency_id = fields.Many2one( |
||||
|
"res.currency", |
||||
|
string="Capital currency") |
||||
|
turnover_range_id = fields.Many2one( |
||||
|
'res.partner.turnover_range', |
||||
|
"Turnover range", |
||||
|
oldname="turnover_range") |
||||
|
turnover_amount = fields.Float( |
||||
|
oldname="turnover_number") |
||||
|
company_size = fields.Selection( |
||||
|
string="Company size", |
||||
|
selection=[('micro', 'Micro'), ('small', 'Small'), |
||||
|
('medium', 'Medium'), ('big', 'Big')]) |
@ -0,0 +1,13 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from openerp import models, fields |
||||
|
|
||||
|
|
||||
|
class ResPartnerTurnoverRange(models.Model): |
||||
|
_name = 'res.partner.turnover_range' |
||||
|
_description = "Turnover range" |
||||
|
|
||||
|
name = fields.Char(required=True, translate=True) |
@ -0,0 +1,5 @@ |
|||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
||||
|
"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 |
After Width: 128 | Height: 128 | Size: 19 KiB |
@ -0,0 +1,31 @@ |
|||||
|
<?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" |
||||
|
parent="base.menu_config_address_book"/> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,49 @@ |
|||||
|
<?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 model="ir.ui.view" id="view_partner_form_capital"> |
||||
|
<field name="name">Partner form with capital info</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="/form/sheet/group"> |
||||
|
<group name="captial" |
||||
|
string="Capital" |
||||
|
attrs="{'invisible': [('is_company', '=', False)]}"> |
||||
|
<field name="capital_amount"/> |
||||
|
<field name="capital_currency_id"/> |
||||
|
<field name="capital_country_id"/> |
||||
|
<field name="turnover_amount"/> |
||||
|
<field name="turnover_range_id"/> |
||||
|
<field name="company_size"/> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_res_partner_filter_capital"> |
||||
|
<field name="name">Partner search with capital</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_res_partner_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<filter string="Salesperson" position="after"> |
||||
|
<filter string="Capital country" |
||||
|
domain="[('is_company', '=', True)]" |
||||
|
context="{'group_by': 'capital_country_id'}"/> |
||||
|
<filter string="Turnover" |
||||
|
domain="[('is_company', '=', True)]" |
||||
|
context="{'group_by': 'turnover_range_id'}"/> |
||||
|
<filter string="Company size" |
||||
|
domain="[('is_company', '=', True)]" |
||||
|
context="{'group_by': 'company_size'}"/> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,75 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
================== |
||||
|
Contact department |
||||
|
================== |
||||
|
|
||||
|
This module extends the functionality of the address book to support |
||||
|
departments. |
||||
|
|
||||
|
Department is a drop-down field in partner forms, and it refers to contact |
||||
|
department in its own company. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
To configure departments, you need to: |
||||
|
|
||||
|
* Go to *Sales > Configuration > Address Book > Departments*. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
* Go to any partner's form. |
||||
|
* You will find the new *Department* field below *Job Position*. |
||||
|
|
||||
|
.. 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 |
||||
|
|
||||
|
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_contact_department%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 |
||||
|
------------ |
||||
|
|
||||
|
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
* 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. |
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 |
@ -0,0 +1,29 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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). |
||||
|
|
||||
|
{ |
||||
|
'name': 'Contact department', |
||||
|
"summary": "Assign contacts to departments", |
||||
|
'version': '8.0.1.0.0', |
||||
|
'category': 'Customer Relationship Management', |
||||
|
'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza, ' |
||||
|
'Antiun Ingeniería S.L., ' |
||||
|
"Odoo Community Association (OCA)", |
||||
|
"license": "AGPL-3", |
||||
|
'website': 'http://www.antiun.com', |
||||
|
"application": False, |
||||
|
'depends': [ |
||||
|
'base', |
||||
|
], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/res_partner_department_view.xml', |
||||
|
'views/res_partner_view.xml', |
||||
|
], |
||||
|
"installable": True, |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * crm_partner_department |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 8.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-12-21 16:54+0100\n" |
||||
|
"PO-Revision-Date: 2015-12-21 16:55+0100\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"Language: es\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.8.5\n" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,child_ids:0 |
||||
|
msgid "Child departments" |
||||
|
msgstr "Departamentos hijo" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Creado por" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Creado en" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: model:ir.model,name:partner_contact_department.model_res_partner_department |
||||
|
#: view:res.partner:partner_contact_department.view_partner_form_department |
||||
|
#: view:res.partner:partner_contact_department.view_res_partner_filter_department |
||||
|
#: field:res.partner,department_id:0 |
||||
|
msgid "Department" |
||||
|
msgstr "Departamento" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: model:ir.actions.act_window,name:partner_contact_department.res_partner_department_action |
||||
|
#: model:ir.ui.menu,name:partner_contact_department.menu_res_partner_department |
||||
|
#: view:res.partner.department:partner_contact_department.res_partner_department_tree_view |
||||
|
msgid "Departments" |
||||
|
msgstr "Departamentos" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Última actualización por" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Última actualización en" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nombre" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,parent_id:0 |
||||
|
msgid "Parent department" |
||||
|
msgstr "Departamento padre" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,parent_left:0 |
||||
|
msgid "Parent left" |
||||
|
msgstr "Padre izquierdo" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: field:res.partner.department,parent_right:0 |
||||
|
msgid "Parent right" |
||||
|
msgstr "Padre derecho" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: model:ir.model,name:partner_contact_department.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Empresa" |
||||
|
|
||||
|
#. module: partner_contact_department |
||||
|
#: view:res.partner:partner_contact_department.view_res_partner_filter_department |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Comercial" |
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 res_partner |
@ -0,0 +1,38 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 ResPartner(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
department_id = fields.Many2one( |
||||
|
"res.partner.department", |
||||
|
"Department", |
||||
|
oldname="department") |
||||
|
|
||||
|
|
||||
|
class ResPartnerDepartment(models.Model): |
||||
|
_name = 'res.partner.department' |
||||
|
_order = "parent_left" |
||||
|
_parent_order = "name" |
||||
|
_parent_store = True |
||||
|
_description = "Department" |
||||
|
|
||||
|
name = fields.Char(required=True, translate=True) |
||||
|
parent_id = fields.Many2one( |
||||
|
"res.partner.department", |
||||
|
"Parent department") |
||||
|
child_ids = fields.One2many( |
||||
|
"res.partner.department", |
||||
|
"parent_id", |
||||
|
"Child departments", |
||||
|
oldname="children") |
||||
|
parent_left = fields.Integer(index=True) |
||||
|
parent_right = fields.Integer(index=True) |
@ -0,0 +1,5 @@ |
|||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
||||
|
"access_res_partner_department_public","res_partner_department group_public","model_res_partner_department","base.group_public",1,0,0,0 |
||||
|
"access_res_partner_department_portal","res_partner_department group_portal","model_res_partner_department","base.group_portal",1,0,0,0 |
||||
|
"access_res_partner_department_group_partner_manager","res_partner_department group_partner_manager","model_res_partner_department","base.group_partner_manager",1,1,1,1 |
||||
|
"access_res_partner_department_group_user","res_partner_department group_user","model_res_partner_department","base.group_user",1,0,0,0 |
After Width: 128 | Height: 128 | Size: 22 KiB |
@ -0,0 +1,47 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza |
||||
|
© 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_department_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Departments</field> |
||||
|
<field name="res_model">res.partner.department</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="res_partner_department_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">CRM department tree</field> |
||||
|
<field name="model">res.partner.department</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Departments" editable="top"> |
||||
|
<field name="name"/> |
||||
|
<field name="parent_id"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="res_partner_department_form_view" model="ir.ui.view"> |
||||
|
<field name="name">CRM department form</field> |
||||
|
<field name="model">res.partner.department</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
<field name="parent_id"/> |
||||
|
<field name="child_ids"/> |
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem action="res_partner_department_action" |
||||
|
id="menu_res_partner_department" |
||||
|
parent="base.menu_config_address_book"/> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,49 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza |
||||
|
© 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 model="ir.ui.view" id="view_partner_form_department"> |
||||
|
<field name="name">Partner form with department</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//sheet/group//field[@name='function']" position="after"> |
||||
|
<field name="department_id" |
||||
|
placeholder="Department" |
||||
|
attrs="{'invisible': [('is_company','=', True)]}" |
||||
|
options='{"no_open": True}'/> |
||||
|
</xpath> |
||||
|
<xpath expr="//field[@name='child_ids']/form//field[@name='function']" |
||||
|
position="after"> |
||||
|
<field name="is_company" invisible="True"/> |
||||
|
<field name="department_id" |
||||
|
placeholder="Department" |
||||
|
attrs="{'invisible': [('is_company','=', True)]}" |
||||
|
options='{"no_open": True}'/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_res_partner_filter_department"> |
||||
|
<field name="name">Partner search with department</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_res_partner_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="category_id" position="after"> |
||||
|
<field name="department_id"/> |
||||
|
</field> |
||||
|
<filter string="Salesperson" position="after"> |
||||
|
<filter string="Department" |
||||
|
domain="[('is_company', '=', False)]" |
||||
|
context="{'group_by': 'department_id'}"/> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,74 @@ |
|||||
|
.. 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 job position |
||||
|
==================== |
||||
|
|
||||
|
This module extends the functionality of partners job position to support |
||||
|
having them categorized in tree form and allow you to choose a categorized job |
||||
|
position for your contacts in addition to the current custom string for job |
||||
|
position. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
To configure job positions, you need to: |
||||
|
|
||||
|
* Go to *Sales > Configuration > Address Book > Job Positions*. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
* Go to any partner's form. |
||||
|
* Use the new *Categorized job position* field. |
||||
|
|
||||
|
.. 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 |
||||
|
|
||||
|
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 |
||||
|
{module_name}%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 |
||||
|
------------ |
||||
|
|
||||
|
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
* 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. |
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 |
@ -0,0 +1,29 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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). |
||||
|
|
||||
|
{ |
||||
|
"name": "Partner job position", |
||||
|
"summary": "Categorize job positions for contacts", |
||||
|
"version": "8.0.1.0.0", |
||||
|
'category': 'Customer Relationship Management', |
||||
|
"website": "http://www.antiun.com", |
||||
|
'author': 'Serv. Tecnolog. Avanzados - Pedro M. Baeza, ' |
||||
|
'Antiun Ingeniería S.L., ' |
||||
|
"Odoo Community Association (OCA)", |
||||
|
"license": "AGPL-3", |
||||
|
"application": False, |
||||
|
"installable": True, |
||||
|
"depends": [ |
||||
|
"base", |
||||
|
], |
||||
|
"data": [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/res_partner_job_position_view.xml', |
||||
|
'views/res_partner_view.xml', |
||||
|
], |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * crm_job_position |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 8.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-12-18 18:22+0100\n" |
||||
|
"PO-Revision-Date: 2015-12-18 18:22+0100\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"Language: es\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.8.5\n" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner,job_position_id:0 |
||||
|
msgid "Categorized job position" |
||||
|
msgstr "Puesto de trabajo categorizado" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,child_ids:0 |
||||
|
msgid "Children" |
||||
|
msgstr "Hijos" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Creado por" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Creado en" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: model:ir.actions.act_window,name:partner_contact_job_position.res_partner_job_position_action |
||||
|
#: model:ir.ui.menu,name:partner_contact_job_position.menu_res_partner_job_position |
||||
|
msgid "Job Positions" |
||||
|
msgstr "Puestos de trabajo" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: model:ir.model,name:partner_contact_job_position.model_res_partner_job_position |
||||
|
#: view:res.partner:partner_contact_job_position.view_res_partner_filter_job_position |
||||
|
msgid "Job position" |
||||
|
msgstr "Puesto de trabajo" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: view:res.partner.job_position:partner_contact_job_position.res_partner_job_position_form_view |
||||
|
#: view:res.partner.job_position:partner_contact_job_position.res_partner_job_position_tree_view |
||||
|
msgid "Job positions" |
||||
|
msgstr "Puestos de trabajo" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Última actualización por" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Última actualización en" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nombre" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,parent_id:0 |
||||
|
msgid "Parent" |
||||
|
msgstr "Padre" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,parent_left:0 |
||||
|
msgid "Parent left" |
||||
|
msgstr "Padre izquierdo" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: field:res.partner.job_position,parent_right:0 |
||||
|
msgid "Parent right" |
||||
|
msgstr "Padre derecho" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: model:ir.model,name:partner_contact_job_position.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Empresa" |
||||
|
|
||||
|
#. module: partner_contact_job_position |
||||
|
#: view:res.partner:partner_contact_job_position.view_res_partner_filter_job_position |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Comercial" |
@ -0,0 +1,9 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 res_partner |
@ -0,0 +1,38 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) |
||||
|
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> |
||||
|
# 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 ResPartner(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
job_position_id = fields.Many2one( |
||||
|
"res.partner.job_position", |
||||
|
"Categorized job position", |
||||
|
oldname="job_position") |
||||
|
|
||||
|
|
||||
|
class ResPartnerJobPosition(models.Model): |
||||
|
_name = "res.partner.job_position" |
||||
|
_order = "parent_left" |
||||
|
_parent_order = "name" |
||||
|
_parent_store = True |
||||
|
_description = "Job position" |
||||
|
|
||||
|
name = fields.Char(required=True, translate=True) |
||||
|
parent_id = fields.Many2one( |
||||
|
"res.partner.job_position", |
||||
|
"Parent") |
||||
|
child_ids = fields.One2many( |
||||
|
"res.partner.job_position", |
||||
|
"parent_id", |
||||
|
"Children", |
||||
|
oldname="children") |
||||
|
parent_left = fields.Integer(index=True) |
||||
|
parent_right = fields.Integer(index=True) |
@ -0,0 +1,5 @@ |
|||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
||||
|
"access_res_partner_job_position_public","res_partner_job_position group_public","model_res_partner_job_position","base.group_public",1,0,0,0 |
||||
|
"access_res_partner_job_position_portal","res_partner_job_position group_portal","model_res_partner_job_position","base.group_portal",1,0,0,0 |
||||
|
"access_res_partner_job_position_group_partner_manager","res_partner_job_position group_partner_manager","model_res_partner_job_position","base.group_partner_manager",1,1,1,1 |
||||
|
"access_res_partner_job_position_group_user","res_partner_job_position group_user","model_res_partner_job_position","base.group_user",1,0,0,0 |
After Width: 128 | Height: 128 | Size: 22 KiB |
@ -0,0 +1,42 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record id="res_partner_job_position_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Job Positions</field> |
||||
|
<field name="res_model">res.partner.job_position</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="res_partner_job_position_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">Job position tree</field> |
||||
|
<field name="model">res.partner.job_position</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Job positions" editable="top"> |
||||
|
<field name="name"/> |
||||
|
<field name="parent_id"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="res_partner_job_position_form_view" model="ir.ui.view"> |
||||
|
<field name="name">Job position form</field> |
||||
|
<field name="model">res.partner.job_position</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Job positions"> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
<field name="parent_id"/> |
||||
|
<field name="child_ids"/> |
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem action="res_partner_job_position_action" |
||||
|
id="menu_res_partner_job_position" |
||||
|
parent="base.menu_config_address_book"/> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,41 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_partner_form_job_position"> |
||||
|
<field name="name">Partner form with job position</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="function" position="before"> |
||||
|
<field name="job_position_id" |
||||
|
attrs="{'invisible': [('is_company','=', True)]}" |
||||
|
options='{"no_open": True}'/> |
||||
|
</field> |
||||
|
<xpath expr="//field[@name='child_ids']/form//field[@name='function']" |
||||
|
position="before"> |
||||
|
<field name="job_position_id" |
||||
|
attrs="{'invisible': [('is_company','=', True)]}" |
||||
|
options='{"no_open": True}'/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_res_partner_filter_job_position"> |
||||
|
<field name="name">Partner search with job position</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_res_partner_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="category_id" position="after"> |
||||
|
<field name="job_position_id"/> |
||||
|
</field> |
||||
|
<filter string="Salesperson" position="after"> |
||||
|
<filter string="Job position" |
||||
|
domain="[('is_company','=', True)]" |
||||
|
context="{'group_by': 'job_position_id'}"/> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -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 |
||||
|
|
||||
|
============================= |
||||
|
Employee quantity in partners |
||||
|
============================= |
||||
|
|
||||
|
This module allows to set employee quantity for partners, and categorize them |
||||
|
by ranges. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
To manage available ranges, you need to: |
||||
|
|
||||
|
* Go to *Sales > Configuration > Address Book > Ranges by quantity of employees*. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
* Go to any partner's form. |
||||
|
* Enable *Is company?*. |
||||
|
* You will see a new group of fields called *Employee quantity*. |
||||
|
|
||||
|
.. 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 |
||||
|
|
||||
|
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_employee_quantity%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. |
@ -0,0 +1,6 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
{ |
||||
|
'name': 'Employee quantity in partners', |
||||
|
'summary': 'Know how many employees a partner has', |
||||
|
'version': '8.0.1.0.0', |
||||
|
'category': 'Customer Relationship Management', |
||||
|
"author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", |
||||
|
"license": "AGPL-3", |
||||
|
"application": False, |
||||
|
'website': 'http://www.antiun.com', |
||||
|
'depends': [ |
||||
|
'base', |
||||
|
], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/res_partner_employee_quantity_range_view.xml', |
||||
|
'views/res_partner_view.xml', |
||||
|
], |
||||
|
"installable": True, |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * crm_employees |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 8.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-12-21 16:02+0100\n" |
||||
|
"PO-Revision-Date: 2015-12-21 16:03+0100\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"Language: es\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.8.5\n" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,create_uid:0 |
||||
|
msgid "Created by" |
||||
|
msgstr "Creado por" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,create_date:0 |
||||
|
msgid "Created on" |
||||
|
msgstr "Creado en" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: view:res.partner:partner_employee_quantity.view_partner_form_employees |
||||
|
#: field:res.partner,employee_quantity:0 |
||||
|
msgid "Employee quantity" |
||||
|
msgstr "Cantidad de empleados" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner,employee_quantity_range_id:0 |
||||
|
msgid "Employee quantity range" |
||||
|
msgstr "Rango de la cantidad de empleados" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: view:res.partner:partner_employee_quantity.view_res_partner_filter_employees |
||||
|
msgid "Employees" |
||||
|
msgstr "Empleados" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,id:0 |
||||
|
msgid "ID" |
||||
|
msgstr "ID" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,write_uid:0 |
||||
|
msgid "Last Updated by" |
||||
|
msgstr "Última actualización por" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,write_date:0 |
||||
|
msgid "Last Updated on" |
||||
|
msgstr "Última actualización en" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: field:res.partner.employee_quantity_range,name:0 |
||||
|
msgid "Name" |
||||
|
msgstr "Nombre" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: model:ir.model,name:partner_employee_quantity.model_res_partner |
||||
|
msgid "Partner" |
||||
|
msgstr "Empresa" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: model:ir.model,name:partner_employee_quantity.model_res_partner_employee_quantity_range |
||||
|
msgid "Partner employee quantity range" |
||||
|
msgstr "Rango de la cantidad de empleados de la empresa" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: help:res.partner,employee_quantity_range_id:0 |
||||
|
msgid "Range of this partner depending on the employee quantity." |
||||
|
msgstr "Rango de esta empresa dependiendo de su cantidad de empleados." |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: model:ir.actions.act_window,name:partner_employee_quantity.employees_range_action |
||||
|
#: model:ir.ui.menu,name:partner_employee_quantity.menu_employees_range |
||||
|
#: view:res.partner.employee_quantity_range:partner_employee_quantity.employees_range_tree_view |
||||
|
msgid "Ranges by quantity of employees" |
||||
|
msgstr "Rangos por cantidad de empleados" |
||||
|
|
||||
|
#. module: partner_employee_quantity |
||||
|
#: view:res.partner:partner_employee_quantity.view_res_partner_filter_employees |
||||
|
msgid "Salesperson" |
||||
|
msgstr "Comercial" |
@ -0,0 +1,6 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from . import res_partner |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: 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). |
||||
|
|
||||
|
from openerp import models, fields |
||||
|
|
||||
|
|
||||
|
class ResPartner(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
employee_quantity = fields.Integer( |
||||
|
oldname="employees_number") |
||||
|
employee_quantity_range_id = fields.Many2one( |
||||
|
"res.partner.employee_quantity_range", |
||||
|
"Employee quantity range", |
||||
|
help="Range of this partner depending on the employee quantity.", |
||||
|
oldname="employees_range") |
||||
|
|
||||
|
|
||||
|
class ResPartnerEmployeeQuantityRange(models.Model): |
||||
|
_name = "res.partner.employee_quantity_range" |
||||
|
_description = "Partner employee quantity range" |
||||
|
|
||||
|
name = fields.Char(required=True, translate=True) |
@ -0,0 +1,5 @@ |
|||||
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
||||
|
"access_res_partner_employee_quantity_range_public","res_partner_employee_quantity_range group_public","model_res_partner_employee_quantity_range","base.group_public",1,0,0,0 |
||||
|
"access_res_partner_employee_quantity_range_portal","res_partner_employee_quantity_range group_portal","model_res_partner_employee_quantity_range","base.group_portal",1,0,0,0 |
||||
|
"access_res_partner_employee_quantity_range_group_partner_manager","res_partner_employee_quantity_range group_partner_manager","model_res_partner_employee_quantity_range","base.group_partner_manager",1,1,1,1 |
||||
|
"access_res_partner_employee_quantity_range_group_user","res_partner_employee_quantity_range group_user","model_res_partner_employee_quantity_range","base.group_user",1,0,0,0 |
After Width: 128 | Height: 128 | Size: 18 KiB |
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record id="employees_range_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Ranges by quantity of employees</field> |
||||
|
<field name="res_model">res.partner.employee_quantity_range</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="employees_range_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">Quantity of employees ranges tree</field> |
||||
|
<field name="model">res.partner.employee_quantity_range</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Ranges by quantity of employees" editable="top"> |
||||
|
<field name="name"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem action="employees_range_action" |
||||
|
id="menu_employees_range" |
||||
|
parent="base.menu_config_address_book"/> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,35 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_partner_form_employees"> |
||||
|
<field name="name">Partner form with employees</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="/form/sheet/group"> |
||||
|
<group name="employee_quantity" |
||||
|
string="Employee quantity" |
||||
|
attrs="{'invisible': [('is_company', '=', False)]}"> |
||||
|
<field name="employee_quantity"/> |
||||
|
<field name="employee_quantity_range_id"/> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.ui.view" id="view_res_partner_filter_employees"> |
||||
|
<field name="name">Partner search with employees</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_res_partner_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<filter string="Salesperson" position="after"> |
||||
|
<filter string="Employee Quantity" |
||||
|
domain="[('is_company','=', True)]" |
||||
|
context="{'group_by': 'employee_quantity_range_id'}"/> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue