Browse Source

[ADD] Added migrated partner_auto_salesman module to v11

pull/542/head
Jay Vora(SerpentCS) 7 years ago
parent
commit
a1a2545f06
  1. 63
      partner_auto_salesman/README.rst
  2. 22
      partner_auto_salesman/__init__.py
  3. 28
      partner_auto_salesman/__manifest__.py
  4. 23
      partner_auto_salesman/i18n/es.po
  5. 23
      partner_auto_salesman/i18n/nl.po
  6. 24
      partner_auto_salesman/i18n/pt_BR.po
  7. 24
      partner_auto_salesman/i18n/sl.po
  8. 22
      partner_auto_salesman/i18n/sl_SI.po
  9. 4
      partner_auto_salesman/models/__init__.py
  10. 14
      partner_auto_salesman/models/res_partner.py
  11. 27
      partner_auto_salesman/res_partner.py

63
partner_auto_salesman/README.rst

@ -0,0 +1,63 @@
.. 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.
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
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.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Serpent Consulting Services Pvt. Ltd. <jay.vora@serpentcs.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.

22
partner_auto_salesman/__init__.py

@ -1,22 +1,4 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import res_partner
from . import models

28
partner_auto_salesman/__manifest__.py

@ -1,35 +1,15 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{ {
'name': 'Partner auto salesman',
'version': '8.0.1.0.0',
'name': 'Partner auto salesman - v11',
'version': '11.0.0.1.0',
'category': 'Customer Relationship Management', 'category': 'Customer Relationship Management',
'complexity': "easy", 'complexity': "easy",
'description': """Fill the salesman field with the current user id""",
'author': "Savoir-faire Linux,Odoo Community Association (OCA)", 'author': "Savoir-faire Linux,Odoo Community Association (OCA)",
'website': 'http://www.savoirfairelinux.com', 'website': 'http://www.savoirfairelinux.com',
'license': 'AGPL-3', 'license': 'AGPL-3',
'depends': ['base'], 'depends': ['base'],
'installable': False,
'installable': True,
'auto_install': False, 'auto_install': False,
} }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

23
partner_auto_salesman/i18n/es.po

@ -1,23 +1,22 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * partner_auto_salesman
#
# Translators:
# * partner_auto_salesman
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: partner-contact (8.0)\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-09 15:48+0000\n"
"PO-Revision-Date: 2015-10-06 13:57+0000\n"
"Last-Translator: Maxime Chambreuil <maxime.chambreuil@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/es/)\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" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: \n"
#. module: partner_auto_salesman #. module: partner_auto_salesman
#: model:ir.model,name:partner_auto_salesman.model_res_partner #: model:ir.model,name:partner_auto_salesman.model_res_partner
msgid "Partner"
msgstr "Empresa"
msgid "Contact"
msgstr "Contact"

23
partner_auto_salesman/i18n/nl.po

@ -1,23 +1,22 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * partner_auto_salesman
#
# Translators:
# * partner_auto_salesman
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: partner-contact (8.0)\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-23 21:40+0000\n"
"PO-Revision-Date: 2015-10-01 12:32+0000\n"
"Last-Translator: Maxime Chambreuil <maxime.chambreuil@gmail.com>\n"
"Language-Team: Dutch (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/nl/)\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" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: \n"
#. module: partner_auto_salesman #. module: partner_auto_salesman
#: model:ir.model,name:partner_auto_salesman.model_res_partner #: model:ir.model,name:partner_auto_salesman.model_res_partner
msgid "Partner"
msgstr "Partner"
msgid "Contact"
msgstr "Contact"

24
partner_auto_salesman/i18n/pt_BR.po

@ -1,24 +1,22 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * partner_auto_salesman
#
# Translators:
# danimaribeiro <danimaribeiro@gmail.com>, 2015
# * partner_auto_salesman
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: partner-contact (8.0)\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-28 15:54+0000\n"
"PO-Revision-Date: 2015-07-22 18:28+0000\n"
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/pt_BR/)\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" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Plural-Forms: \n"
#. module: partner_auto_salesman #. module: partner_auto_salesman
#: model:ir.model,name:partner_auto_salesman.model_res_partner #: model:ir.model,name:partner_auto_salesman.model_res_partner
msgid "Partner"
msgstr "Parceiro"
msgid "Contact"
msgstr "Contact"

24
partner_auto_salesman/i18n/sl.po

@ -1,24 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_auto_salesman
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
msgid ""
msgstr ""
"Project-Id-Version: partner-contact (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-28 15:54+0000\n"
"PO-Revision-Date: 2015-05-28 07:14+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\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_auto_salesman
#: model:ir.model,name:partner_auto_salesman.model_res_partner
msgid "Partner"
msgstr "Partner"

22
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"

4
partner_auto_salesman/models/__init__.py

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import res_partner

14
partner_auto_salesman/models/res_partner.py

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import 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)

27
partner_auto_salesman/res_partner.py

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import orm
class res_partner(orm.Model):
_inherit = 'res.partner'
_defaults = {'user_id': lambda self, cr, uid, context: uid}
Loading…
Cancel
Save