瀏覽代碼

commit inicial

Rodney Enciso Arias 7 年之前
當前提交
1118edea52

+ 0 - 0
.scannerwork/.sonar_lock


+ 5 - 0
.scannerwork/report-task.txt

@@ -0,0 +1,5 @@
+projectKey=website:custom:pricelist
+serverUrl=http://181.40.66.126:9000
+dashboardUrl=http://181.40.66.126:9000/dashboard/index/website:custom:pricelist
+ceTaskId=AV9JlSRQLmS3QZZeLmtp
+ceTaskUrl=http://181.40.66.126:9000/api/ce/task?id=AV9JlSRQLmS3QZZeLmtp

+ 2 - 0
__init__.py

@@ -0,0 +1,2 @@
+import controller
+import model

二進制
__init__.pyc


+ 32 - 0
__openerp__.py

@@ -0,0 +1,32 @@
+{
+    "name": "Set your custom Pricelist for Website",
+    "version": "1.0",
+    "author": "Emipro Technologies Pvt. Ltd.",
+    'website': 'http://www.emiprotechnologies.com',
+    'maintainer': 'Emipro Technologies Pvt. Ltd.',
+    "category": "Website",
+    "description": """
+
+After installation of this module, you can set your custom pricelist for the products in Website instead of default pricelist which is taken from the current logged in user's Partner pricelist.
+
+==================================================================== \n
+
+For support on this module contact us at info@emiprotechnologies.com \n
+
+To subscribe our support packages, visit following link, \n
+
+http://www.emiprotechnologies.com/odoo/support \n 
+
+Visit following link to find our other cool apps to shape your system . \n
+
+https://www.odoo.com/apps/modules?author=Emipro%20Technologies%20Pvt.%20Ltd. \n
+
+For more information about us, visit www.emiprotechnologies.com \n
+    """,
+    "depends": ["website_sale"],
+    'images': ['static/description/main_screen.png'],
+    "data": ['view/res_config.xml'],
+    "installable": True,
+    "auto_install": False,
+    'application' : True,
+}

+ 1 - 0
controller/__init__.py

@@ -0,0 +1 @@
+import main

二進制
controller/__init__.pyc


+ 30 - 0
controller/main.py

@@ -0,0 +1,30 @@
+from openerp.addons.website_sale.controllers import main
+from openerp.http import request
+from openerp import SUPERUSER_ID
+
+def get_custom_pricelist():
+    cr, uid, context, pool = request.cr, request.uid, request.context, request.registry
+    sale_order = context.get('sale_order')
+    if sale_order:
+        pricelist = sale_order.pricelist_id
+    else:
+        website_ids = pool['website'].search(cr, uid, [], context=context)
+        if website_ids:
+            website_data = pool('website').browse(cr, uid, website_ids[0], context=context)
+            price_list = website_data.pricelist_id
+            if price_list:
+                return price_list
+        partner = pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id
+        pricelist = partner.property_product_pricelist
+    return pricelist
+
+main.get_pricelist = get_custom_pricelist
+    
+
+    
+
+     
+
+
+
+     

二進制
controller/main.pyc


+ 1 - 0
model/__init__.py

@@ -0,0 +1 @@
+import website

二進制
model/__init__.pyc


+ 11 - 0
model/website.py

@@ -0,0 +1,11 @@
+from openerp import models,fields
+
+class website(models.Model):
+    _inherit = "website"
+
+    pricelist_id = fields.Many2one('product.pricelist', string="Pricelist")
+
+class website_config_settings(models.TransientModel):
+    _inherit = 'website.config.settings'
+    
+    pricelist_id = fields.Many2one('product.pricelist',related='website_id.pricelist_id',string="Pricelist")

二進制
model/website.pyc


+ 4 - 0
sonar-project.properties

@@ -0,0 +1,4 @@
+sonar.projectKey=website:custom:pricelist
+sonar.projectName=website_custom_pricelist
+sonar.projectVersion=1.0 
+sonar.sources=.

二進制
static/description/blog.png


二進制
static/description/clear_cart.png


二進制
static/description/emipro_apps.png


二進制
static/description/icon.png


+ 81 - 0
static/description/index.html

@@ -0,0 +1,81 @@
+<section class="oe_container">
+	<div class="oe_row oe_spaced">
+		<h2 class="oe_slogan">Set Custom Pricelist in Website</h2>
+		<h3 class="oe_slogan">Set your Custom pricelist for prices of your products in Webshop</h3>
+	</div>
+</section>
+
+<section class="oe_container" style="background-color:#3071A9;">
+<br>
+<p style="font-size:17px;color:#ffffff;padding:15px;font-weight:500;"><i>By default in Odoo Webshop,
+You will see price of products from the pricelist which is set on the current logged in user's (public or portal) customer.
+With this module you can set your custom pricelist in Website settings and price of products will shown
+according to that in Webshop.
+</i>
+<br><br>
+</p>
+</section>
+
+<section class="oe_container">
+	<div class="oe_row">
+		<h3 class="oe_slogan" style="opacity: 1;">Setup &amp; Configure Pricelist in Website Settings</h3>
+			<p>
+				After installation of this module, you will able to configure the
+				pricelist for the website from the menu <i>Settings >>
+					Configuration >> Website Settings</i> menu. Here you can select
+				pricelist that you want to apply in website.
+			</p>
+	</div>
+		<div class="oe_row">
+		<img class="oe_picture oe_screenshot" src="screen1.png" style="display:block;margin:0px auto;" >
+	</div>
+	<div class="oe_row">
+		<img class="oe_picture oe_screenshot" src="screen2.png" style="display:block;margin:0px auto;" >
+	</div>
+</section>
+
+<section class="oe_container oe_dark">
+	<div class="oe_row">
+		<h3 class="oe_slogan" style="opacity: 1;">You would love to have our other Website Apps !</h3>
+		<br><br>
+
+		<div width="100%">
+			<div class="oe_bg_img">
+
+				<a href="https://www.odoo.com/apps/modules/8.0/website_variant_multi_image_gallary/" target="new"><img  src="variant.png"  style= "width:20%;margin-left:3%;"
+></a>
+				<a href="https://www.odoo.com/apps/modules/8.0/website_product_rating/" target="new"><img src="product.png"  style= "width:20%;margin-left:3%;"
+></a>
+				<a href="https://www.odoo.com/apps/modules/8.0/website_blog_rating/" target="new"><img src="blog.png" style= "width:20%;margin-left:3%;"
+></a>
+	<a href="https://www.odoo.com/apps/modules/8.0/website_vacuum_cart/" target="new"><img src="clear_cart.png" style= "width:20%;margin-left:3%;"
+></a>
+			</div>
+		</div>
+	</div>
+</section>
+
+
+<section class="oe_img_bg">
+	<div style="width: 100%;">
+		<img src="emipro_apps.png"
+			style="width: 100%; display: block; margin: 0px auto;" />
+	</div>
+</section>
+<br>
+<br>
+<section class="oe_container">
+	<h2 class="oe_slogan">Help and Support.</h2>
+	<div class="oe_slogan">
+		<span class="fa fa-envelope fa-1x" style="color: #7c7bad;"></span><span><a
+			style="color: #7c7bad;" target="_blank"
+			href="http://www.emiprotechnologies.com/requestquote">&nbsp;Help&nbsp;</a></span>
+		<span class="fa fa-road fa-1x" style="color: #7c7bad;"></span><span><a
+			style="color: #7c7bad;" target="_blank"
+			href="http://www.emiprotechnologies.com/generate_support_ticket">&nbsp;Support&nbsp;</a></span>
+		<span class="fa fa-wrench fa-1x" style="color: #7c7bad;"></span><span><a
+			style="color: #7c7bad;" target="_blank"
+			href="http://www.emiprotechnologies.com/requestquote">&nbsp;Request
+				new Features</a></span>
+	</div>
+</section>

二進制
static/description/main_screen.png


二進制
static/description/product.png


二進制
static/description/screen1.png


二進制
static/description/screen2.png


二進制
static/description/variant.png


+ 25 - 0
view/res_config.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+
+		<record id="view_website_config_settings_pricelist_ept" model="ir.ui.view">
+			<field name="name">Website Pricelist settings</field>
+			<field name="model">website.config.settings</field>
+			<field name="inherit_id" ref="website.view_website_config_settings" />
+			<field name="arch" type="xml">
+				<xpath expr="//group[@string='Social Media']" position="after">
+					<group string="Website Prices">
+						<label for="pricelist_id" />
+						<div name="pricelist_id">
+							<div>
+								<div name="pricelist_id" class="oe_inline">
+									<field name="pricelist_id" widget="selection"/>
+								</div>
+							</div>
+						</div>
+					</group>
+				</xpath>
+			</field>
+		</record>
+	</data>
+</openerp>