Jelajahi Sumber

commit inicial

Rodney Enciso Arias 7 tahun lalu
melakukan
b1c541177d
6 mengubah file dengan 89 tambahan dan 0 penghapusan
  1. 2 0
      __init__.py
  2. TEMPAT SAMPAH
      __init__.pyc
  3. 30 0
      __openerp__.py
  4. 39 0
      product.py
  5. TEMPAT SAMPAH
      product.pyc
  6. 18 0
      product_view.xml

+ 2 - 0
__init__.py

@@ -0,0 +1,2 @@
+from . import product
+# from . import pricelist

TEMPAT SAMPAH
__init__.pyc


+ 30 - 0
__openerp__.py

@@ -0,0 +1,30 @@
+# coding: utf-8
+# © 2015 Sylvain CALADOR @ Akretion
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+{
+    'name': 'Configuracion de curva',
+    'version': '8.0.1.0.0',
+    'author': 'Eiru Software',
+    'summarize': 'Configuracion de curva para e-commerce',
+    'category': 'sale',
+    'depends': [
+        'sale',
+    ],
+    'website': 'http://www.eiru.com.py/',
+    'data': [
+        'product_view.xml',
+    ],
+    'demo': [
+
+    ],
+    'tests': [],
+    'images': [
+
+    ],
+    'installable': True,
+    'license': 'AGPL-3',
+    'external_dependencies': {
+        'python': [],
+    },
+}

+ 39 - 0
product.py

@@ -0,0 +1,39 @@
+# coding: utf-8
+# © 2015 David BEAL @ Akretion
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import api, fields, models
+
+# class ProductCurve(models.Model):
+#     _name = 'product.curve'
+#
+#     product_id = fields.Many2one(
+#         'product.product',
+#         string='Variant',
+#         ondelete='restrict'
+#     )
+#     product_atributte_id = fields.Many2one(
+#         'product.attribute',
+#         string='attribute',
+#         ondelete='restrict'
+#     )
+#     product_tmpl_id = fields.Many2one(
+#         'product.template',
+#         string='Variant',
+#         ondelete='restrict'
+#     )
+#     product_quantity = fields.Integer(
+#         string='Quantity'
+#     )
+
+class ProductTemplate(models.Model):
+    _inherit = 'product.template'
+
+    # variant_item_ids = fields.One2many(
+    #     'product.curve',
+    #     'product_tmpl_id',
+    #     string='Variantes',
+    # )
+
+    curva = fields.Char("Curva")
+    product_website_sale_type = fields.Boolean()

TEMPAT SAMPAH
product.pyc


+ 18 - 0
product_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+  <data>
+    <record id="view_product_curve_form" model="ir.ui.view">
+        <field name="name">product.curve.form</field>
+        <field name="model">product.template</field>
+        <field name="inherit_id" ref="product.product_template_only_form_view"/>
+        <field name="arch" type="xml">
+            <div name="options" position="inside">
+                <field name="product_website_sale_type" class="oe_inline"/><label for="product_website_sale_type" string="¿Este producto se vende por curva?"/>
+            </div>
+            <field name="active" position="after">
+                <field name="curva" string="Configurar curva" attrs="{'invisible': [('product_website_sale_type','=', False)],'required': [('product_website_sale_type','=', True)]}"/>
+            </field>
+        </field>
+    </record>
+  </data>
+</openerp>