From 0889ff70f1439d72171c3dee4dfe3b832aac3411 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 21 Dec 2015 17:25:01 +0100 Subject: [PATCH 1/8] Rename to partner_contact_department. --- partner_contact_department/README.rst | 19 +++ partner_contact_department/__init__.py | 6 + partner_contact_department/__openerp__.py | 42 +++++++ .../i18n/crm_department.pot | 108 ++++++++++++++++++ partner_contact_department/i18n/es.po | 108 ++++++++++++++++++ partner_contact_department/models/__init__.py | 8 ++ .../models/crm_department.py | 20 ++++ partner_contact_department/models/crm_lead.py | 23 ++++ .../models/res_partner.py | 11 ++ .../security/ir.model.access.csv | 5 + .../static/description/icon.png | Bin 0 -> 22620 bytes .../views/crm_department_view.xml | 30 +++++ .../views/crm_lead_view.xml | 64 +++++++++++ .../views/res_partner_view.xml | 55 +++++++++ 14 files changed, 499 insertions(+) create mode 100644 partner_contact_department/README.rst create mode 100644 partner_contact_department/__init__.py create mode 100644 partner_contact_department/__openerp__.py create mode 100644 partner_contact_department/i18n/crm_department.pot create mode 100644 partner_contact_department/i18n/es.po create mode 100644 partner_contact_department/models/__init__.py create mode 100644 partner_contact_department/models/crm_department.py create mode 100644 partner_contact_department/models/crm_lead.py create mode 100644 partner_contact_department/models/res_partner.py create mode 100644 partner_contact_department/security/ir.model.access.csv create mode 100644 partner_contact_department/static/description/icon.png create mode 100644 partner_contact_department/views/crm_department_view.xml create mode 100644 partner_contact_department/views/crm_lead_view.xml create mode 100644 partner_contact_department/views/res_partner_view.xml diff --git a/partner_contact_department/README.rst b/partner_contact_department/README.rst new file mode 100644 index 000000000..34548936e --- /dev/null +++ b/partner_contact_department/README.rst @@ -0,0 +1,19 @@ +Department field in CRM contact +=============================== + +This module adds the concept of department to the CRM main objects (lead, +opportunity, partner), and propagate them through the workflow. + +Department is a drop-down field in lead, opportunity and partner forms. It +refers to contact department in its own company + +Departments available list must be defined first at +Sales > Configuration > Leads & Opportunities > Departments + +Credits +======= + +Contributors +------------ +* Pedro M. Baeza +* Antonio Espinosa diff --git a/partner_contact_department/__init__.py b/partner_contact_department/__init__.py new file mode 100644 index 000000000..054c8853d --- /dev/null +++ b/partner_contact_department/__init__.py @@ -0,0 +1,6 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## + +from . import models diff --git a/partner_contact_department/__openerp__.py b/partner_contact_department/__openerp__.py new file mode 100644 index 000000000..4ffb8fe2b --- /dev/null +++ b/partner_contact_department/__openerp__.py @@ -0,0 +1,42 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Odoo Source Management Solution +# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) +# Pedro M. Baeza +# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) +# Antonio Espinosa +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': 'Department field in CRM contact', + 'version': '1.0', + 'category': 'Customer Relationship Management', + 'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza, ' + 'Antiun Ingeniería S.L.', + 'website': 'http://www.serviciosbaeza.com, http://www.antiun.com', + 'depends': [ + 'crm', + ], + 'data': [ + 'views/crm_department_view.xml', + 'views/crm_lead_view.xml', + 'views/res_partner_view.xml', + 'security/ir.model.access.csv', + ], + "installable": True, +} diff --git a/partner_contact_department/i18n/crm_department.pot b/partner_contact_department/i18n/crm_department.pot new file mode 100644 index 000000000..9a33d3ef9 --- /dev/null +++ b/partner_contact_department/i18n/crm_department.pot @@ -0,0 +1,108 @@ +# 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-05-27 08:51+0000\n" +"PO-Revision-Date: 2015-05-27 08:51+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_partner_department +#: field:crm.department,children:0 +msgid "Children" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,create_date:0 +msgid "Created on" +msgstr "" + +#. module: crm_partner_department +#: view:crm.lead:crm_partner_department.crm_case_form_view_leads_department +#: view:crm.lead:crm_partner_department.crm_case_form_view_oppor_department +#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department +#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department +#: field:crm.lead,department:0 +#: model:ir.model,name:crm_partner_department.model_crm_department +#: view:res.partner:crm_partner_department.view_partner_form_department +#: view:res.partner:crm_partner_department.view_res_partner_filter_department +#: field:res.partner,department:0 +msgid "Department" +msgstr "" + +#. module: crm_partner_department +#: view:crm.department:crm_partner_department.crm_department_tree_view +#: model:ir.actions.act_window,name:crm_partner_department.crm_department_action +#: model:ir.ui.menu,name:crm_partner_department.menu_crm_department +msgid "Departments" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,id:0 +msgid "ID" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: crm_partner_department +#: model:ir.model,name:crm_partner_department.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,name:0 +msgid "Name" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,parent_left:0 +msgid "Parent Left" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,parent_right:0 +msgid "Parent Right" +msgstr "" + +#. module: crm_partner_department +#: field:crm.department,parent_id:0 +msgid "Parent id" +msgstr "" + +#. module: crm_partner_department +#: model:ir.model,name:crm_partner_department.model_res_partner +msgid "Partner" +msgstr "" + +#. module: crm_partner_department +#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department +#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department +msgid "Sales Team" +msgstr "" + +#. module: crm_partner_department +#: view:res.partner:crm_partner_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "" + diff --git a/partner_contact_department/i18n/es.po b/partner_contact_department/i18n/es.po new file mode 100644 index 000000000..2c519e3c8 --- /dev/null +++ b/partner_contact_department/i18n/es.po @@ -0,0 +1,108 @@ +# 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-05-27 08:51+0000\n" +"PO-Revision-Date: 2015-05-27 08:51+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_partner_department +#: field:crm.department,children:0 +msgid "Children" +msgstr "Hijos" + +#. module: crm_partner_department +#: field:crm.department,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: crm_partner_department +#: field:crm.department,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: crm_partner_department +#: view:crm.lead:crm_partner_department.crm_case_form_view_leads_department +#: view:crm.lead:crm_partner_department.crm_case_form_view_oppor_department +#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department +#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department +#: field:crm.lead,department:0 +#: model:ir.model,name:crm_partner_department.model_crm_department +#: view:res.partner:crm_partner_department.view_partner_form_department +#: view:res.partner:crm_partner_department.view_res_partner_filter_department +#: field:res.partner,department:0 +msgid "Department" +msgstr "Departamento" + +#. module: crm_partner_department +#: view:crm.department:crm_partner_department.crm_department_tree_view +#: model:ir.actions.act_window,name:crm_partner_department.crm_department_action +#: model:ir.ui.menu,name:crm_partner_department.menu_crm_department +msgid "Departments" +msgstr "Departamentos" + +#. module: crm_partner_department +#: field:crm.department,id:0 +msgid "ID" +msgstr "ID" + +#. module: crm_partner_department +#: field:crm.department,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: crm_partner_department +#: field:crm.department,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: crm_partner_department +#: model:ir.model,name:crm_partner_department.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa/Oportunidad" + +#. module: crm_partner_department +#: field:crm.department,name:0 +msgid "Name" +msgstr "Nombre" + +#. module: crm_partner_department +#: field:crm.department,parent_left:0 +msgid "Parent Left" +msgstr "Padre Izquierdo" + +#. module: crm_partner_department +#: field:crm.department,parent_right:0 +msgid "Parent Right" +msgstr "Padre Derecho" + +#. module: crm_partner_department +#: field:crm.department,parent_id:0 +msgid "Parent id" +msgstr "ID Padre" + +#. module: crm_partner_department +#: model:ir.model,name:crm_partner_department.model_res_partner +msgid "Partner" +msgstr "Empresa" + +#. module: crm_partner_department +#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department +#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department +msgid "Sales Team" +msgstr "Equipo de ventas" + +#. module: crm_partner_department +#: view:res.partner:crm_partner_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "Comercial" + diff --git a/partner_contact_department/models/__init__.py b/partner_contact_department/models/__init__.py new file mode 100644 index 000000000..006c33b3b --- /dev/null +++ b/partner_contact_department/models/__init__.py @@ -0,0 +1,8 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## + +from . import crm_department +from . import crm_lead +from . import res_partner diff --git a/partner_contact_department/models/crm_department.py b/partner_contact_department/models/crm_department.py new file mode 100644 index 000000000..71bc4067e --- /dev/null +++ b/partner_contact_department/models/crm_department.py @@ -0,0 +1,20 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +from openerp import models, fields + + +class CrmDepartment(models.Model): + _name = 'crm.department' + _order = "parent_left" + _parent_order = "name" + _parent_store = True + _description = "Department" + + name = fields.Char(required=True, translate=True) + parent_id = fields.Many2one(comodel_name='crm.department') + children = fields.One2many(comodel_name='crm.department', + inverse_name='parent_id') + parent_left = fields.Integer('Parent Left', select=True) + parent_right = fields.Integer('Parent Right', select=True) diff --git a/partner_contact_department/models/crm_lead.py b/partner_contact_department/models/crm_lead.py new file mode 100644 index 000000000..33fa82850 --- /dev/null +++ b/partner_contact_department/models/crm_lead.py @@ -0,0 +1,23 @@ +# -*- 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' + + department = fields.Many2one(comodel_name='crm.department') + + def _lead_create_contact(self, cr, uid, lead, name, is_company, + parent_id=False, context=None): + """Propagate department 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, {'department': lead.department.id}, + context=context) + return partner_id diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py new file mode 100644 index 000000000..b8c7cd3a8 --- /dev/null +++ b/partner_contact_department/models/res_partner.py @@ -0,0 +1,11 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +from openerp import models, fields + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + department = fields.Many2one(comodel_name='crm.department') diff --git a/partner_contact_department/security/ir.model.access.csv b/partner_contact_department/security/ir.model.access.csv new file mode 100644 index 000000000..dc285f926 --- /dev/null +++ b/partner_contact_department/security/ir.model.access.csv @@ -0,0 +1,5 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_crm_department_public","crm_department group_public","model_crm_department","base.group_public",1,0,0,0 +"access_crm_department_portal","crm_department group_portal","model_crm_department","base.group_portal",1,0,0,0 +"access_crm_department_group_partner_manager","crm_department group_partner_manager","model_crm_department","base.group_partner_manager",1,1,1,1 +"access_crm_department_group_user","crm_department group_user","model_crm_department","base.group_user",1,0,0,0 diff --git a/partner_contact_department/static/description/icon.png b/partner_contact_department/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..add81b17a4847ff2663923593ecc364587d3dd9f GIT binary patch literal 22620 zcmV*6Ky$x|P)npTvPx6AOJ~3 zK~#9!?7exMTvv7P``vq=Q*(Fq+^u0Qp@L#v;O>Et|RRFSYWLN;SfB949x)Job9{lXvZgnpE z_B|S~FY6Eef0Bf)wc?ID?hpVg_rD|#j*bd|y${@DKVLexpaIa<`THL~lwNr1WYRAc z%fEZumMH+c0wE5DPyJs9;6l22h^=4PDpssmAr2lqDCAFfaM8|Qdu@E15eI*{u=P6U_%j8(+zfuHgf4j~X-TEi7}sU8CHB$({>Ve0 zp7nmD5W@V|0r>y$J=zs;#|O5G+Z_1Z!#iZ{o=5I6ADHBqUhL2R_$Qs6gD2FLFy z>@Syva=)!qmQ(T;nR02a@Vt!le008upPQjPoufQCO(|EvHx=XCzyvs0S6LB@A*B$m zlsE?6;)r;l6ujm2e{khH-hL#1=1lw@AN}YPr+4kjy_^ogg>(SK)~#E`%Ka}1fP zVnuJSz3wO5tT@Q8yqH`6{aZbqQp3MwVt=Ymdm}OTuF&a1(Pr0 zkW44FGx)62`=P(# zmGAm3I+OWq9puN!W-K?3^!WD6jywcK&X9YX$ehwQm%r4Y|U+e?$? zx)a-e>4ka2-S;HkaO7l9x>#J`1eGPSSnd~orJo>JW-Gx0Q}%kCz*nN=;g^bdx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!yvLg84wY>1a%n_<4RlFQCX+4JiINRuIgoz32hgOT$tihuR~2k#T2Y|hF6 zxc<5;ntS$6UibBHeDk>j2gWXRF5tNTn0%88eowmAp><}Dd+5MHICu!D6u##X1OZ_o zBn%6bN<~V=5@8sk1CO8(VohG2rKfqE>ktcxvI#e?9N~#AN7?2l3`cvYmSF3A2Hc2E zLV}}{7^3`2Xmth*2~xE{vlGIBlQ>})+Qc$zf*^31*s*l=$n0hBzT#RTY74}Svn~Jt zUis0>vmdzcnoGa>w=cYS^l0NMAs|i7Tb6K7Y^r2D$4sNjl0*?{9Mh`TaZZq?3C0?< z)}+RuJdJaplmzD}6p9EbXf|62Au%>03YM~c?=HS8kFd_}=SaGWaWdN+s|9JE^!13) z$_hlTlqyaVsUXLSHPaQ~eSNS$-n{g21L`Kd#P z4*h8(j*&_&sEp&pg49jsOSm9imcz7jQVBh-PsUvKr2>_Gt=d-^099sJ0U-oYr-QW? zB}DdbJ&oT@P$DAmQd$&g=#W&oEOE?Hz1p}1?4WeyY#)$D2|s+HB9x8Hor@2neH`~8RC;yXC217KqEh*&zb(ybjC z9tGC_<>Ozyr_qTvj2@l5G-{`4SA_lUA(FvKcZ1OJB0xs`_qrxqIij&Wfg)ni) z6GxdB3}pW3xuGtee7C5vlr8r#Qwhm^mkbe7w0PIMR=>7>{rR8&=mU5EgAgM9X$n-o z7>maDU)*``bI))7zxagaUFbL62~!8DopB7>Su2vNhD6B*tEu%_U_N+ z%@3!S^HM87=eLW6Nza2PNi!V-B{l7Konl$zT$-+4w_@xAAH4Oq?|ATO$06={$X7Y9`hD4(z|;$kEYjXJ+PBDJicxa^$F;nwrA*Laei*Tq<83 zhCy*|ZuU8AObQXQT(kc2b(fvf8U2fk`^yc}x8msacir?i;tWW`o;?0Puc%<3wgGsH P00000NkvXXu0mjfiBcmQ literal 0 HcmV?d00001 diff --git a/partner_contact_department/views/crm_department_view.xml b/partner_contact_department/views/crm_department_view.xml new file mode 100644 index 000000000..981e7d7b7 --- /dev/null +++ b/partner_contact_department/views/crm_department_view.xml @@ -0,0 +1,30 @@ + + + + + + Departments + crm.department + form + tree + + + + CRM department tree + crm.department + + + + + + + + + + + + \ No newline at end of file diff --git a/partner_contact_department/views/crm_lead_view.xml b/partner_contact_department/views/crm_lead_view.xml new file mode 100644 index 000000000..6b4d289af --- /dev/null +++ b/partner_contact_department/views/crm_lead_view.xml @@ -0,0 +1,64 @@ + + + + + + Add department field + crm.lead + + + + + + + + + + Add department field for searching and grouping + crm.lead + + + + + + + + + + + + + Add department field + crm.lead + + + + + + + + + + Add department field for searching and grouping + crm.lead + + + + + + + + + + + + + \ No newline at end of file diff --git a/partner_contact_department/views/res_partner_view.xml b/partner_contact_department/views/res_partner_view.xml new file mode 100644 index 000000000..8856abd93 --- /dev/null +++ b/partner_contact_department/views/res_partner_view.xml @@ -0,0 +1,55 @@ + + + + + + Partner form with department + res.partner + + + + + + + + + + + + + + + Partner search with department + res.partner + + + + + + + + + + + + + \ No newline at end of file From 9adfdf80a6f13afaf7f75e4e8e4d49cd5ad34fe3 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 21 Dec 2015 17:27:10 +0100 Subject: [PATCH 2/8] Prepare for OCA. - Update translation. - Reduce garbage code. - Update license and copyright headers. - Improve README. - Drop CRM stuff. --- partner_contact_department/README.rst | 71 ++++++++++-- partner_contact_department/__init__.py | 11 +- partner_contact_department/__openerp__.py | 41 +++---- .../i18n/crm_department.pot | 108 ------------------ partner_contact_department/i18n/es.po | 107 ++++++++--------- partner_contact_department/models/__init__.py | 13 ++- .../models/crm_department.py | 20 ---- partner_contact_department/models/crm_lead.py | 23 ---- .../models/res_partner.py | 37 +++++- .../security/ir.model.access.csv | 8 +- .../views/crm_department_view.xml | 30 ----- .../views/crm_lead_view.xml | 64 ----------- .../views/res_partner_department_view.xml | 47 ++++++++ .../views/res_partner_view.xml | 36 +++--- 14 files changed, 235 insertions(+), 381 deletions(-) delete mode 100644 partner_contact_department/i18n/crm_department.pot delete mode 100644 partner_contact_department/models/crm_department.py delete mode 100644 partner_contact_department/models/crm_lead.py delete mode 100644 partner_contact_department/views/crm_department_view.xml delete mode 100644 partner_contact_department/views/crm_lead_view.xml create mode 100644 partner_contact_department/views/res_partner_department_view.xml diff --git a/partner_contact_department/README.rst b/partner_contact_department/README.rst index 34548936e..d142645b8 100644 --- a/partner_contact_department/README.rst +++ b/partner_contact_department/README.rst @@ -1,19 +1,74 @@ -Department field in CRM contact -=============================== +.. 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 adds the concept of department to the CRM main objects (lead, -opportunity, partner), and propagate them through the workflow. +================== +Contact department +================== -Department is a drop-down field in lead, opportunity and partner forms. It -refers to contact department in its own company +This module extends the functionality of the address book to support +departments. -Departments available list must be defined first at -Sales > Configuration > Leads & Opportunities > 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. + +.. 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 +`_. 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 +`_. Credits ======= +Images +------ + +* `Antiun Ingeniería S.L. `_: Icon. + Contributors ------------ + * Pedro M. Baeza * Antonio Espinosa +* Rafael Blasco +* Jairo Llopis + +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. diff --git a/partner_contact_department/__init__.py b/partner_contact_department/__init__.py index 054c8853d..9af8488e4 100644 --- a/partner_contact_department/__init__.py +++ b/partner_contact_department/__init__.py @@ -1,6 +1,9 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) +# Pedro M. Baeza +# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) +# 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 diff --git a/partner_contact_department/__openerp__.py b/partner_contact_department/__openerp__.py index 4ffb8fe2b..a5323db87 100644 --- a/partner_contact_department/__openerp__.py +++ b/partner_contact_department/__openerp__.py @@ -1,42 +1,29 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Odoo Source Management Solution +# -*- coding: utf-8 -*- # Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza # Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) # Antonio Espinosa -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2015 Antiun Ingeniería S.L. - Jairo Llopis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Department field in CRM contact', - 'version': '1.0', + '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.', - 'website': 'http://www.serviciosbaeza.com, http://www.antiun.com', + 'Antiun Ingeniería S.L., ' + "Odoo Community Association (OCA)", + "license": "AGPL-3", + 'website': 'http://www.antiun.com', + "application": False, 'depends': [ - 'crm', + 'base', ], 'data': [ - 'views/crm_department_view.xml', - 'views/crm_lead_view.xml', - 'views/res_partner_view.xml', 'security/ir.model.access.csv', + 'views/res_partner_department_view.xml', + 'views/res_partner_view.xml', ], "installable": True, } diff --git a/partner_contact_department/i18n/crm_department.pot b/partner_contact_department/i18n/crm_department.pot deleted file mode 100644 index 9a33d3ef9..000000000 --- a/partner_contact_department/i18n/crm_department.pot +++ /dev/null @@ -1,108 +0,0 @@ -# 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-05-27 08:51+0000\n" -"PO-Revision-Date: 2015-05-27 08:51+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_partner_department -#: field:crm.department,children:0 -msgid "Children" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,create_uid:0 -msgid "Created by" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,create_date:0 -msgid "Created on" -msgstr "" - -#. module: crm_partner_department -#: view:crm.lead:crm_partner_department.crm_case_form_view_leads_department -#: view:crm.lead:crm_partner_department.crm_case_form_view_oppor_department -#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department -#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department -#: field:crm.lead,department:0 -#: model:ir.model,name:crm_partner_department.model_crm_department -#: view:res.partner:crm_partner_department.view_partner_form_department -#: view:res.partner:crm_partner_department.view_res_partner_filter_department -#: field:res.partner,department:0 -msgid "Department" -msgstr "" - -#. module: crm_partner_department -#: view:crm.department:crm_partner_department.crm_department_tree_view -#: model:ir.actions.act_window,name:crm_partner_department.crm_department_action -#: model:ir.ui.menu,name:crm_partner_department.menu_crm_department -msgid "Departments" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,id:0 -msgid "ID" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,write_uid:0 -msgid "Last Updated by" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,write_date:0 -msgid "Last Updated on" -msgstr "" - -#. module: crm_partner_department -#: model:ir.model,name:crm_partner_department.model_crm_lead -msgid "Lead/Opportunity" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,name:0 -msgid "Name" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,parent_left:0 -msgid "Parent Left" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,parent_right:0 -msgid "Parent Right" -msgstr "" - -#. module: crm_partner_department -#: field:crm.department,parent_id:0 -msgid "Parent id" -msgstr "" - -#. module: crm_partner_department -#: model:ir.model,name:crm_partner_department.model_res_partner -msgid "Partner" -msgstr "" - -#. module: crm_partner_department -#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department -#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department -msgid "Sales Team" -msgstr "" - -#. module: crm_partner_department -#: view:res.partner:crm_partner_department.view_res_partner_filter_department -msgid "Salesperson" -msgstr "" - diff --git a/partner_contact_department/i18n/es.po b/partner_contact_department/i18n/es.po index 2c519e3c8..e3c3ae378 100644 --- a/partner_contact_department/i18n/es.po +++ b/partner_contact_department/i18n/es.po @@ -6,103 +6,88 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-27 08:51+0000\n" -"PO-Revision-Date: 2015-05-27 08:51+0000\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: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"X-Generator: Poedit 1.8.5\n" -#. module: crm_partner_department -#: field:crm.department,children:0 -msgid "Children" -msgstr "Hijos" +#. module: partner_contact_department +#: field:res.partner.department,child_ids:0 +msgid "Child departments" +msgstr "Departamentos hijo" -#. module: crm_partner_department -#: field:crm.department,create_uid:0 +#. module: partner_contact_department +#: field:res.partner.department,create_uid:0 msgid "Created by" msgstr "Creado por" -#. module: crm_partner_department -#: field:crm.department,create_date:0 +#. module: partner_contact_department +#: field:res.partner.department,create_date:0 msgid "Created on" msgstr "Creado en" -#. module: crm_partner_department -#: view:crm.lead:crm_partner_department.crm_case_form_view_leads_department -#: view:crm.lead:crm_partner_department.crm_case_form_view_oppor_department -#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department -#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department -#: field:crm.lead,department:0 -#: model:ir.model,name:crm_partner_department.model_crm_department -#: view:res.partner:crm_partner_department.view_partner_form_department -#: view:res.partner:crm_partner_department.view_res_partner_filter_department -#: field:res.partner,department:0 +#. 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: crm_partner_department -#: view:crm.department:crm_partner_department.crm_department_tree_view -#: model:ir.actions.act_window,name:crm_partner_department.crm_department_action -#: model:ir.ui.menu,name:crm_partner_department.menu_crm_department +#. 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: crm_partner_department -#: field:crm.department,id:0 +#. module: partner_contact_department +#: field:res.partner.department,id:0 msgid "ID" msgstr "ID" -#. module: crm_partner_department -#: field:crm.department,write_uid:0 +#. module: partner_contact_department +#: field:res.partner.department,write_uid:0 msgid "Last Updated by" msgstr "Última actualización por" -#. module: crm_partner_department -#: field:crm.department,write_date:0 +#. module: partner_contact_department +#: field:res.partner.department,write_date:0 msgid "Last Updated on" msgstr "Última actualización en" -#. module: crm_partner_department -#: model:ir.model,name:crm_partner_department.model_crm_lead -msgid "Lead/Opportunity" -msgstr "Iniciativa/Oportunidad" - -#. module: crm_partner_department -#: field:crm.department,name:0 +#. module: partner_contact_department +#: field:res.partner.department,name:0 msgid "Name" msgstr "Nombre" -#. module: crm_partner_department -#: field:crm.department,parent_left:0 -msgid "Parent Left" -msgstr "Padre Izquierdo" +#. module: partner_contact_department +#: field:res.partner.department,parent_id:0 +msgid "Parent department" +msgstr "Departamento padre" -#. module: crm_partner_department -#: field:crm.department,parent_right:0 -msgid "Parent Right" -msgstr "Padre Derecho" +#. module: partner_contact_department +#: field:res.partner.department,parent_left:0 +msgid "Parent left" +msgstr "Padre izquierdo" -#. module: crm_partner_department -#: field:crm.department,parent_id:0 -msgid "Parent id" -msgstr "ID Padre" +#. module: partner_contact_department +#: field:res.partner.department,parent_right:0 +msgid "Parent right" +msgstr "Padre derecho" -#. module: crm_partner_department -#: model:ir.model,name:crm_partner_department.model_res_partner +#. module: partner_contact_department +#: model:ir.model,name:partner_contact_department.model_res_partner msgid "Partner" msgstr "Empresa" -#. module: crm_partner_department -#: view:crm.lead:crm_partner_department.view_crm_case_leads_filter_department -#: view:crm.lead:crm_partner_department.view_crm_case_opportunities_filter_department -msgid "Sales Team" -msgstr "Equipo de ventas" - -#. module: crm_partner_department -#: view:res.partner:crm_partner_department.view_res_partner_filter_department +#. module: partner_contact_department +#: view:res.partner:partner_contact_department.view_res_partner_filter_department msgid "Salesperson" msgstr "Comercial" - diff --git a/partner_contact_department/models/__init__.py b/partner_contact_department/models/__init__.py index 006c33b3b..213b25fdc 100644 --- a/partner_contact_department/models/__init__.py +++ b/partner_contact_department/models/__init__.py @@ -1,8 +1,9 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) +# Pedro M. Baeza +# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) +# 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 crm_department -from . import crm_lead from . import res_partner diff --git a/partner_contact_department/models/crm_department.py b/partner_contact_department/models/crm_department.py deleted file mode 100644 index 71bc4067e..000000000 --- a/partner_contact_department/models/crm_department.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from openerp import models, fields - - -class CrmDepartment(models.Model): - _name = 'crm.department' - _order = "parent_left" - _parent_order = "name" - _parent_store = True - _description = "Department" - - name = fields.Char(required=True, translate=True) - parent_id = fields.Many2one(comodel_name='crm.department') - children = fields.One2many(comodel_name='crm.department', - inverse_name='parent_id') - parent_left = fields.Integer('Parent Left', select=True) - parent_right = fields.Integer('Parent Right', select=True) diff --git a/partner_contact_department/models/crm_lead.py b/partner_contact_department/models/crm_lead.py deleted file mode 100644 index 33fa82850..000000000 --- a/partner_contact_department/models/crm_lead.py +++ /dev/null @@ -1,23 +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' - - department = fields.Many2one(comodel_name='crm.department') - - def _lead_create_contact(self, cr, uid, lead, name, is_company, - parent_id=False, context=None): - """Propagate department 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, {'department': lead.department.id}, - context=context) - return partner_id diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index b8c7cd3a8..20e2cfd27 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -1,11 +1,38 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## +# -*- coding: utf-8 -*- +# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) +# Pedro M. Baeza +# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) +# 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' - department = fields.Many2one(comodel_name='crm.department') + 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) diff --git a/partner_contact_department/security/ir.model.access.csv b/partner_contact_department/security/ir.model.access.csv index dc285f926..9a73e7a61 100644 --- a/partner_contact_department/security/ir.model.access.csv +++ b/partner_contact_department/security/ir.model.access.csv @@ -1,5 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_crm_department_public","crm_department group_public","model_crm_department","base.group_public",1,0,0,0 -"access_crm_department_portal","crm_department group_portal","model_crm_department","base.group_portal",1,0,0,0 -"access_crm_department_group_partner_manager","crm_department group_partner_manager","model_crm_department","base.group_partner_manager",1,1,1,1 -"access_crm_department_group_user","crm_department group_user","model_crm_department","base.group_user",1,0,0,0 +"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 diff --git a/partner_contact_department/views/crm_department_view.xml b/partner_contact_department/views/crm_department_view.xml deleted file mode 100644 index 981e7d7b7..000000000 --- a/partner_contact_department/views/crm_department_view.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Departments - crm.department - form - tree - - - - CRM department tree - crm.department - - - - - - - - - - - - \ No newline at end of file diff --git a/partner_contact_department/views/crm_lead_view.xml b/partner_contact_department/views/crm_lead_view.xml deleted file mode 100644 index 6b4d289af..000000000 --- a/partner_contact_department/views/crm_lead_view.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Add department field - crm.lead - - - - - - - - - - Add department field for searching and grouping - crm.lead - - - - - - - - - - - - - Add department field - crm.lead - - - - - - - - - - Add department field for searching and grouping - crm.lead - - - - - - - - - - - - - \ No newline at end of file diff --git a/partner_contact_department/views/res_partner_department_view.xml b/partner_contact_department/views/res_partner_department_view.xml new file mode 100644 index 000000000..f7aae91f9 --- /dev/null +++ b/partner_contact_department/views/res_partner_department_view.xml @@ -0,0 +1,47 @@ + + + + + + + + Departments + res.partner.department + form + tree + + + + CRM department tree + res.partner.department + + + + + + + + + + CRM department form + res.partner.department + +
+ + + + + +
+
+
+ + + +
+
diff --git a/partner_contact_department/views/res_partner_view.xml b/partner_contact_department/views/res_partner_view.xml index 8856abd93..108a2415e 100644 --- a/partner_contact_department/views/res_partner_view.xml +++ b/partner_contact_department/views/res_partner_view.xml @@ -1,4 +1,9 @@ + + @@ -7,14 +12,16 @@ res.partner - - + - - - + + + @@ -22,34 +29,21 @@ - - Partner search with department res.partner - + + context="{'group_by': 'department_id'}"/> - \ No newline at end of file + From 83d652b6b7ea4169930b798c2273cbe27f6477e9 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 22 Dec 2015 16:08:30 +0100 Subject: [PATCH 3/8] Improve README. --- partner_contact_department/README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/partner_contact_department/README.rst b/partner_contact_department/README.rst index d142645b8..f15fcdce0 100644 --- a/partner_contact_department/README.rst +++ b/partner_contact_department/README.rst @@ -25,6 +25,7 @@ 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 From 7aecd8c7ac9839271efcfe9f4f10c3c3b4f3a594 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 9 Jan 2016 16:44:18 -0500 Subject: [PATCH 4/8] OCA Transbot updated translations from Transifex --- partner_contact_department/i18n/de.po | 94 +++++++++++++++++++++++++++ partner_contact_department/i18n/en.po | 93 ++++++++++++++++++++++++++ partner_contact_department/i18n/sl.po | 94 +++++++++++++++++++++++++++ 3 files changed, 281 insertions(+) create mode 100644 partner_contact_department/i18n/de.po create mode 100644 partner_contact_department/i18n/en.po create mode 100644 partner_contact_department/i18n/sl.po diff --git a/partner_contact_department/i18n/de.po b/partner_contact_department/i18n/de.po new file mode 100644 index 000000000..779e6c5fe --- /dev/null +++ b/partner_contact_department/i18n/de.po @@ -0,0 +1,94 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_department +# +# Translators: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" +"PO-Revision-Date: 2016-01-18 16:40+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: partner_contact_department +#: field:res.partner.department,child_ids:0 +msgid "Child departments" +msgstr "Unter-Abteilungen" + +#. module: partner_contact_department +#: field:res.partner.department,create_uid:0 +msgid "Created by" +msgstr "Angelegt durch" + +#. module: partner_contact_department +#: field:res.partner.department,create_date:0 +msgid "Created on" +msgstr "Angelegt am" + +#. 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 "Abteilung" + +#. 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 "Abteilungen" + +#. 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 "Zuletzt aktualisiert durch" + +#. module: partner_contact_department +#: field:res.partner.department,write_date:0 +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: partner_contact_department +#: field:res.partner.department,name:0 +msgid "Name" +msgstr "Bezeichnung" + +#. module: partner_contact_department +#: field:res.partner.department,parent_id:0 +msgid "Parent department" +msgstr "Übergeordnete Abteilung" + +#. module: partner_contact_department +#: field:res.partner.department,parent_left:0 +msgid "Parent left" +msgstr "Links übergeordnet" + +#. module: partner_contact_department +#: field:res.partner.department,parent_right:0 +msgid "Parent right" +msgstr "Rechts übergeordnet" + +#. module: partner_contact_department +#: model:ir.model,name:partner_contact_department.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: partner_contact_department +#: view:res.partner:partner_contact_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "Verkäufer" diff --git a/partner_contact_department/i18n/en.po b/partner_contact_department/i18n/en.po new file mode 100644 index 000000000..66faf09ba --- /dev/null +++ b/partner_contact_department/i18n/en.po @@ -0,0 +1,93 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_department +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-08 01:38+0000\n" +"PO-Revision-Date: 2015-12-22 15:56+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: partner_contact_department +#: field:res.partner.department,child_ids:0 +msgid "Child departments" +msgstr "Child departments" + +#. module: partner_contact_department +#: field:res.partner.department,create_uid:0 +msgid "Created by" +msgstr "Created by" + +#. module: partner_contact_department +#: field:res.partner.department,create_date:0 +msgid "Created on" +msgstr "Created on" + +#. 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 "Department" + +#. 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 "Departments" + +#. 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 "Last Updated by" + +#. module: partner_contact_department +#: field:res.partner.department,write_date:0 +msgid "Last Updated on" +msgstr "Last Updated on" + +#. module: partner_contact_department +#: field:res.partner.department,name:0 +msgid "Name" +msgstr "Name" + +#. module: partner_contact_department +#: field:res.partner.department,parent_id:0 +msgid "Parent department" +msgstr "Parent department" + +#. module: partner_contact_department +#: field:res.partner.department,parent_left:0 +msgid "Parent left" +msgstr "Parent left" + +#. module: partner_contact_department +#: field:res.partner.department,parent_right:0 +msgid "Parent right" +msgstr "Parent right" + +#. module: partner_contact_department +#: model:ir.model,name:partner_contact_department.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: partner_contact_department +#: view:res.partner:partner_contact_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "Salesperson" diff --git a/partner_contact_department/i18n/sl.po b/partner_contact_department/i18n/sl.po new file mode 100644 index 000000000..c236cc7aa --- /dev/null +++ b/partner_contact_department/i18n/sl.po @@ -0,0 +1,94 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_department +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-08 01:38+0000\n" +"PO-Revision-Date: 2015-12-23 14:13+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: partner_contact_department +#: field:res.partner.department,child_ids:0 +msgid "Child departments" +msgstr "Podrejeni oddelki" + +#. module: partner_contact_department +#: field:res.partner.department,create_uid:0 +msgid "Created by" +msgstr "Ustvaril" + +#. module: partner_contact_department +#: field:res.partner.department,create_date:0 +msgid "Created on" +msgstr "Ustvarjeno" + +#. 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 "Oddelek" + +#. 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 "Oddelki" + +#. 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 "Zadnji posodobil" + +#. module: partner_contact_department +#: field:res.partner.department,write_date:0 +msgid "Last Updated on" +msgstr "Zadnjič posodobljeno" + +#. module: partner_contact_department +#: field:res.partner.department,name:0 +msgid "Name" +msgstr "Naziv" + +#. module: partner_contact_department +#: field:res.partner.department,parent_id:0 +msgid "Parent department" +msgstr "Nadrejeni oddelek" + +#. module: partner_contact_department +#: field:res.partner.department,parent_left:0 +msgid "Parent left" +msgstr "Levo nadrejeni" + +#. module: partner_contact_department +#: field:res.partner.department,parent_right:0 +msgid "Parent right" +msgstr "Desno nadrejeni" + +#. module: partner_contact_department +#: model:ir.model,name:partner_contact_department.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: partner_contact_department +#: view:res.partner:partner_contact_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "Prodajalec" From 1f93c75c37fbbc884d4eb42ced29b32528beef20 Mon Sep 17 00:00:00 2001 From: Fekete Mihai Date: Sun, 24 Jan 2016 23:34:00 -0800 Subject: [PATCH 5/8] Add ondelete option to parent_id, runbot fails to lack of attribute. --- partner_contact_department/models/res_partner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index 20e2cfd27..0bf3eb793 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -28,7 +28,8 @@ class ResPartnerDepartment(models.Model): name = fields.Char(required=True, translate=True) parent_id = fields.Many2one( "res.partner.department", - "Parent department") + "Parent department", + ondelete='cascade') child_ids = fields.One2many( "res.partner.department", "parent_id", From 3dbfede4233011b16ed3736edd4026bc3029be28 Mon Sep 17 00:00:00 2001 From: Fekete Mihai Date: Mon, 25 Jan 2016 02:22:26 -0800 Subject: [PATCH 6/8] Update ondelete to restrict. --- partner_contact_department/models/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index 0bf3eb793..5efdd40c0 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -29,7 +29,7 @@ class ResPartnerDepartment(models.Model): parent_id = fields.Many2one( "res.partner.department", "Parent department", - ondelete='cascade') + ondelete='restrict') child_ids = fields.One2many( "res.partner.department", "parent_id", From 63b26001bab997600a1c25ec65d690e644abe904 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 30 Jan 2016 17:16:15 -0500 Subject: [PATCH 7/8] OCA Transbot updated translations from Transifex --- partner_contact_department/i18n/es.po | 33 ++++--- .../i18n/{en.po => fi.po} | 34 +++---- partner_contact_department/i18n/it.po | 94 +++++++++++++++++++ partner_contact_department/i18n/sl.po | 16 +++- 4 files changed, 146 insertions(+), 31 deletions(-) rename partner_contact_department/i18n/{en.po => fi.po} (82%) create mode 100644 partner_contact_department/i18n/it.po diff --git a/partner_contact_department/i18n/es.po b/partner_contact_department/i18n/es.po index e3c3ae378..7c422d0cc 100644 --- a/partner_contact_department/i18n/es.po +++ b/partner_contact_department/i18n/es.po @@ -1,21 +1,22 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * crm_partner_department -# +# * partner_contact_department +# +# Translators: +# Oihane Crucelaegui , 2016 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: partner-contact (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" +"POT-Creation-Date: 2016-07-25 11:58+0000\n" +"PO-Revision-Date: 2016-07-14 09:05+0000\n" +"Last-Translator: Oihane Crucelaegui \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-partner-contact-8-0/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" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: partner_contact_department #: field:res.partner.department,child_ids:0 @@ -47,11 +48,21 @@ msgstr "Departamento" msgid "Departments" msgstr "Departamentos" +#. module: partner_contact_department +#: field:res.partner.department,display_name:0 +msgid "Display Name" +msgstr "Nombre mostrado" + #. module: partner_contact_department #: field:res.partner.department,id:0 msgid "ID" msgstr "ID" +#. module: partner_contact_department +#: field:res.partner.department,__last_update:0 +msgid "Last Modified on" +msgstr "Última modificación el" + #. module: partner_contact_department #: field:res.partner.department,write_uid:0 msgid "Last Updated by" diff --git a/partner_contact_department/i18n/en.po b/partner_contact_department/i18n/fi.po similarity index 82% rename from partner_contact_department/i18n/en.po rename to partner_contact_department/i18n/fi.po index 66faf09ba..004f29ba6 100644 --- a/partner_contact_department/i18n/en.po +++ b/partner_contact_department/i18n/fi.po @@ -7,30 +7,30 @@ msgid "" msgstr "" "Project-Id-Version: partner-contact (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-08 01:38+0000\n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" "PO-Revision-Date: 2015-12-22 15:56+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/en/)\n" +"Last-Translator: <>\n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: en\n" +"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: partner_contact_department #: field:res.partner.department,child_ids:0 msgid "Child departments" -msgstr "Child departments" +msgstr "" #. module: partner_contact_department #: field:res.partner.department,create_uid:0 msgid "Created by" -msgstr "Created by" +msgstr "Luonut" #. module: partner_contact_department #: field:res.partner.department,create_date:0 msgid "Created on" -msgstr "Created on" +msgstr "Luotu" #. module: partner_contact_department #: model:ir.model,name:partner_contact_department.model_res_partner_department @@ -38,14 +38,14 @@ msgstr "Created on" #: view:res.partner:partner_contact_department.view_res_partner_filter_department #: field:res.partner,department_id:0 msgid "Department" -msgstr "Department" +msgstr "" #. 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 "Departments" +msgstr "" #. module: partner_contact_department #: field:res.partner.department,id:0 @@ -55,39 +55,39 @@ msgstr "ID" #. module: partner_contact_department #: field:res.partner.department,write_uid:0 msgid "Last Updated by" -msgstr "Last Updated by" +msgstr "Viimeksi päivitetty" #. module: partner_contact_department #: field:res.partner.department,write_date:0 msgid "Last Updated on" -msgstr "Last Updated on" +msgstr "Viimeksi päivittänyt" #. module: partner_contact_department #: field:res.partner.department,name:0 msgid "Name" -msgstr "Name" +msgstr "Nimi" #. module: partner_contact_department #: field:res.partner.department,parent_id:0 msgid "Parent department" -msgstr "Parent department" +msgstr "" #. module: partner_contact_department #: field:res.partner.department,parent_left:0 msgid "Parent left" -msgstr "Parent left" +msgstr "" #. module: partner_contact_department #: field:res.partner.department,parent_right:0 msgid "Parent right" -msgstr "Parent right" +msgstr "" #. module: partner_contact_department #: model:ir.model,name:partner_contact_department.model_res_partner msgid "Partner" -msgstr "Partner" +msgstr "Kumppani" #. module: partner_contact_department #: view:res.partner:partner_contact_department.view_res_partner_filter_department msgid "Salesperson" -msgstr "Salesperson" +msgstr "Myyjä" diff --git a/partner_contact_department/i18n/it.po b/partner_contact_department/i18n/it.po new file mode 100644 index 000000000..5bae950e7 --- /dev/null +++ b/partner_contact_department/i18n/it.po @@ -0,0 +1,94 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_department +# +# Translators: +# Paolo Valier, 2016 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-13 00:57+0000\n" +"PO-Revision-Date: 2016-03-13 17:22+0000\n" +"Last-Translator: Paolo Valier\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: partner_contact_department +#: field:res.partner.department,child_ids:0 +msgid "Child departments" +msgstr "" + +#. module: partner_contact_department +#: field:res.partner.department,create_uid:0 +msgid "Created by" +msgstr "Creato da" + +#. module: partner_contact_department +#: field:res.partner.department,create_date:0 +msgid "Created on" +msgstr "Creato il" + +#. 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 "" + +#. 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 "" + +#. 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 "Ultimo aggiornamento di" + +#. module: partner_contact_department +#: field:res.partner.department,write_date:0 +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: partner_contact_department +#: field:res.partner.department,name:0 +msgid "Name" +msgstr "Nome" + +#. module: partner_contact_department +#: field:res.partner.department,parent_id:0 +msgid "Parent department" +msgstr "" + +#. module: partner_contact_department +#: field:res.partner.department,parent_left:0 +msgid "Parent left" +msgstr "" + +#. module: partner_contact_department +#: field:res.partner.department,parent_right:0 +msgid "Parent right" +msgstr "" + +#. module: partner_contact_department +#: model:ir.model,name:partner_contact_department.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: partner_contact_department +#: view:res.partner:partner_contact_department.view_res_partner_filter_department +msgid "Salesperson" +msgstr "" diff --git a/partner_contact_department/i18n/sl.po b/partner_contact_department/i18n/sl.po index c236cc7aa..717fc20c1 100644 --- a/partner_contact_department/i18n/sl.po +++ b/partner_contact_department/i18n/sl.po @@ -3,13 +3,13 @@ # * partner_contact_department # # Translators: -# Matjaž Mozetič , 2015 +# Matjaž Mozetič , 2015-2016 msgid "" msgstr "" "Project-Id-Version: partner-contact (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-08 01:38+0000\n" -"PO-Revision-Date: 2015-12-23 14:13+0000\n" +"POT-Creation-Date: 2016-05-07 07:18+0000\n" +"PO-Revision-Date: 2016-05-07 07:15+0000\n" "Last-Translator: Matjaž Mozetič \n" "Language-Team: Slovenian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/sl/)\n" "MIME-Version: 1.0\n" @@ -48,11 +48,21 @@ msgstr "Oddelek" msgid "Departments" msgstr "Oddelki" +#. module: partner_contact_department +#: field:res.partner.department,display_name:0 +msgid "Display Name" +msgstr "Prikazni naziv" + #. module: partner_contact_department #: field:res.partner.department,id:0 msgid "ID" msgstr "ID" +#. module: partner_contact_department +#: field:res.partner.department,__last_update:0 +msgid "Last Modified on" +msgstr "Zadnjič spremenjeno" + #. module: partner_contact_department #: field:res.partner.department,write_uid:0 msgid "Last Updated by" From 5e09fe024b7f2f6d04595d7d0a4507a4d6fdc138 Mon Sep 17 00:00:00 2001 From: cubells Date: Sat, 12 Nov 2016 17:20:05 +0100 Subject: [PATCH 8/8] [MIG] partner_contact_department * Add tests * Other minor changes --- partner_contact_department/README.rst | 11 +-- partner_contact_department/__init__.py | 7 +- partner_contact_department/__openerp__.py | 16 ++-- partner_contact_department/models/__init__.py | 7 +- .../models/res_partner.py | 16 ++-- partner_contact_department/tests/__init__.py | 5 ++ .../tests/test_recursion.py | 31 +++++++ .../views/res_partner_department_view.xml | 75 ++++++++--------- .../views/res_partner_view.xml | 84 +++++++++---------- 9 files changed, 137 insertions(+), 115 deletions(-) create mode 100644 partner_contact_department/tests/__init__.py create mode 100644 partner_contact_department/tests/test_recursion.py diff --git a/partner_contact_department/README.rst b/partner_contact_department/README.rst index f15fcdce0..85d5a154f 100644 --- a/partner_contact_department/README.rst +++ b/partner_contact_department/README.rst @@ -29,7 +29,7 @@ To use this module, you need to: .. 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 + :target: https://runbot.odoo-community.org/runbot/134/9.0 Bug Tracker =========== @@ -37,11 +37,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 -`_. +help us smashing it by providing a detailed and welcomed feedback. Credits ======= @@ -49,7 +45,7 @@ Credits Images ------ -* `Antiun Ingeniería S.L. `_: Icon. +* Odoo Community Association: `Icon `_. Contributors ------------ @@ -58,6 +54,7 @@ Contributors * Antonio Espinosa * Rafael Blasco * Jairo Llopis +* Vicent Cubells Maintainer ---------- diff --git a/partner_contact_department/__init__.py b/partner_contact_department/__init__.py index 9af8488e4..44de80558 100644 --- a/partner_contact_department/__init__.py +++ b/partner_contact_department/__init__.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# Antonio Espinosa -# © 2015 Antiun Ingeniería S.L. - Jairo Llopis +# © 2014-2015 Tecnativa S.L. - Jairo Llopis +# © 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/partner_contact_department/__openerp__.py b/partner_contact_department/__openerp__.py index a5323db87..080b98a55 100644 --- a/partner_contact_department/__openerp__.py +++ b/partner_contact_department/__openerp__.py @@ -1,21 +1,17 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# Antonio Espinosa -# © 2015 Antiun Ingeniería S.L. - Jairo Llopis +# © 2014-2015 Tecnativa S.L. - Jairo Llopis +# © 2016 Tecnativa S.L. - Vicent Cubells # 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', + 'version': '9.0.1.0.0', 'category': 'Customer Relationship Management', - 'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza, ' - 'Antiun Ingeniería S.L., ' - "Odoo Community Association (OCA)", + 'author': 'Tecnativa, ' + 'Odoo Community Association (OCA)', "license": "AGPL-3", - 'website': 'http://www.antiun.com', + 'website': 'http://www.tecnativa.com', "application": False, 'depends': [ 'base', diff --git a/partner_contact_department/models/__init__.py b/partner_contact_department/models/__init__.py index 213b25fdc..6393dbaea 100644 --- a/partner_contact_department/models/__init__.py +++ b/partner_contact_department/models/__init__.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# Antonio Espinosa -# © 2015 Antiun Ingeniería S.L. - Jairo Llopis +# © 2014-2015 Tecnativa S.L. - Jairo Llopis +# © 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import res_partner diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index 5efdd40c0..94946ae8f 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -1,12 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) -# Pedro M. Baeza -# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) -# Antonio Espinosa -# © 2015 Antiun Ingeniería S.L. - Jairo Llopis +# © 2014-2015 Tecnativa S.L. - Jairo Llopis +# © 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from openerp import models, fields, api, _ +from openerp.exceptions import ValidationError class ResPartner(models.Model): @@ -37,3 +35,9 @@ class ResPartnerDepartment(models.Model): oldname="children") parent_left = fields.Integer(index=True) parent_right = fields.Integer(index=True) + + @api.constrains('parent_id') + def _check_parent_id(self): + if not self._check_recursion(): + raise ValidationError( + _('Error! You cannot create recursive departments.')) diff --git a/partner_contact_department/tests/__init__.py b/partner_contact_department/tests/__init__.py new file mode 100644 index 000000000..7630da7d4 --- /dev/null +++ b/partner_contact_department/tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2016 Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0). + +from . import test_recursion diff --git a/partner_contact_department/tests/test_recursion.py b/partner_contact_department/tests/test_recursion.py new file mode 100644 index 000000000..90204dd0b --- /dev/null +++ b/partner_contact_department/tests/test_recursion.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# © 2016 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0). +from openerp.tests import common +from openerp.exceptions import ValidationError + + +class TestRecursion(common.SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestRecursion, cls).setUpClass() + cls.department_obj = cls.env['res.partner.department'] + + # Instances + cls.dpt1 = cls.department_obj.create(vals=dict(name='Dpt. 1')) + cls.dpt2 = cls.department_obj.create( + vals=dict( + name='Dpt. 2', + parent_id=cls.dpt1.id + )) + + def test_recursion(self): + """ Testing recursion """ + self.dpt3 = self.department_obj.create(vals=dict( + name='Dpt. 3', + parent_id=self.dpt2.id + )) + # Creating a parent's child department using dpt1. + with self.assertRaises(ValidationError): + self.dpt1.write(vals={'parent_id': self.dpt3.id}) diff --git a/partner_contact_department/views/res_partner_department_view.xml b/partner_contact_department/views/res_partner_department_view.xml index f7aae91f9..f07ab520c 100644 --- a/partner_contact_department/views/res_partner_department_view.xml +++ b/partner_contact_department/views/res_partner_department_view.xml @@ -1,47 +1,44 @@ - + - - + - - Departments - res.partner.department - form - tree - + + Departments + res.partner.department + form + tree + - - CRM department tree - res.partner.department - - - - - - - - - - CRM department form - res.partner.department - -
- + + CRM department tree + res.partner.department + + - - -
-
-
+ + + + + + CRM department form + res.partner.department + +
+ + + + + +
+
+
- + -
-
+ diff --git a/partner_contact_department/views/res_partner_view.xml b/partner_contact_department/views/res_partner_view.xml index 108a2415e..e97e209a8 100644 --- a/partner_contact_department/views/res_partner_view.xml +++ b/partner_contact_department/views/res_partner_view.xml @@ -1,49 +1,47 @@ - + - - + - - Partner form with department - res.partner - - - - - - - - - - - + + Partner form with department + res.partner + + + + + + + + + + + - - Partner search with department - res.partner - - - - + + Partner search with department + res.partner + + + + + + + + - - - - - + - - +