diff --git a/login_user_detail/README.rst b/login_user_detail/README.rst new file mode 100644 index 000000000..255a11d62 --- /dev/null +++ b/login_user_detail/README.rst @@ -0,0 +1,20 @@ +User Log Details v10 +==================== + +This module developed to record login details of user. + +Installation +============ + +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= + +Nothing to configure. + +Credits +======= + +Developer: Saritha @ cybrosys + diff --git a/login_user_detail/__init__.py b/login_user_detail/__init__.py new file mode 100644 index 000000000..ff4fe0928 --- /dev/null +++ b/login_user_detail/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Saritha Sahadevan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import models diff --git a/login_user_detail/__manifest__.py b/login_user_detail/__manifest__.py new file mode 100644 index 000000000..55aac2c29 --- /dev/null +++ b/login_user_detail/__manifest__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Saritha Sahadevan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': "User Log Details", + 'version': '10.0.1.0.0', + 'summary': """Login User Details""", + 'description': """This module records login information of user""", + 'author': "Cybrosys Techno Solutions ", + 'website': "https://www.cybrosys.com", + 'category': 'Tools', + 'depends': ['base'], + 'data': ['views/login_user_views.xml'], +} \ No newline at end of file diff --git a/login_user_detail/models/__init__.py b/login_user_detail/models/__init__.py new file mode 100644 index 000000000..6305c1607 --- /dev/null +++ b/login_user_detail/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Saritha Sahadevan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import login_user_details diff --git a/login_user_detail/models/login_user_details.py b/login_user_detail/models/login_user_details.py new file mode 100644 index 000000000..213f6aa21 --- /dev/null +++ b/login_user_detail/models/login_user_details.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Saritha Sahadevan() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import logging +from itertools import chain +from datetime import datetime +from odoo.http import request +from odoo import models, fields, api + +_logger = logging.getLogger(__name__) +USER_PRIVATE_FIELDS = ['password'] +concat = chain.from_iterable + + +class LoginUserDetail(models.Model): + _inherit = 'res.users' + + @api.model + def check_credentials(self, password): + result = super(LoginUserDetail, self).check_credentials(password) + ip_address = request.httprequest.environ['REMOTE_ADDR'] + vals = {'name': self.name, + 'ip_address': ip_address + } + self.env['login.detail'].sudo().create(vals) + return result + + +class LoginUpdate(models.Model): + _name = 'login.detail' + + name = fields.Char(string="User Name") + date_time = fields.Datetime(string="Login Date And Time", default=datetime.now()) + ip_address = fields.Char(string="IP Address") + diff --git a/login_user_detail/static/description/banner.png b/login_user_detail/static/description/banner.png new file mode 100644 index 000000000..65f71eaa3 Binary files /dev/null and b/login_user_detail/static/description/banner.png differ diff --git a/login_user_detail/static/description/cybro_logo.png b/login_user_detail/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/login_user_detail/static/description/cybro_logo.png differ diff --git a/login_user_detail/static/description/icon.png b/login_user_detail/static/description/icon.png new file mode 100644 index 000000000..724a2717f Binary files /dev/null and b/login_user_detail/static/description/icon.png differ diff --git a/login_user_detail/static/description/index.html b/login_user_detail/static/description/index.html new file mode 100644 index 000000000..ae7daf401 --- /dev/null +++ b/login_user_detail/static/description/index.html @@ -0,0 +1,49 @@ +
+
+

User Log Details

+

Records User Log Details

+

Cybrosys Technologies , www.cybrosys.com

+
+
+ +
+
+
+

Overview

+

+ User Log Details, Record login date,IP Address of login user. +

+
+
+
+ +
+
+

Login Details

+
+
+ +
+
+
+
+ +
+

Need Any Help?

+ + +
+ + + + diff --git a/login_user_detail/static/description/login.png b/login_user_detail/static/description/login.png new file mode 100644 index 000000000..99dd178f1 Binary files /dev/null and b/login_user_detail/static/description/login.png differ diff --git a/login_user_detail/views/login_user_views.xml b/login_user_detail/views/login_user_views.xml new file mode 100644 index 000000000..1b49d4f1c --- /dev/null +++ b/login_user_detail/views/login_user_views.xml @@ -0,0 +1,42 @@ + + + + + Login User Details + login.detail + +
+ + + + + + + +
+
+
+ + + Login User Details + login.detail + + + + + + + + + + + Login User Details + login.detail + tree,form + + + + +
+
\ No newline at end of file diff --git a/partner_geo_map_location/__init__.py b/partner_geo_map_location/__init__.py new file mode 100644 index 000000000..01162f63c --- /dev/null +++ b/partner_geo_map_location/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import models \ No newline at end of file diff --git a/partner_geo_map_location/__manifest__.py b/partner_geo_map_location/__manifest__.py new file mode 100644 index 000000000..c0edbdd71 --- /dev/null +++ b/partner_geo_map_location/__manifest__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': 'Partners Location Map', + 'summary': """Partners geo location can view in the Google Map""", + 'version': '10.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + "category": "Sales", + 'depends': ['crm', 'web_map'], + 'data': ['views/partner_map.xml', + ], + 'demo': [ + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, +} diff --git a/partner_geo_map_location/models/__init__.py b/partner_geo_map_location/models/__init__.py new file mode 100644 index 000000000..4de433b1a --- /dev/null +++ b/partner_geo_map_location/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import partner_map \ No newline at end of file diff --git a/partner_geo_map_location/models/partner_map.py b/partner_geo_map_location/models/partner_map.py new file mode 100644 index 000000000..d4f3e2c18 --- /dev/null +++ b/partner_geo_map_location/models/partner_map.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2016-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import json +from odoo.addons.base_geolocalize.models.res_partner import geo_find, geo_query_address +from odoo import models, fields, api + + +class PartnerGeoLocation(models.Model): + _inherit = 'res.partner' + + google_map_partner = fields.Char(string="Map") + + @api.onchange('zip', 'street', 'city', 'state_id', 'country_id') + def map_location_setter(self): + result = geo_find(geo_query_address(street=self.street, + zip=self.zip, + city=self.city, + state=self.state_id.name, + country=self.country_id.name)) + if result: + if not self.google_map_partner: + maps_loc = {u'position': {u'lat': 20.593684, u'lng': 78.96288}, u'zoom': 3} + json_map = json.dumps(maps_loc) + self.google_map_partner = json_map + if self.google_map_partner: + map_loc = self.google_map_partner + maps_loc = json.loads(map_loc) + maps_loc['position']['lat'] = result[0] + maps_loc['position']['lng'] = result[1] + maps_loc['zoom'] = 3 + json_map = json.dumps(maps_loc) + self.google_map_partner = json_map diff --git a/partner_geo_map_location/static/description/banner.jpg b/partner_geo_map_location/static/description/banner.jpg new file mode 100644 index 000000000..6b632251a Binary files /dev/null and b/partner_geo_map_location/static/description/banner.jpg differ diff --git a/partner_geo_map_location/static/description/cybro_logo.png b/partner_geo_map_location/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/partner_geo_map_location/static/description/cybro_logo.png differ diff --git a/partner_geo_map_location/static/description/icon.png b/partner_geo_map_location/static/description/icon.png new file mode 100644 index 000000000..5a9d06079 Binary files /dev/null and b/partner_geo_map_location/static/description/icon.png differ diff --git a/partner_geo_map_location/static/description/index.html b/partner_geo_map_location/static/description/index.html new file mode 100644 index 000000000..3af175d86 --- /dev/null +++ b/partner_geo_map_location/static/description/index.html @@ -0,0 +1,86 @@ +
+
+

Partners Location Map

+

Partners Location Map Created According To Their Address

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Automatically creates Map.
  • +
  •    Every field of Address is evaluated.
  • +
+
+
+
+ +
+
+

Overview

+
+
+

This module is an extension of CRM module in odoo. + It is dependent to web_map module developed by CodUP. + The Map is loaded automatically according to the address we give. + Every field of address is evaluated (eg:zip, country etc).The Map is + created when you create a partner along with an address. +

+
+
+
+
+ +
+
+

Address

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

Map Tab

+
+
+
+ +
+
+
+

This is the Map Tab. The Map is created according to the address you + give.

+
+
+
+
+ +
+

Need Any Help?

+ +
diff --git a/partner_geo_map_location/static/description/partner_map1.png b/partner_geo_map_location/static/description/partner_map1.png new file mode 100644 index 000000000..c7a8bcbcd Binary files /dev/null and b/partner_geo_map_location/static/description/partner_map1.png differ diff --git a/partner_geo_map_location/static/description/partner_map2.png b/partner_geo_map_location/static/description/partner_map2.png new file mode 100644 index 000000000..0b0e7442d Binary files /dev/null and b/partner_geo_map_location/static/description/partner_map2.png differ diff --git a/partner_geo_map_location/views/partner_map.xml b/partner_geo_map_location/views/partner_map.xml new file mode 100644 index 000000000..647f51b96 --- /dev/null +++ b/partner_geo_map_location/views/partner_map.xml @@ -0,0 +1,17 @@ + + + + + partner_google_map_form_view.page + res.partner + + + + + + + + + + + \ No newline at end of file