Browse Source

[INIT]Initial Commit

pull/124/head
Sreejith P 7 years ago
parent
commit
6fdb5bdc13
  1. 40
      hide_cost_price/README.rst
  2. 22
      hide_cost_price/__init__.py
  3. 44
      hide_cost_price/__manifest__.py
  4. 43
      hide_cost_price/__manifest__.py~
  5. 11
      hide_cost_price/security/view_cost_price.xml
  6. BIN
      hide_cost_price/static/description/banner.jpg
  7. BIN
      hide_cost_price/static/description/cybro_logo.png
  8. BIN
      hide_cost_price/static/description/icon.png
  9. 75
      hide_cost_price/static/description/index.html
  10. 82
      hide_cost_price/static/description/index.html~
  11. BIN
      hide_cost_price/static/description/product_form_view.png
  12. BIN
      hide_cost_price/static/description/product_tree_view.png
  13. BIN
      hide_cost_price/static/description/user_adding_group.png
  14. 31
      hide_cost_price/views/hide_product_cost.xml

40
hide_cost_price/README.rst

@ -0,0 +1,40 @@
Hide Product Cost Price v12
===========================
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
Depends
=======
[product] addon Odoo
Tech
====
* [XML] - Odoo views
Installation
============
- www.odoo.com/documentation/12.0/setup/install.html
- Install our custom addon
License
=======
GNU AGPL, Version 3 (AGPLv3)
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Contact odoo@cybrosys.com
Authors
-------
* Niyas Raphy <niyas@cybrosys.in>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

22
hide_cost_price/__init__.py

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

44
hide_cost_price/__manifest__.py

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Niyas Raphy(<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': 'Hide Product Cost Price',
'summary': """Product Cost Price Will be Visible Only for Specified Group""",
'version': '12.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': 'Extra Tools',
'depends': ['base', 'product'],
'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,
}

11
hide_cost_price/security/view_cost_price.xml

@ -0,0 +1,11 @@
<?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: 76 KiB

BIN
hide_cost_price/static/description/product_tree_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
hide_cost_price/static/description/user_adding_group.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

31
hide_cost_price/views/hide_product_cost.xml

@ -0,0 +1,31 @@
<?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>
Loading…
Cancel
Save