diff --git a/partner_auto_salesman/LICENSE/LICENSE b/partner_auto_salesman/LICENSE/LICENSE new file mode 100644 index 000000000000..bc599b203b56 --- /dev/null +++ b/partner_auto_salesman/LICENSE/LICENSE @@ -0,0 +1,15 @@ + OpenERP, Open Source Management Solution + Copyright (C) 2013 Savoir-faire Linux (). + + 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 . \ No newline at end of file diff --git a/partner_auto_salesman/README.rst b/partner_auto_salesman/README.rst new file mode 100644 index 000000000000..17827bd832d9 --- /dev/null +++ b/partner_auto_salesman/README.rst @@ -0,0 +1,76 @@ +.. 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 Auto Salesman +===================== + +This module adds the current logged in user to be the default salesman of the +partner being created. + +Installation +============ + +There are no special instructions regarding installation. + +Configuration +============= + +No configuration is needed. + +Usage +===== + +Just create a new partner record and autoatically the user will be set as a responsible salesman for him. + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 +* https://github.com/OCA/partner-contact/ + +.. 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/11.0 + +Known issues / Roadmap +====================== + +* No known issues. + +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 +------ + +* Odoo Community Association: `Icon `_. + + +Contributors +------------ + +* Serpent Consulting Services Pvt. Ltd. + +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 http://odoo-community.org. diff --git a/partner_auto_salesman/__init__.py b/partner_auto_salesman/__init__.py new file mode 100644 index 000000000000..956aa1b78a9f --- /dev/null +++ b/partner_auto_salesman/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# See LICENSE file for full copyright and licensing details. + +from . import models diff --git a/partner_auto_salesman/__manifest__.py b/partner_auto_salesman/__manifest__.py new file mode 100644 index 000000000000..2ac745b78282 --- /dev/null +++ b/partner_auto_salesman/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# See LICENSE file for full copyright and licensing details. + +{ + 'name': 'Partner auto salesman - v11', + 'version': '11.0.0.1.0', + 'category': 'Customer Relationship Management', + 'complexity': "easy", + 'description': """Fill the salesman field with the current user id""", + 'author': "Savoir-faire Linux,Odoo Community Association (OCA)", + 'website': 'http://www.savoirfairelinux.com', + 'license': 'AGPL-3', + 'depends': ['base'], + 'installable': True, + 'auto_install': False, +} + diff --git a/partner_auto_salesman/i18n/es.po b/partner_auto_salesman/i18n/es.po new file mode 100644 index 000000000000..df3405f7b2fd --- /dev/null +++ b/partner_auto_salesman/i18n/es.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_auto_salesman +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 11:22+0000\n" +"PO-Revision-Date: 2018-01-03 11:22+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_auto_salesman +#: model:ir.model,name:partner_auto_salesman.model_res_partner +msgid "Contact" +msgstr "Contact" + diff --git a/partner_auto_salesman/i18n/nl.po b/partner_auto_salesman/i18n/nl.po new file mode 100644 index 000000000000..4cce4dd9abda --- /dev/null +++ b/partner_auto_salesman/i18n/nl.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_auto_salesman +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 11:23+0000\n" +"PO-Revision-Date: 2018-01-03 11:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_auto_salesman +#: model:ir.model,name:partner_auto_salesman.model_res_partner +msgid "Contact" +msgstr "Contact" + diff --git a/partner_auto_salesman/i18n/pt_BR.po b/partner_auto_salesman/i18n/pt_BR.po new file mode 100644 index 000000000000..b48d7f4c6530 --- /dev/null +++ b/partner_auto_salesman/i18n/pt_BR.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_auto_salesman +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 11:24+0000\n" +"PO-Revision-Date: 2018-01-03 11:24+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_auto_salesman +#: model:ir.model,name:partner_auto_salesman.model_res_partner +msgid "Contact" +msgstr "Contact" + diff --git a/partner_auto_salesman/i18n/sl_SI.po b/partner_auto_salesman/i18n/sl_SI.po new file mode 100644 index 000000000000..36ca2ac48ce0 --- /dev/null +++ b/partner_auto_salesman/i18n/sl_SI.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_auto_salesman +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 11:26+0000\n" +"PO-Revision-Date: 2018-01-03 11:26+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_auto_salesman +#: model:ir.model,name:partner_auto_salesman.model_res_partner +msgid "Contact" +msgstr "Contact" + diff --git a/partner_auto_salesman/models/__init__.py b/partner_auto_salesman/models/__init__.py new file mode 100644 index 000000000000..e54da7db1661 --- /dev/null +++ b/partner_auto_salesman/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# See LICENSE file for full copyright and licensing details. + +from . import res_partner diff --git a/partner_auto_salesman/models/res_partner.py b/partner_auto_salesman/models/res_partner.py new file mode 100644 index 000000000000..174c50101da0 --- /dev/null +++ b/partner_auto_salesman/models/res_partner.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models + + +class Partner(models.Model): + _inherit = 'res.partner' + + user_id = fields.Many2one('res.users', string='Salesperson', + help='The internal user that is in charge of communicating with this contact if any.', + default=lambda self: self.env.uid) + diff --git a/partner_auto_salesman/static/description/icon.png b/partner_auto_salesman/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/partner_auto_salesman/static/description/icon.png differ