Browse Source

commit inicial

Rodney Elpidio Enciso Arias 6 years ago
commit
f6ebd4afe5
8 changed files with 53 additions and 0 deletions
  1. 2 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 26 0
      __openerp__.py
  4. 2 0
      models/__init__.py
  5. BIN
      models/__init__.pyc
  6. 7 0
      models/category.py
  7. BIN
      models/category.pyc
  8. 16 0
      views/category_view.xml

+ 2 - 0
__init__.py

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

BIN
__init__.pyc


+ 26 - 0
__openerp__.py

@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+
+{
+    'name': 'category Expense',
+    'version': '8.1',
+    'category': 'Product',
+    'sequence': 14,
+    'summary': '',
+    'description': """
+Tipificar la categoria
+    """,
+    'author':  'eiru',
+    'license': 'AGPL-3',
+    'images': [
+    ],
+    'depends': [
+        'sale',
+    ],
+    'data': [
+        'views/category_view.xml',
+    ],
+    'installable': True,
+    'auto_install': False,
+    'application': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 2 - 0
models/__init__.py

@@ -0,0 +1,2 @@
+# -*- encoding: utf-8 -*-
+from . import category

BIN
models/__init__.pyc


+ 7 - 0
models/category.py

@@ -0,0 +1,7 @@
+# -*- encoding: utf-8 -*-
+from openerp import fields, models, api, _
+
+class ProductCategory(models.Model):
+    _inherit = 'product.category'
+
+    expense = fields.Boolean('Expense?')

BIN
models/category.pyc


+ 16 - 0
views/category_view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+
+	<record model="ir.ui.view" id="product_category_form">
+		<field name="name">product.category.form</field>
+		<field name="model">product.category</field>
+		<field name="inherit_id" ref="product.product_category_form_view"/>
+		<field name="arch" type="xml">
+			<field name="parent_id" position="before">
+				<field name="expense" string="¿Es una categoria de gasto?"/>
+			</field>
+		</field>
+	</record>
+</data>
+</openerp>