Selaa lähdekoodia

Agregar campo de comision en producto ñandetv.

sebas 3 vuotta sitten
commit
1f1e0e8c51
8 muutettua tiedostoa jossa 51 lisäystä ja 0 poistoa
  1. 2 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 20 0
      __openerp__.py
  4. 2 0
      models/__init__.py
  5. BIN
      models/__init__.pyc
  6. 8 0
      models/product.py
  7. BIN
      static/description/icon.png
  8. 19 0
      views/product.xml

+ 2 - 0
__init__.py

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

BIN
__init__.pyc


+ 20 - 0
__openerp__.py

@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+
+{
+    'name': 'Comisión Eiru',
+    'version': '8.0.0.1.0',
+    'category': '',
+    'summary': '',
+    'author': 'Sebastian Penayo',
+    'license': 'AGPL-3',
+    'depends': [
+        'base',
+        'product',
+        'sale',
+        ],
+    'data': [
+        'views/product.xml',
+    ],
+
+    'installable': True,
+}

+ 2 - 0
models/__init__.py

@@ -0,0 +1,2 @@
+# -*- encoding: utf-8 -*-
+import product

BIN
models/__init__.pyc


+ 8 - 0
models/product.py

@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+from openerp import models, fields, api
+
+class Product(models.Model):
+    _inherit = 'product.template'
+
+    # comisiones
+    comision_vendedor = fields.Float(string="Comisión Vendedor %")

BIN
static/description/icon.png


+ 19 - 0
views/product.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <record model="ir.ui.view" id="commission_product_template">
+      <field name="name">commission_product_template</field>
+      <field name="model">product.template</field>
+      <field name="inherit_id" ref="product.product_template_form_view"/>
+      <field name="arch" type="xml">
+        <xpath expr="//page[@string='Sales']" position="inside">
+          <group name="comisiones" string="Comisiones">
+            <field name="comision_vendedor"/>
+          </group>
+        </xpath>
+
+
+     </field>
+    </record>
+  </data>
+</openerp>