Browse Source

[ADD] Initial Commit

pull/90/head
Sreejith P 7 years ago
parent
commit
94de90ba2f
  1. 25
      product_price_update_advanced/README.rst
  2. 22
      product_price_update_advanced/__init__.py
  3. 38
      product_price_update_advanced/__manifest__.py
  4. 3
      product_price_update_advanced/models/__init__.py
  5. 34
      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. 41
      product_price_update_advanced/views/product_price_view.xml

25
product_price_update_advanced/README.rst

@ -0,0 +1,25 @@
Product Price Update v11
========================
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, https://www.cybrosys.com
Author
------
* v10 : Saritha Sahadevan
* v11 : Niyas Raphy

22
product_price_update_advanced/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###################################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<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

38
product_price_update_advanced/__manifest__.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
###################################################################################
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<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': "Advanced Product Price Update",
'version': '11.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': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

3
product_price_update_advanced/models/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import product_price

34
product_price_update_advanced/models/product_price.py

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class ProductPrice(models.TransientModel):
_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)
def change_product_price(self):
prod_obj = self.env['product.template'].search([('id', '=', self.name.id)])
prod_value = {'list_price': self.sale_price, 'standard_price': self.cost_price}
prod_obj.write(prod_value)
return {
'name': _('Products'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'product.template',
'type': 'ir.actions.act_window',
'res_id': prod_obj.id,
'context': self.env.context
}
@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"><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">
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

41
product_price_update_advanced/views/product_price_view.xml

@ -0,0 +1,41 @@
<?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="sale.product_menu_catalog"
action="product_price_view_action" sequence="22"/>
</data>
</odoo>
Loading…
Cancel
Save