Browse Source

Merge branch '11.0' of https://github.com/Nikhilkrishnan0101/CybroAddons into 11.0

pull/87/head
Nikhil Krishnan 7 years ago
parent
commit
32dc52b56d
  1. 17
      access_restriction_by_ip/README.rst
  2. 26
      access_restriction_by_ip/__init__.py
  3. 42
      access_restriction_by_ip/__manifest__.py
  4. 24
      access_restriction_by_ip/controllers/__init__.py
  5. 80
      access_restriction_by_ip/controllers/main.py
  6. 25
      access_restriction_by_ip/models/__init__.py
  7. 36
      access_restriction_by_ip/models/allowed_ips.py
  8. BIN
      access_restriction_by_ip/static/description/access_non_set_ip.png
  9. BIN
      access_restriction_by_ip/static/description/banner.jpg
  10. BIN
      access_restriction_by_ip/static/description/cybro_logo.png
  11. BIN
      access_restriction_by_ip/static/description/icon.png
  12. 69
      access_restriction_by_ip/static/description/index.html
  13. 82
      access_restriction_by_ip/static/description/index.html~
  14. BIN
      access_restriction_by_ip/static/description/user_set_ip.png
  15. 21
      access_restriction_by_ip/views/allowed_ips_view.xml
  16. 24
      auto_resend_mail/__init__.py
  17. 42
      auto_resend_mail/__manifest__.py
  18. 24
      auto_resend_mail/models/__init__.py
  19. 33
      auto_resend_mail/models/auto_resend.py
  20. BIN
      auto_resend_mail/static/description/banner.jpg
  21. BIN
      auto_resend_mail/static/description/cybro_logo.png
  22. BIN
      auto_resend_mail/static/description/icon.png
  23. 65
      auto_resend_mail/static/description/index.html
  24. 82
      auto_resend_mail/static/description/index.html~
  25. BIN
      auto_resend_mail/static/description/set_interval.png
  26. 16
      auto_resend_mail/views/auto_resend_cron.xml
  27. 13
      hide_cost_price/README.rst
  28. 22
      hide_cost_price/__init__.py
  29. 43
      hide_cost_price/__manifest__.py
  30. 43
      hide_cost_price/__manifest__.py~
  31. 9
      hide_cost_price/security/view_cost_price.xml
  32. BIN
      hide_cost_price/static/description/banner.jpg
  33. BIN
      hide_cost_price/static/description/cybro_logo.png
  34. BIN
      hide_cost_price/static/description/icon.png
  35. 75
      hide_cost_price/static/description/index.html
  36. 82
      hide_cost_price/static/description/index.html~
  37. BIN
      hide_cost_price/static/description/product_form_view.png
  38. BIN
      hide_cost_price/static/description/product_tree_view.png
  39. BIN
      hide_cost_price/static/description/user_adding_group.png
  40. 29
      hide_cost_price/views/hide_product_cost.xml
  41. 14
      hr_payslip_monthly_report/README.rst
  42. 22
      hr_payslip_monthly_report/__init__.py
  43. 43
      hr_payslip_monthly_report/__manifest__.py
  44. 45
      hr_payslip_monthly_report/__manifest__.py~
  45. 24
      hr_payslip_monthly_report/models/__init__.py
  46. 70
      hr_payslip_monthly_report/models/hr_payroll_report.py
  47. 2
      hr_payslip_monthly_report/security/ir.model.access.csv
  48. BIN
      hr_payslip_monthly_report/static/description/HR Payslip Report view.png
  49. BIN
      hr_payslip_monthly_report/static/description/HR report group by.png
  50. BIN
      hr_payslip_monthly_report/static/description/Payslip Graph Report.png
  51. BIN
      hr_payslip_monthly_report/static/description/banner.jpg
  52. BIN
      hr_payslip_monthly_report/static/description/cybro_logo.png
  53. BIN
      hr_payslip_monthly_report/static/description/icon.png
  54. 124
      hr_payslip_monthly_report/static/description/index.html
  55. 67
      hr_payslip_monthly_report/views/menu_payslip_report.xml
  56. 112
      hr_payslip_monthly_report/views/quotation_handler.xml~
  57. 20
      login_user_detail/README.rst
  58. 23
      login_user_detail/__init__.py
  59. 42
      login_user_detail/__manifest__.py
  60. 42
      login_user_detail/__manifest__.py~
  61. 8
      login_user_detail/doc/changelog.rst
  62. 23
      login_user_detail/models/__init__.py
  63. 52
      login_user_detail/models/login_user_details.py
  64. 2
      login_user_detail/security/ir.model.access.csv
  65. BIN
      login_user_detail/static/description/banner.png
  66. BIN
      login_user_detail/static/description/cybro_logo.png
  67. BIN
      login_user_detail/static/description/icon.png
  68. 59
      login_user_detail/static/description/index.html
  69. BIN
      login_user_detail/static/description/login.png
  70. 42
      login_user_detail/views/login_user_views.xml
  71. 14
      pos_ticket/README.rst
  72. 11
      pos_ticket/README.rst~
  73. 22
      pos_ticket/__init__.py
  74. 41
      pos_ticket/__manifest__.py
  75. 41
      pos_ticket/__manifest__.py~
  76. BIN
      pos_ticket/static/description/banner.jpg
  77. BIN
      pos_ticket/static/description/cybro_logo.png
  78. BIN
      pos_ticket/static/description/icon.png
  79. 78
      pos_ticket/static/description/index.html
  80. BIN
      pos_ticket/static/description/new_pos_logo.png
  81. BIN
      pos_ticket/static/description/new_receipt_pos.png
  82. BIN
      pos_ticket/static/description/old_pos_logo.png
  83. BIN
      pos_ticket/static/description/old_receipt.png
  84. 158
      pos_ticket/static/src/xml/pos_ticket_view.xml
  85. 12
      product_deletion/README.rst
  86. 23
      product_deletion/__init__.py
  87. 41
      product_deletion/__manifest__.py
  88. 23
      product_deletion/models/__init__.py
  89. 38
      product_deletion/models/product_deletion.py
  90. BIN
      product_deletion/static/description/banner.jpg
  91. BIN
      product_deletion/static/description/cybro_logo.png
  92. BIN
      product_deletion/static/description/deletion_warning.png
  93. BIN
      product_deletion/static/description/icon.png
  94. 48
      product_deletion/static/description/index.html
  95. 10
      product_deletion/views/product_deletion_group.xml
  96. 24
      sale_discount_total/__init__.py
  97. 55
      sale_discount_total/__manifest__.py
  98. 25
      sale_discount_total/models/__init__.py
  99. 102
      sale_discount_total/models/account_invoice.py
  100. 113
      sale_discount_total/models/discount_approval.py

17
access_restriction_by_ip/README.rst

@ -0,0 +1,17 @@
Access Restriction By IP V11
============================
This module will restrict users access to his account from the specified IP only. If user access his
account from non-specified IP, login will be restricted and a warning message will be displayed in
login page.
If no IP is specified for a user, then there will not be restriction by IP. He can access from any IP.
Credits
=======
Cybrosys Techno Solutions
Author
------
* Niyas Raphy <niyas@cybrosys.in>

26
access_restriction_by_ip/__init__.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import controllers
import models

42
access_restriction_by_ip/__manifest__.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Access Restriction By IP',
'summary': """User Can Access His Account Only From Specified IP Address""",
'version': '11.0.1.0.0',
'description': """User Can Access His Account Only From Specified IP Address""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Tools',
'depends': ['base', 'mail'],
'license': 'AGPL-3',
'data': [
'views/allowed_ips_view.xml',
],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

24
access_restriction_by_ip/controllers/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import main

80
access_restriction_by_ip/controllers/main.py

@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo.addons.web.controllers import main
from odoo.http import request
from odoo.exceptions import Warning
import odoo
import odoo.modules.registry
from odoo.tools.translate import _
from odoo import http
class Home(main.Home):
@http.route('/web/login', type='http', auth="public")
def web_login(self, redirect=None, **kw):
main.ensure_db()
request.params['login_success'] = False
if request.httprequest.method == 'GET' and redirect and request.session.uid:
return http.redirect_with_hash(redirect)
if not request.uid:
request.uid = odoo.SUPERUSER_ID
values = request.params.copy()
try:
values['databases'] = http.db_list()
except odoo.exceptions.AccessDenied:
values['databases'] = None
if request.httprequest.method == 'POST':
old_uid = request.uid
ip_address = request.httprequest.environ['REMOTE_ADDR']
if request.params['login']:
user_rec = request.env['res.users'].sudo().search([('login', '=', request.params['login'])])
if user_rec.allowed_ips:
ip_list = []
for rec in user_rec.allowed_ips:
ip_list.append(rec.ip_address)
if ip_address in ip_list:
uid = request.session.authenticate(request.session.db, request.params['login'], request.params['password'])
if uid is not False:
request.params['login_success'] = True
if not redirect:
redirect = '/web'
return http.redirect_with_hash(redirect)
request.uid = old_uid
values['error'] = _("Wrong login/password")
request.uid = old_uid
values['error'] = _("Not allowed to login from this IP")
else:
uid = request.session.authenticate(request.session.db, request.params['login'],
request.params['password'])
if uid is not False:
request.params['login_success'] = True
if not redirect:
redirect = '/web'
return http.redirect_with_hash(redirect)
request.uid = old_uid
values['error'] = _("Wrong login/password")
return request.render('web.login', values)

25
access_restriction_by_ip/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import allowed_ips

36
access_restriction_by_ip/models/allowed_ips.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import models, fields
class ResUsersInherit(models.Model):
_inherit = 'res.users'
allowed_ips = fields.One2many('allowed.ips', 'users_ip', string='IP')
class AllowedIPs(models.Model):
_name = 'allowed.ips'
users_ip = fields.Many2one('res.users', string='IP')
ip_address = fields.Char(string='Allowed IP')

BIN
access_restriction_by_ip/static/description/access_non_set_ip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
access_restriction_by_ip/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
access_restriction_by_ip/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
access_restriction_by_ip/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

69
access_restriction_by_ip/static/description/index.html

@ -0,0 +1,69 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Access Restriction By IP</h2>
<h3 class="oe_slogan">User can access his account only from specified IP's</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
<div>
<p>This module will restrict the users access to his account from specified IP address only</p>
</div>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Administrator can set a IP or a group of IP address for each users </li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Users can access their account only from the specified IP's</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Accessing system from a non-specified IP will restrict the user login</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; A warning message will be displayed</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; If no IP is set to user means there is no any restriction by IP</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; IP Address for each users can be set from users form view</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Setting IP address for User</h4>
<div class="oe_span12">
<p>Setting IP address for user from users form view </p>
<p>User will be able to access his account only from this IP's</p>
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="user_set_ip.png">
</div>
</div>
<h4 class="oe_slogan">User accessing his account</h4>
<div class="oe_span12">
<p>On accessing account from a non specified IP</p>
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="access_non_set_ip.png">
</div>
<p>Warning message will be displayed</p>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

82
access_restriction_by_ip/static/description/index.html~

@ -0,0 +1,82 @@
<section class="oe_container">
<div class="oe_spaced">
<h2 class="oe_slogan">Birthday Notification By E-mail</h2>
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
<div style="padding-left:66px;">
<h4>Features:</h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds a cron job to invoke email</li>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds an email template</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32">
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Employee Form</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; Give Date of Birth for employee.<br>
&#x261B; Give work email.<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="birthday_1.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Email Template</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; The cron job will invoke the email<br>
&#x261B; Email template is very simple<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="temp.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
access_restriction_by_ip/static/description/user_set_ip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

21
access_restriction_by_ip/views/allowed_ips_view.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record model="ir.ui.view" id="res_users_allowed_ips">
<field name="name">res.users</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//page[1]" position='after'>
<page string="Allowed IP">
<field name="allowed_ips">
<tree editable="bottom">
<field name="ip_address"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</data>
</odoo>

24
auto_resend_mail/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import models

42
auto_resend_mail/__manifest__.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Email - Auto Resend',
'summary': """Automatically Resend the Failed Emails""",
'version': '11.0.1.0.',
'description': """Automatically resend the failed emails""",
'author': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Tools',
'depends': ['base', 'mail'],
'license': 'AGPL-3',
'data': [
'views/auto_resend_cron.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'installable': True,
'auto_install': False,
}

24
auto_resend_mail/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import auto_resend

33
auto_resend_mail/models/auto_resend.py

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import models, api
class ResendMails(models.Model):
_inherit = 'mail.mail'
@api.multi
def resend_failed_mails(self):
mail_failed_list = self.env['mail.mail'].search([('state', '=', 'exception')])
for failed_mail in mail_failed_list:
failed_mail.state = 'outgoing'

BIN
auto_resend_mail/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
auto_resend_mail/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
auto_resend_mail/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

65
auto_resend_mail/static/description/index.html

@ -0,0 +1,65 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Failed Emails - Auto Resend</h2>
<h3 class="oe_slogan">Resend failed E-mails automatically</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
<div>
<p>No more worry about the failed E-mails, install Auto Resend to resend the failed E-mails
automatically. </p>
</div>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Resending of failed Emails </li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Can configure the resending time periods</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; The whole mailbox will be checked once a day by default.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; If there are any failed emails, it will resend</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Automatic checking for resending the failed emails can be configured once
a day or once a week, or once an Hour etc.</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">How to set the resending time period?</h4>
<div class="oe_span12">
<p>By default, the whole Emails will be checked once a day</p>
<p>If there are any failed emails, then it will resend</p>
<p>To change the time period</p>
<p>Activate the developer mode, Then Settings -> Technical -> Automation -> Scheduled Action</p>
<p>Open the record named 'Auto Resend Emails'</p>
<p>Configure it here</p>
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="set_interval.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

82
auto_resend_mail/static/description/index.html~

@ -0,0 +1,82 @@
<section class="oe_container">
<div class="oe_spaced">
<h2 class="oe_slogan">Birthday Notification By E-mail</h2>
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
<div style="padding-left:66px;">
<h4>Features:</h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds a cron job to invoke email</li>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds an email template</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32">
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Employee Form</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; Give Date of Birth for employee.<br>
&#x261B; Give work email.<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="birthday_1.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Email Template</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; The cron job will invoke the email<br>
&#x261B; Email template is very simple<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="temp.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
auto_resend_mail/static/description/set_interval.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

16
auto_resend_mail/views/auto_resend_cron.xml

@ -0,0 +1,16 @@
<?xml version="1.0" ?>
<odoo>
<data>
<record forcecreate="True" id="auto_resend_mails" model="ir.cron">
<field name="name">Auto Resend Emails</field>
<field name="model_id" ref="model_mail_mail"/>
<field name="state">code</field>
<field name="code">model.resend_failed_mails()</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall" />
</record>
</data>
</odoo>

13
hide_cost_price/README.rst

@ -0,0 +1,13 @@
Hide Product Cost Price v11
===========================
The cost price of the product will be only visible for the users added in the group "view cost price".
If user is not there in the group, the cost price of the product will remain invisible for the user.
By default administrator will be added to this group
Credits
=======
Cybrosys Techno Solutions
Author
------
* Niyas Raphy <niyas@cybosys.in>

22
hide_cost_price/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

43
hide_cost_price/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Hide Product Cost Price',
'summary': """Product Cost Price Will be Visible Only for Specified Group""",
'version': '11.0.1.0.0',
'description': """Product cost price will be visible only for specified group""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Sales',
'depends': ['base', 'purchase'],
'license': 'AGPL-3',
'data': [
'security/view_cost_price.xml',
'views/hide_product_cost.xml'
],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

43
hide_cost_price/__manifest__.py~

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Hide Product Cost Price',
'summary': """Product Cost Price Will be Visible Only for Specified Users in the Group""",
'version': '10.0.1.0.0',
'description': """Product cost price will be visible only users in group""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Sales',
'depends': ['base', 'purchase'],
'license': 'AGPL-3',
'data': [
'security/view_cost_price.xml',
'views/hide_product_cost.xml'
],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

9
hide_cost_price/security/view_cost_price.xml

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<odoo>
<data>
<record id="view_cost_price" model="res.groups">
<field name="name">View Cost Price</field>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
</odoo>

BIN
hide_cost_price/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
hide_cost_price/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
hide_cost_price/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

75
hide_cost_price/static/description/index.html

@ -0,0 +1,75 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Hide Product Cost Price</h2>
<h3 class="oe_slogan">Cost price will be visible only for selected users</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
<div>
<p>This module will create a new group and the users added in this group can only view the
cost price of the product</p>
</div>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Cost price visibility restricted</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Visible only for the users in the group</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; By default administrator will be added to this group</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Working</h4>
<div class="oe_span12">
<strong><p>Adding user to the View Cost Price group</p></strong>
<p>User will see the product cost price only if he is added in this group</p>
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="user_adding_group.png">
</div>
</div>
<div class="oe_span12">
<strong><p>Product View for users not in the Group</p></strong>
<div class="oe_row_img oe_centered">
<p>Product form view without cost price</p>
<div class="oe_row_img oe_centered">
<a href="https://www.cybrosys.com">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="product_form_view.png">
</a>
</div>
<p>Product tree view without cost price</p>
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="product_tree_view.png">
</div>
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

82
hide_cost_price/static/description/index.html~

@ -0,0 +1,82 @@
<section class="oe_container">
<div class="oe_spaced">
<h2 class="oe_slogan">Birthday Notification By E-mail</h2>
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
<div style="padding-left:66px;">
<h4>Features:</h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds a cron job to invoke email</li>
<li style="list-style:none !important;"><span style="color:green;"> &#8594;</span>&nbsp;&nbsp; Adds an email template</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32">
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Employee Form</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; Give Date of Birth for employee.<br>
&#x261B; Give work email.<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="birthday_1.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Email Template</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; The cron job will invoke the email<br>
&#x261B; Email template is very simple<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="temp.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
hide_cost_price/static/description/product_form_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
hide_cost_price/static/description/product_tree_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
hide_cost_price/static/description/user_adding_group.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

29
hide_cost_price/views/hide_product_cost.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="product_form_hide_cost">
<field name="name">product.template.cost</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="product_tree_hide_cost">
<field name="name">product.template.cost</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='standard_price']" position="attributes">
<attribute name="groups">hide_cost_price.view_cost_price</attribute>
</xpath>
</field>
</record>
</data>
</odoo>

14
hr_payslip_monthly_report/README.rst

@ -0,0 +1,14 @@
Payroll-Payslip Reporting v11
=============================
This Module help Human resource managers to get a over all view for the payslips as pivot.
Features
========
* Pivot view for HR payslips.
* Group By options like Employee wise, department wise, job title wise, date wise, status wise and Company wise.
* Spot Export to XLS Report.
Credits
=======
Nikhil Krishnan @ cybrosys, nikhil@cybrosys.in

22
hr_payslip_monthly_report/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nikhil krishnan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import models

43
hr_payslip_monthly_report/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nikhil krishnan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Payroll-Payslip Reporting',
'version': '11.0.1.0.0',
'summary': """Payslip Pivot View Report.""",
'description': """Payslip monthly report.
This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Generic Modules/Human Resources',
'depends': ['hr_payroll'],
'license': 'LGPL-3',
'data': [
'security/ir.model.access.csv',
'views/menu_payslip_report.xml'
],
'demo': [],
'images': ['static/description/banner.jpg'],
'installable': True,
'auto_install': False,
}

45
hr_payslip_monthly_report/__manifest__.py~

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nikhil krishnan(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Payroll-Payslip Reporting',
'version': '10.0.1.0.0',
'summary': """Payslip Pivot View Report.""",
'description': """Payslip monthly report.
This module gives a pivot view for the HR managers. they can see all the 'NET' amount of payslips in all states""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Human Resources',
'depends': ['hr_payroll'],
'license': 'LGPL-3',
'data': [
'security/ir.model.access.csv',
'views/menu_payslip_report.xml'
],
'demo': [],
'images': ['static/description/banner.jpg'],
'installable': True,
'auto_install': False,
}

24
hr_payslip_monthly_report/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nikhil krishnan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import hr_payroll_report

70
hr_payslip_monthly_report/models/hr_payroll_report.py

@ -0,0 +1,70 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Nikhil krishnan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import fields, models, tools, api
class PayrollReportView(models.Model):
_name = 'hr.payroll.report.view'
_auto = False
name = fields.Many2one('hr.employee', string='Employee')
date_from = fields.Date(string='From')
date_to = fields.Date(string='To')
state = fields.Selection([('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')],
string='Status')
job_id = fields.Many2one('hr.job', string='Job Title')
company_id = fields.Many2one('res.company', string='Company')
department_id = fields.Many2one('hr.department', string='Department')
net = fields.Float(string='Net Salary')
def _select(self):
select_str = """
min(ps.id) as id,emp.id as name,jb.id as job_id,
dp.id as department_id,cmp.id as company_id,
ps.date_from, ps.date_to, sum(psl.total) as net, ps.state as state
"""
return select_str
def _from(self):
from_str = """
hr_payslip_line psl join hr_payslip ps on (ps.employee_id=psl.employee_id and ps.id=psl.slip_id)
join hr_employee emp on (ps.employee_id=emp.id) join hr_department dp on (emp.department_id=dp.id)
join hr_job jb on (emp.department_id=jb.id) join res_company cmp on (cmp.id=ps.company_id) where psl.code='NET'
"""
return from_str
def _group_by(self):
group_by_str = """
group by emp.id,psl.total,ps.date_from, ps.date_to, ps.state,jb.id,dp.id,cmp.id
"""
return group_by_str
@api.model_cr
def init(self):
tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute("""CREATE or REPLACE VIEW %s as ( SELECT
%s
FROM %s
%s
)""" % (self._table, self._select(), self._from(), self._group_by()))

2
hr_payslip_monthly_report/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
access_hr_payslip_monthly_report_manager,hr.payroll.report.view,hr_payslip_monthly_report.model_hr_payroll_report_view,hr.group_hr_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_payslip_monthly_report_manager hr.payroll.report.view hr_payslip_monthly_report.model_hr_payroll_report_view hr.group_hr_manager 1 1 1 1

BIN
hr_payslip_monthly_report/static/description/HR Payslip Report view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
hr_payslip_monthly_report/static/description/HR report group by.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
hr_payslip_monthly_report/static/description/Payslip Graph Report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
hr_payslip_monthly_report/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
hr_payslip_monthly_report/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
hr_payslip_monthly_report/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

124
hr_payslip_monthly_report/static/description/index.html

@ -0,0 +1,124 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Payroll-Payslip Reporting</h2>
<h3 class="oe_slogan">Get an overview of the pay slips as pivot</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; <b>Retrieve pivot view of pay slips.</b></li>
<li style="list-style:none !important;"><span style="color:green; "> &#9745;</span>&nbsp;&nbsp; <b>Able to get Reports</b> </li>
<ul style="padding-left: 36px;padding-top: 2px;">
<li style="list-style:outside !important;">Employee wise,</li>
<li style="list-style:outside !important;">Employee's department wise,</li>
<li style="list-style:outside !important;">Employee's job title wise,</li>
<li style="list-style:outside !important;">Pay slip's date wise,</li>
<li style="list-style:outside !important;">Pay slip's status wise,</li>
<li style="list-style:outside !important;">Company wise.</li>
</ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; <b>Spot Export to XLS Report.</b></li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Payroll Monthly Statement in Pivot View</h2>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<p class="oe_mt32">
This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group
criteria (Employee, Job title, Department, Company, Pay slip etc.).
</p>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Payroll report as Pivot</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="HR Payslip Report view.png">
</div>
</div>
<div class="oe_span12">
<p class="oe_mt32">
HR managers need a complete payroll statement and also payroll monthly statement. From
this pivot view we can easily generate the custom payroll report views in excel format. Also
we can download it from there. From Odoo payroll report we can get only individual employee
pay slip reports. To make the use of HR payroll management system easier we can use this pivot
view to get the payroll/pay slip statement.
</p>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Group by the pivot view</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="HR report group by.png">
</div>
</div>
<div class="oe_span12">
<p class="oe_mt32">
In this View we can easily generate custom reports by using the + button,
That is we can make the filters by groups, also we can get the counts too, from the "Measures" Button
</p>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Graph View</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="Payslip Graph Report.png">
</div>
</div>
<div class="oe_span12">
<p class="oe_mt32">
In Pivot view we can easily generate custom Graphs like Pie Chart,Bar Chart, Line Chart.
With date and net salary or date and pay slip's counts.
</p>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

67
hr_payslip_monthly_report/views/menu_payslip_report.xml

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_payroll_report_view_pivot" model="ir.ui.view">
<field name="name">hr.payslip.pivot</field>
<field name="model">hr.payroll.report.view</field>
<field name="arch" type="xml">
<pivot string="Payslip Analysis">
<field name="name" type="row"/>
<field name="date_from" interval="month" type="col"/>
<field name="net" type="measure"/>
</pivot>
</field>
</record>
<record id="hr_payroll_report_view_graph" model="ir.ui.view">
<field name="name">hr.payslip.graph</field>
<field name="model">hr.payroll.report.view</field>
<field name="arch" type="xml">
<graph string="Payslip Analysis">
<field name="date_from" type="row"/>
<field name="net" type="measure"/>
</graph>
</field>
</record>
<record id="hr_payroll_report_view_search" model="ir.ui.view">
<field name="name">hr.payslip.search</field>
<field name="model">hr.payroll.report.view</field>
<field name="arch" type="xml">
<search string="Payslip Analysis">
<field name="name"/>
<field name="date_from"/>
<field name="company_id" groups="base.group_multi_company"/>
<filter string="This Year" name="year" domain="[('date_from','&lt;=', time.strftime('%%Y-12-31')),('date_from','&gt;=',time.strftime('%%Y-01-01')),('date_to','&lt;=', time.strftime('%%Y-12-31')),('date_to','&gt;=',time.strftime('%%Y-01-01'))]"/>
<filter name="Salary" string="Salary" domain="[('state','=', 'done')]"/>
<filter name="Draft" string="Draft" domain="[('state','=','draft')]"/>
<separator/>
<field name="department_id"/>
<group expand="1" string="Group By">
<filter string="Employee" name="Employee" context="{'group_by':'name'}"/>
<filter string="Job" context="{'group_by':'job_id'}"/>
<filter string="Department" context="{'group_by':'department_id'}"/>
<filter name="status" string="Status" context="{'group_by':'state'}"/>
<filter string="Company" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_hr_payslip_view_report" model="ir.actions.act_window">
<field name="res_model">hr.payroll.report.view</field>
<field name="name">Payslips</field>
<field name="view_type">form</field>
<field name="view_mode">pivot,graph</field>
<field name="context">{'search_default_year':1}</field>
<field name="help">This report helps in payroll analysis. This helps you to check your pay slips and sorting it out from different group
criteria (Employee, Job title, Department, Company, Pay slip etc.).</field>
</record>
<menuitem name="Reports" id="menu_hr_payslip_reports" parent="hr_payroll.menu_hr_payroll_root" />
<menuitem id="menu_hr_payslip_view_report" name="Payslip Report"
parent="menu_hr_payslip_reports" action="action_hr_payslip_view_report"
groups="hr.group_hr_manager" sequence="10"/>
</data>
</odoo>

112
hr_payslip_monthly_report/views/quotation_handler.xml~

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="act_sale_order_2_revised" model="ir.actions.act_window">
<field name="name">Revised Quotation Orders</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="sale.view_quotation_tree"/>
<field name="domain">[('parent_so_id', '=', active_id)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Revised order against this Quotation Order.
</p>
</field>
</record>
<!--In sale order menu, we need to avoid the 'revised' state orders. -->
<record id="sale.action_orders" model="ir.actions.act_window">
<field name="name">Sales Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field name="search_view_id" ref="sale.sale_order_view_search_inherit_sale"/>
<field name="context">{}</field>
<field name="domain">[('state', 'not in', ('draft','revised','sent', 'cancel'))]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create a Quotation, the first step of a new sale.
</p><p>
Once the quotation is confirmed, it becomes a sales order.
You'll be able to invoice it and collect payments.
From the <i>Sales Orders</i> menu, you can track delivery
orders or services.
</p>
</field>
</record>
<record id="sale.action_quotations" model="ir.actions.act_window">
<field name="name">Quotations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_id" ref="sale.view_quotation_tree"/>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field name="context">{}</field>
<field name="domain">[('state','in',('pre','draft','sent','cancel'))]</field>
<field name="search_view_id" ref="sale.view_sales_order_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create a Quotation, the first step of a new sale.
</p><p>
Your next actions should flow efficiently: confirm the Quotation
to a Sale Order, then create the Invoice and collect the Payment.
</p><p>
Note that once a Quotation becomes a Sale Order, it will be moved
from the Quotations list to the Sales Order list.
</p>
</field>
</record>
<record id="view_order_form_revised" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//button[@name='action_confirm']" position="after">
<button name="make_revision" string="Revise the Quotation" type="object" states="sent" class="btn-primary"/>
<button name="action_quotation_send" string="Send by Email" type="object" states="pre" class="btn-primary"/>
<button name="print_quotation" string="Print" type="object" states="pre" class="btn-primary"/>
<button name="action_cancel" states="pre" type="object" string="Cancel"/>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button class="oe_inline oe_stat_button" type="action" name="%(act_sale_order_2_revised)d"
icon="fa-bars" attrs="{'invisible':[('state','in',[('draft','revised')]}">
<field string="Revised Quotation Orders" name="revised_order_count" widget="statinfo"/>
</button>
</xpath>
<xpath expr="//field[@name='order_line']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute>
</xpath>
<xpath expr="//field[@name='payment_term_id']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'in', ('sent','revised','done','cancel'))]}</attribute>
</xpath>
</field>
</record>
<record id="view_quotation_handler_tree" model="ir.ui.view">
<field name="name">sale.order.tree</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='state']" position="replace">
<field name="state"/>
</xpath>
</field>
</record>
</data>
</odoo>

20
login_user_detail/README.rst

@ -0,0 +1,20 @@
User Log Details v11
====================
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

23
login_user_detail/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Saritha Sahadevan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
from . import models

42
login_user_detail/__manifest__.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Saritha Sahadevan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "User Log Details",
'version': '11.0.2.0.0',
'summary': """Login User Details & IP Address""",
'description': """This module records login information of user""",
'author': "Cybrosys Techno Solutions ",
'company': "Cybrosys Techno Solutions ",
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'category': 'Tools',
'depends': ['base'],
'license': 'AGPL-3',
'data': [
'security/ir.model.access.csv',
'views/login_user_views.xml'],
'demo': [],
'images': ['static/description/banner.png'],
'installable': True,
'auto_install': False,
}

42
login_user_detail/__manifest__.py~

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Saritha Sahadevan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "User Log Details",
'version': '11.0.1.0.0',
'summary': """Login User Details & IP Address""",
'description': """This module records login information of user""",
'author': "Cybrosys Techno Solutions ",
'company': "Cybrosys Techno Solutions ",
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'category': 'Tools',
'depends': ['base'],
'license': 'AGPL-3',
'data': [
'security/ir.model.access.csv',
'views/login_user_views.xml'],
'demo': [],
'images': ['static/description/banner.png'],
'installable': True,
'auto_install': False,
}

8
login_user_detail/doc/changelog.rst

@ -0,0 +1,8 @@
Changelog
=========
* Saritha Sahadevan contact: saritha@cybrosys.in
`10.0.2.0.0`
------------
- Access Right Issue fix.

23
login_user_detail/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Saritha Sahadevan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
from . import login_user_details

52
login_user_detail/models/login_user_details.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Saritha Sahadevan(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import logging
from itertools import chain
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=lambda self: fields.datetime.now())
ip_address = fields.Char(string="IP Address")

2
login_user_detail/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
access_login_user_detail,login_user_detail_login_detail,model_login_detail,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_login_user_detail login_user_detail_login_detail model_login_detail 1 1 1 1

BIN
login_user_detail/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
login_user_detail/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
login_user_detail/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

59
login_user_detail/static/description/index.html

@ -0,0 +1,59 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">User Log Details</h2>
<h3 class="oe_slogan">Records User Log Details</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32 oe_centered">
User Log Details, Record login date,IP Address of login user.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Login Details</h3>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="login.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
login_user_detail/static/description/login.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

42
login_user_detail/views/login_user_views.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="login_user_detail_form_view">
<field name="name">Login User Details</field>
<field name="model">login.detail</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name"/>
<field name="date_time"/>
<field name="ip_address"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="login_user_detail_tree_view">
<field name="name">Login User Details</field>
<field name="model">login.detail</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="date_time"/>
<field name="ip_address"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="login_user_detail_action_window">
<field name="name">Login User Details</field>
<field name="res_model">login.detail</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Login Details" id="login_user_detail.menu_1_list" parent="base.menu_users"
action="login_user_detail_action_window"/>
</data>
</odoo>

14
pos_ticket/README.rst

@ -0,0 +1,14 @@
POS Ticket v11
==============
This module will add company logo & company info in POS receipt. Also it will print the customer name
in the receipt if the customer is selected.
Default POS logo will be replaced by the company logo in POS status bar
Credits
=======
Cybrosys Techno Solutions
Author
------
* Niyas Raphy <niyas@cybrosys.in>

11
pos_ticket/README.rst~

@ -0,0 +1,11 @@
POS Ticket
==========
This module will add company logo & info in POS receipt
Credits
=======
Cybrosys Techno Solutions
Author
------
* Cybrosys Techno Solutions <http://www.cybrosys.com>

22
pos_ticket/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

41
pos_ticket/__manifest__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Company Logo In POS Receipt',
'summary': """Add Company Logo ,Info & Customer name to POS Ticket""",
'version': '11.0.1.0',
'description': """Add Company Logo , Info & Customer name to POS Ticket""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Point of Sale',
'depends': ['base', 'point_of_sale'],
'license': 'AGPL-3',
'data': [],
'qweb': ['static/src/xml/pos_ticket_view.xml'],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

41
pos_ticket/__manifest__.py~

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Niyas Raphy(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Company Logo In POS Receipt',
'summary': """Add Company Logo ,Info & Customer name to POS Ticket""",
'version': '11.0.1.0',
'description': """Add Company Logo , Info & Customer name to POS Ticket""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'category': 'Point Of Sale',
'depends': ['base', 'point_of_sale'],
'license': 'AGPL-3',
'data': [],
'qweb': ['static/src/xml/pos_ticket_view.xml'],
'images': ['static/description/banner.jpg'],
'demo': [],
'installable': True,
'auto_install': False,
}

BIN
pos_ticket/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
pos_ticket/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
pos_ticket/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

78
pos_ticket/static/description/index.html

@ -0,0 +1,78 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">Company Logo In POS Receipt</h2>
<h3 class="oe_slogan">Company logo and info will be displayed in POS receipt</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a></h4>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h3 class="oe_slogan">Receipt Details</h3>
</div>
<p class="oe_mt32" style="margin-left:48px;">
Currently in Odoo POS receipt there is no company logo.
This module adds the company logo to the POS receipt so that the users will get more information about
the company from the receipt. Also replace the default POS logo in the Status bar with Company logo
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">Receipt</h2>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="old_receipt.png"/>
</div>
<div class="col-md-2" style="top:50px;color:green">
<i class="fa fa-hand-o-right fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="new_receipt_pos.png"/>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">POS Logo</h2>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="old_pos_logo.png"/>
</div>
<div class="col-md-2" style="top:50px;color:green">
<i class="fa fa-hand-o-right fa-2x" aria-hidden="true"></i>
</div>
<div class="col-md-5">
<img class="oe_picture oe_screenshot" src="new_pos_logo.png"/>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
pos_ticket/static/description/new_pos_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
pos_ticket/static/description/new_receipt_pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
pos_ticket/static/description/old_pos_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
pos_ticket/static/description/old_receipt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

158
pos_ticket/static/src/xml/pos_ticket_view.xml

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="point_of_sale.template" xml:space="preserve">
<t t-extend="Chrome">
<t t-jquery='.pos-branding' t-operation='replace'>
<img src='/web/binary/company_logo' style="width: 3%;padding: 2px 8px 0px 13px;float: left;"/>
<span class="placeholder-UsernameWidget" style="float: left;padding-top: 19px;color: #fff;"></span>
</t>
</t>
<t t-extend="PosTicket">
<t t-jquery='.pos-sale-ticket' t-operation='replace'>
<div class="pos-sale-ticket">
<div>
<div style="width: 55%; float: left; padding: 20px 0px;">
<t t-if="order.get_client()">
Customer: <t t-esc="order.get_client().name"/><br />
</t>
Cashier: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/><br />
<t t-if="widget.pos.company.phone">
Phone: <t t-esc="widget.pos.company.phone || ''"/><br />
</t>
<t t-esc="order.name"/>
<t t-esc="moment().format('L LT')"/>
</div>
<div style="width: 45%;float: left; ">
<img src='/web/binary/company_logo' style="width:100%"/>
</div>
</div>
<t t-if="widget.pos.company.name">
<div style="width:100%;text-align:right;"><t t-esc="widget.pos.company.name"/></div>
</t>
<t t-if="widget.pos.company.email">
<div style="width:100%;text-align:right;"><t t-esc="widget.pos.company.email"/></div>
</t>
<br />
<t t-if="receipt.header">
<div style='text-align:center'>
<t t-esc="receipt.header" />
</div>
<br/>
</t>
<table class='receipt-orderlines'>
<colgroup>
<col width='40%' />
<col width='15%' />
<col width='15%' />
<col width='30%' />
</colgroup>
<tr style="border: 1px solid rgb(0, 0, 0);">
<th>Name</th>
<th>Qty</th>
<th>Price</th>
<th>Value</th>
</tr>
<tr t-foreach="orderlines" t-as="orderline">
<td>
<t t-esc="orderline.get_product().display_name"/>
<t t-if="orderline.get_discount() > 0">
<div class="pos-disc-font">
With a <t t-esc="orderline.get_discount()"/>% discount
</div>
</t>
</td>
<td>
<t t-esc="orderline.get_quantity_str_with_unit()"/>
</td>
<td>
<t t-set="a" t-value="orderline.quantityStr"></t>
<t t-set="b" t-value="orderline.get_display_price()"></t>
<t t-set="c" t-value="b/a"></t>
<t t-esc="c"/>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(orderline.get_display_price())"/>
</td>
</tr>
</table>
<br />
<table class='receipt-total'>
<colgroup>
<col width='40%' />
<col width='30%' />
<col width='30%' />
</colgroup>
<tr>
<td></td>
<td>Subtotal:</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_without_tax())"/>
</td>
</tr>
<t t-foreach="order.get_tax_details()" t-as="taxdetail">
<tr>
<td></td>
<td><t t-esc="taxdetail.name" /></td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(taxdetail.amount)"/>
</td>
</tr>
</t>
<tr>
<td></td>
<td>Discount:</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_discount())"/>
</td>
</tr>
<tr class="emph">
<td>Total:</td>
<td colspan="2" style='text-align:right'>
<t t-esc="widget.format_currency(order.get_total_with_tax())"/>
</td>
</tr>
</table>
<br/>
<table class='receipt-paymentlines'>
<colgroup>
<col width='38%' />
<col width='20%' />
<col width='13%' />
<col width='29%' />
</colgroup>
<t t-foreach="paymentlines" t-as="line">
<tr>
<td>
<t t-esc="line.name"/>
</td>
<td>
</td>
<td>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(line.get_amount())"/>
</td>
</tr>
</t>
</table>
<br/>
<table class='receipt-change'>
<colgroup>
<col width='40%' />
<col width='15%' />
<col width='15%' />
<col width='30%' />
</colgroup>
<tr><td>Change:</td>
<td>
</td>
<td>
</td>
<td style='text-align:right'>
<t t-esc="widget.format_currency(order.get_change())"/>
</td></tr>
</table>
</div>
</t>
</t>
</templates>

12
product_deletion/README.rst

@ -0,0 +1,12 @@
Product Removal Authorisation v11
=================================
User in the group "Product Deletion" can only delete the products. Those who are not in the
group cant delete the product. Odoo will raise a warning if the user in not in the group
Credits
=======
Cybrosys Techno Solutions
Contributors
------------
* Niyas Raphy, Cybrosys <niyas@cybrosys.in>

23
product_deletion/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import models

41
product_deletion/__manifest__.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Product Removal Authorisation',
'summary': """Users in the Group "Product Deletion" Can Only Delete the Products""",
'version': '11.0.1.0',
'description': """Permission to delete the product""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'category': 'Warehouse',
'depends': ['base', 'product'],
'license': 'LGPL-3',
'data': [
'views/product_deletion_group.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'installable': True,
'auto_install': False,
}

23
product_deletion/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
import product_deletion

38
product_deletion/models/product_deletion.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<https://www.cybrosys.com>)
# 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 <https://www.gnu.org/licenses/>.
#
##############################################################################
from odoo import models, api, _
from odoo.exceptions import Warning
class ProductDeletion(models.Model):
_inherit = 'product.template'
@api.multi
@api.model
def unlink(self, default=None):
res_user = self.env['res.users'].search([('id', '=', self._uid)])
if not res_user.has_group('product_deletion.product_deletion_group'):
raise Warning(_(
"You cannot delete the product(s). Please contact the System Administrator"))

BIN
product_deletion/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
product_deletion/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
product_deletion/static/description/deletion_warning.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
product_deletion/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

48
product_deletion/static/description/index.html

@ -0,0 +1,48 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Product Removal Authorisation</h2>
<h3 class="oe_slogan">Users having the permission can only delete the products</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
</section>
<section>
<div class="oe_row oe_spaced oe_dark">
<h4 class="oe_slogan">Product Form</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; Only users in the group Product Deletion can delete the product.<br>
&#x261B; If user is not in the group Odoo will raise a warning message.<br>
</p>
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="deletion_warning.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><i
class="fa fa-phone"></i> Contact Us </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

10
product_deletion/views/product_deletion_group.xml

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="product_deletion_group" model="res.groups">
<field name="name">Product Deletion</field>
</record>
</data>
</openerp>

24
sale_discount_total/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: fasluca(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models
from . import reports

55
sale_discount_total/__manifest__.py

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: fasluca(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Sale Discount on Total Amount',
'version': '11.0.1.0.0',
'category': 'Sales Management',
'summary': "Discount on Total in Sale and Invoice With Discount Limit and Approval",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'http://www.cybrosys.com',
'description': """
Sale Discount for Total Amount
=======================
Module to manage discount on total amount in Sale.
as an specific amount or percentage
""",
'depends': ['sale',
'account'
],
'data': [
'views/sale_view.xml',
'views/account_invoice_view.xml',
'views/invoice_report.xml',
'views/sale_order_report.xml',
'views/res_config_view.xml',
],
'demo': [
],
'images': ['static/description/banner.jpg'],
'application': True,
'installable': True,
'auto_install': False,
}

25
sale_discount_total/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: fasluca(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import sale
from . import account_invoice
from . import discount_approval

102
sale_discount_total/models/account_invoice.py

@ -0,0 +1,102 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: fasluca(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import api, fields, models
class AccountInvoice(models.Model):
_inherit = "account.invoice"
@api.one
@api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount', 'tax_line_ids.amount_rounding',
'currency_id', 'company_id', 'date_invoice', 'type')
def _compute_amount(self):
self.amount_untaxed = sum(line.price_subtotal for line in self.invoice_line_ids)
self.amount_tax = sum(line.amount_total for line in self.tax_line_ids)
self.amount_total = self.amount_untaxed + self.amount_tax
self.amount_discount = sum((line.quantity * line.price_unit * line.discount)/100 for line in self.invoice_line_ids)
amount_total_company_signed = self.amount_total
amount_untaxed_signed = self.amount_untaxed
if self.currency_id and self.currency_id != self.company_id.currency_id:
currency_id = self.currency_id.with_context(date=self.date_invoice)
amount_total_company_signed = currency_id.compute(self.amount_total, self.company_id.currency_id)
amount_untaxed_signed = currency_id.compute(self.amount_untaxed, self.company_id.currency_id)
sign = self.type in ['in_refund', 'out_refund'] and -1 or 1
self.amount_total_company_signed = amount_total_company_signed * sign
self.amount_total_signed = self.amount_total * sign
self.amount_untaxed_signed = amount_untaxed_signed * sign
discount_type = fields.Selection([('percent', 'Percentage'), ('amount', 'Amount')], string='Discount Type',
readonly=True, states={'draft': [('readonly', False)]}, default='percent')
discount_rate = fields.Float('Discount Amount', digits=(16, 2), readonly=True, states={'draft': [('readonly', False)]})
amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_compute_amount',
track_visibility='always')
@api.onchange('discount_type', 'discount_rate', 'invoice_line_ids')
def supply_rate(self):
for inv in self:
if inv.discount_type == 'percent':
for line in inv.invoice_line_ids:
line.discount = inv.discount_rate
else:
total = discount = 0.0
for line in inv.invoice_line_ids:
total += (line.quantity * line.price_unit)
if inv.discount_rate != 0:
discount = (inv.discount_rate / total) * 100
else:
discount = inv.discount_rate
for line in inv.invoice_line_ids:
line.discount = discount
@api.multi
def compute_invoice_totals(self, company_currency, invoice_move_lines):
total = 0
total_currency = 0
for line in invoice_move_lines:
if self.currency_id != company_currency:
currency = self.currency_id.with_context(date=self.date or self.date_invoice or fields.Date.context_today(self))
line['currency_id'] = currency.id
line['amount_currency'] = currency.round(line['price'])
line['price'] = currency.compute(line['price'], company_currency)
else:
line['currency_id'] = False
line['amount_currency'] = False
line['price'] = line['price']
if self.type in ('out_invoice', 'in_refund'):
total += line['price']
total_currency += line['amount_currency'] or line['price']
line['price'] = - line['price']
else:
total -= line['price']
total_currency -= line['amount_currency'] or line['price']
return total, total_currency, invoice_move_lines
@api.multi
def button_dummy(self):
self.supply_rate()
return True
class AccountInvoiceLine(models.Model):
_inherit = "account.invoice.line"
discount = fields.Float(string='Discount (%)', digits=(16, 20), default=0.0)

113
sale_discount_total/models/discount_approval.py

@ -0,0 +1,113 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: fasluca(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import api, fields, models
class sale_discount(models.Model):
_inherit = 'sale.order'
state = fields.Selection([
('draft', 'Quotation'),
('sent', 'Quotation Sent'),
('waiting', 'Waiting Approval'),
('sale', 'Sales Order'),
('done', 'Locked'),
('cancel', 'Cancelled'),
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft')
@api.multi
def action_confirm(self):
discnt = 0.0
no_line = 0.0
for order in self:
if self.company_id.so_double_validation == 'two_step':
for line in order.order_line:
no_line += 1
discnt += line.discount
discnt = (discnt / no_line)
if order.company_id.so_double_validation_limit and discnt > order.company_id.so_double_validation_limit:
order.state = 'waiting'
return True
order._action_confirm()
if order.env['ir.config_parameter'].sudo().get_param('sale.auto_done_setting'):
order.action_done()
return True
@api.multi
def action_approve(self):
self._action_confirm()
if self.env['ir.config_parameter'].sudo().get_param('sale.auto_done_setting'):
self.action_done()
return True
class Company(models.Model):
_inherit = 'res.company'
so_double_validation = fields.Selection([
('one_step', 'Confirm sale orders in one step'),
('two_step', 'Get 2 levels of approvals to confirm a sale order')
], string="Levels of Approvals", default='one_step',
help="Provide a double validation mechanism for sales discount")
so_double_validation_limit = fields.Float(string="Percentage of Discount that requires double validation'",
help="Minimum discount percentage for which a double validation is required")
# @api.multi
# def set_default_discount(self):
# if self.discount_approval and self.discount_approval != self.company_id.discount_approval:
# self.company_id.write({'discount_approval': self.discount_approval})
# if self.limit_discount and self.limit_discount != self.company_id.limit_discount:
# self.company_id.write({'limit_discount': self.limit_discount})
class ResDiscountSettings(models.TransientModel):
_inherit = 'res.config.settings'
so_order_approval = fields.Boolean("Sale Discount Approval", default=lambda self: self.env.user.company_id.so_double_validation == 'two_step')
so_double_validation = fields.Selection(related='company_id.so_double_validation',)
# help='Provide a double validation mechanism for sale exceeding maximum discount limit.')
so_double_validation_limit = fields.Float(string="Discount limit requires approval in %",
related='company_id.so_double_validation_limit')
# @api.model
# def get_values(self):
# res = super(ResDiscountSettings, self).get_values()
# res.update(
# limit_discount=self.company_id.limit_discount if self.company_id.limit_discount else 0.0,
# discount_approval=True if self.company_id.discount_approval else False
# )
# return res
#
# @api.multi
# def set_values(self):
# super(ResDiscountSettings, self).set_values()
# self.company_id.limit_discount = self.limit_discount
# self.company_id.discount_approval = self.discount_approval
def set_values(self):
super(ResDiscountSettings, self).set_values()
self.so_double_validation = 'two_step' if self.so_order_approval else 'one_step'

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save