Browse Source

[ADD] initial commit

Gogs 7 years ago
commit
155508ab78
6 changed files with 43 additions and 0 deletions
  1. 2 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 15 0
      __openerp__.py
  4. 8 0
      models.py
  5. BIN
      models.pyc
  6. 18 0
      templates.xml

+ 2 - 0
__init__.py

@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+import models

BIN
__init__.pyc


+ 15 - 0
__openerp__.py

@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Minimum and maximum price in product",
+    'author': "Robert Gauto",
+    'category': 'Uncategorized',
+    'depends': ['sale'],
+    'data': [
+        'templates.xml',
+    ],
+    'installable': True,
+    'license': 'AGPL-3',
+    'external_dependencies': {
+        'python': [],
+    },
+}

+ 8 - 0
models.py

@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+from openerp import models, fields
+
+class ProductTemplate(models.Model):
+    _inherit = 'product.template'
+
+    minimum_price = fields.Float(digits=(12, 2))
+    maximum_price = fields.Float(digits=(12, 2))

BIN
models.pyc


+ 18 - 0
templates.xml

@@ -0,0 +1,18 @@
+<openerp>
+    <data>
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="priority" eval="100"/>
+            <field name="arch" type="xml">
+                <xpath expr="//page[@string='Sales']/group[@name='sale']" position="before">
+                    <group>
+                        <field name="list_price" string="Precio público"/>
+                        <field name="minimum_price" string="Precio mínimo"/>
+                        <field name="maximum_price" string="Precio máximo"/>
+                    </group>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>