Browse Source

[ADD] Initial Commit

pull/29/head
SHEREEF PT 8 years ago
parent
commit
36aaf165e9
  1. 24
      product_price_update_advanced/README.rst
  2. 25
      product_price_update_advanced/__init__.py
  3. 39
      product_price_update_advanced/__manifest__.py
  4. 23
      product_price_update_advanced/models/__init__.py
  5. 49
      product_price_update_advanced/models/product_price.py
  6. BIN
      product_price_update_advanced/static/description/banner.jpg
  7. BIN
      product_price_update_advanced/static/description/cybro_logo.png
  8. BIN
      product_price_update_advanced/static/description/icon.png
  9. 67
      product_price_update_advanced/static/description/index.html
  10. BIN
      product_price_update_advanced/static/description/product_price.png
  11. 38
      product_price_update_advanced/views/product_price_view.xml

24
product_price_update_advanced/README.rst

@ -0,0 +1,24 @@
Product Price Update v10
========================
Product price update is an effective module which helps to update the price of any product.
We can update sale price and cost price of any product on a single click.
Installation
============
Just select it from available modules to install it, there is no need to extra installations.
Configuration
=============
Nothing to configure.
Credits
=======
* Cybrosys Techno Solutions, http://www.Cybrosys.com
Author
------
* Saritha Sahadevan , Mail Id: saritha@cybrosys.in

25
product_price_update_advanced/__init__.py

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

39
product_price_update_advanced/__manifest__.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Cybrosys Technologies(<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': "Advanced Product Price Update",
'version': '10.0.1.0.0',
'summary': """User Can Easily Update Cost Price/Sale Price of Products""",
'description': """This module updates price of any product on single click""",
'author': "Cybrosys Techno Solutions",
'company': 'Cybrosys Techno Solutions',
'website': "https://www.Cybrosys.com",
'category': 'Tools',
'depends': ['base', 'sale'],
'data': ['views/product_price_view.xml'],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

23
product_price_update_advanced/models/__init__.py

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

49
product_price_update_advanced/models/product_price.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Cybrosys Technologies(<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, api
class ProductPrice(models.AbstractModel):
_name = 'product.price'
name = fields.Many2one('product.template', string="Product", required=True)
sale_price = fields.Integer(string="Sale Price", required=True)
cost_price = fields.Integer(string="Cost Price", required=True)
@api.multi
def change_product_price(self):
prod_obj = self.env['product.template'].search([('name', '=', self.name.name)])
prod_value = {'list_price': self.sale_price, 'standard_price': self.cost_price}
obj = prod_obj.write(prod_value)
return obj
@api.onchange('name')
def get_price(self):
prod_obj = self.env['product.template'].search([('name', '=', self.name.name)])
self.sale_price = prod_obj.list_price
self.cost_price = prod_obj.standard_price

BIN
product_price_update_advanced/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
product_price_update_advanced/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
product_price_update_advanced/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

67
product_price_update_advanced/static/description/index.html

@ -0,0 +1,67 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Advanced Product Price Update</h2>
<h3 class="oe_slogan">User Can Easily Update Cost Price/Sale Price of Products</h3>
<h4 class="oe_slogan">Cybrosys Technologies , www.cybrosys.com</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">
Currently in Odoo, we need to switch over to each product form to update the price of product.
This module helps to update the cost price and sale price of any product in one single click.
</p>
<p>
* Create a wizard button in the menu Sales > 'Update Product'.
</p>
<p>
* After filling wizard form and clicking on 'Update', it will change the selected price field of products
that were selected in the wizard.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Update Product Price</h3>
<div class="" style="text-align: center">
You can update the price of product here
</div>
<div class="oe_span13">
<div class="oe_demo oe_screenshot">
<img src="product_price.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
product_price_update_advanced/static/description/product_price.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

38
product_price_update_advanced/views/product_price_view.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="product_price_view" model="ir.ui.view">
<field name="name">Update Product Price</field>
<field name="model">product.price</field>
<field name="arch" type="xml">
<form>
<group>
<group>
<field name="name" style="width:55%%"/>
<field name="sale_price" style="width:25%%"/>
<field name="cost_price" style="width:25%%"/>
</group>
<group></group>
</group>
<footer>
<button name="change_product_price" type="object" string="Update Price" class="oe_highlight"/>
or
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<record id="product_price_view_action" model="ir.actions.act_window">
<field name="name">Update Product Price</field>
<field name="res_model">product.price</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="product_price_view"/>
<field name="target">new</field>
</record>
<menuitem id="menu_product_price" name="Update Price" parent="sales_team.menu_sales" action="product_price_view_action" sequence="22"/>
</data>
</odoo>
Loading…
Cancel
Save