diff --git a/first_last_name/README.rst b/first_last_name/README.rst new file mode 100755 index 000000000..c8f90b346 --- /dev/null +++ b/first_last_name/README.rst @@ -0,0 +1,32 @@ +Contact First And Last Name v11 +=========================== +This module will helps you to give the first name and last name for your contact + +Features +======== + +* First Name, Last Name , Nick Name for Contacts. + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/11.0/setup/install.html +- Install our custom addon + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + + +Developer: Tintuk Tomin @ cybrosys, odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/first_last_name/__init__.py b/first_last_name/__init__.py new file mode 100644 index 000000000..5305644df --- /dev/null +++ b/first_last_name/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models \ No newline at end of file diff --git a/first_last_name/__manifest__.py b/first_last_name/__manifest__.py new file mode 100755 index 000000000..43ae8ffff --- /dev/null +++ b/first_last_name/__manifest__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# you can modify it under the terms of the GNU AGPL (v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 AGPL (AGPL v3) for more details. +# +############################################################################## + +{ + 'name': 'Contact First And Last Name', + 'version': '12.0.1.0.0', + 'summary': """This module will helps you to give the first name and last name for your contact.""", + 'description': "Module helps you to manage the first name and last name of your partner as well as in the contacts.", + 'category': "Human Resource", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base','contacts'], + 'data': ['security/ir.model.access.csv', + 'views/name_view.xml' + ], + 'demo': [], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': True, +} diff --git a/first_last_name/doc/RELEASE_NOTES.md b/first_last_name/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..ab80d2bdc --- /dev/null +++ b/first_last_name/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 09.04.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit diff --git a/first_last_name/models/__init__.py b/first_last_name/models/__init__.py new file mode 100644 index 000000000..6c774821c --- /dev/null +++ b/first_last_name/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import name \ No newline at end of file diff --git a/first_last_name/models/name.py b/first_last_name/models/name.py new file mode 100644 index 000000000..cfd088a36 --- /dev/null +++ b/first_last_name/models/name.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +from odoo import api, models, fields + +class FirstNameLastName(models.Model): + _inherit = 'res.partner' + + first_name = fields.Char(string='First Name', compute='_compute_first_name', readonly=False) + last_name = fields.Char(string='Last Name', compute='_compute_last_name', readonly=False) + nick_name = fields.Char(string='Nick Name') + + @api.onchange('last_name', 'first_name') + def _onchange_first_last_name(self): + if self.first_name and self.last_name: + self.name = (self.first_name + ' ' + self.last_name) + + @api.onchange('name') + def _onchange_name(self): + if self.name: + name = self.name + list = name.split(' ', 1) + self.first_name = list[0] + self.last_name = list[1] + + @api.depends('name') + def _compute_first_name(self): + if self.name: + name = self.name + list = name.split(' ', 1) + self.first_name = list[0] + + @api.depends('name') + def _compute_last_name(self): + if self.name: + name = self.name + list = name.split(' ', 1) + self.last_name = list[1] diff --git a/first_last_name/security/ir.model.access.csv b/first_last_name/security/ir.model.access.csv new file mode 100644 index 000000000..d9ab32c29 --- /dev/null +++ b/first_last_name/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +res_partner_id,res.partner.name,model_res_partner,hr.group_hr_manager,1,1,1,1 diff --git a/first_last_name/static/description/banner.png b/first_last_name/static/description/banner.png new file mode 100644 index 000000000..79a7f3bbb Binary files /dev/null and b/first_last_name/static/description/banner.png differ diff --git a/first_last_name/static/description/icon.png b/first_last_name/static/description/icon.png new file mode 100644 index 000000000..97ac846d6 Binary files /dev/null and b/first_last_name/static/description/icon.png differ diff --git a/first_last_name/static/description/index.html b/first_last_name/static/description/index.html new file mode 100644 index 000000000..0af52dd0f --- /dev/null +++ b/first_last_name/static/description/index.html @@ -0,0 +1,335 @@ +
+
+

+ First Name & Last Name for Contacts +

+

+ Provides option for names in Contacts +

+
+ Cybrosys Technologies +
+ +
+ cybrosys technologies
+
+
+
+
+
+

+ Overview +

+

+ Provides option to add first name, last name and nick name for all contacts including partners. +

+
+
+

+ Configuration +

+

+ No additional configuration is required. +

+
+
+ +
+
+

+ Features +

+

+ + First name +

+

+ + Last name +

+ + Nick name +

+
+
+
+
+

+ Screenshots +

+

+ + Provision for First, Last and Nick names for all contacts +

+
+ +
+
+
+ +
+
+ cybrosys technologies +
+
+ +
+
+

+ Our Services +

+
+ + + +
+ +
+ + + +
+

+ + Odoo Support +

+ +
+ +
+
+
+
+
+

+ Our Industries +

+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Trading + +

+

+ Easily procure and sell your products. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Manufacturing +

+

+ Plan, track and schedule your operations. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Restaurant +

+

+ Run your bar or restaurant methodical. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + POS +

+

+ Easy configuring and convivial selling. +

+
+ +
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + E-commerce & Website +

+

+ Mobile friendly, awe-inspiring product pages. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Hotel Management +

+

+ An all-inclusive hotel management application. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Education +

+

+ A Collaborative platform for educational management. +

+
+
+
+ +
+
+ + Odoo Industry + +
+
+
+

+ + Service Management +

+

+ Keep track of services and invoice accordingly. +

+
+
+
+
+
+
+ +
diff --git a/first_last_name/static/description/partner-first-last-name-cybrosys.png b/first_last_name/static/description/partner-first-last-name-cybrosys.png new file mode 100644 index 000000000..942c68e67 Binary files /dev/null and b/first_last_name/static/description/partner-first-last-name-cybrosys.png differ diff --git a/first_last_name/views/name_view.xml b/first_last_name/views/name_view.xml new file mode 100644 index 000000000..f7166f08b --- /dev/null +++ b/first_last_name/views/name_view.xml @@ -0,0 +1,20 @@ + + + + + res.partner.simplified.form.inheritted + res.partner + + + + + + + + + + + + + + \ No newline at end of file