Rodney Enciso Arias 9 anni fa
commit
ccf203f97a
4 ha cambiato i file con 72 aggiunte e 0 eliminazioni
  1. 20 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 34 0
      __openerp__.py
  4. 18 0
      views/website_sale_registered.xml

+ 20 - 0
__init__.py

@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+

BIN
__init__.pyc


+ 34 - 0
__openerp__.py

@@ -0,0 +1,34 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    'name': 'Website Price Registered',
+    'category': 'Website',
+    'summary': 'Remove Price and Cart from eCommerce if not registered',
+    'version': '8.0.1.0.0',
+    'author': 'ICTSTUDIO, André Schenkels',
+    'license': 'AGPL-3',
+    'website': 'http://www.ictstudio.eu',
+    'depends': [
+        'website_sale'
+    ],
+    'data': [
+        'views/website_sale_registered.xml',
+    ]
+}

+ 18 - 0
views/website_sale_registered.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+
+    <template id="products_price_registered_shop" inherit_id="website_sale.products_item">
+        <xpath expr="//div[@class='product_price']" position="attributes">
+            <attribute name="t-if">product.product_variant_ids and website.user_id != user_id</attribute>
+        </xpath>
+    </template>
+
+    <template id="products_price_registered_product" inherit_id="website_sale.product">
+        <xpath expr="//div[@class='js_product']" position="attributes">
+            <attribute name="t-if">website.user_id != user_id</attribute>
+        </xpath>
+    </template>
+
+</data>
+</openerp>