Browse Source

Añadir campos extras en compras como referencia de venta.

sebas 3 years ago
commit
23a69d61fe
7 changed files with 68 additions and 0 deletions
  1. 3 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 21 0
      __openerp__.py
  4. 3 0
      models/__init__.py
  5. 25 0
      models/purchase_order.py
  6. BIN
      static/description/icon.png
  7. 16 0
      views/purchase_order_view.xml

+ 3 - 0
__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import models

BIN
__init__.pyc


+ 21 - 0
__openerp__.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+{
+    'name': 'Agregar campos extras en Compra',
+    'summary': 'Añadir campos extras en compras',
+    'category': 'extra',
+    'version': '0.1',
+    'description': """Añadir campos extras en compras como referencia de venta
+    """,
+    'author': 'Eiru Software',
+    'website': 'https://www.eiru.com.py',
+    'depends': [
+        'base',
+        'purchase',
+    ],
+    'data': [
+        'views/purchase_order_view.xml'
+    ],
+    'test': [
+    ],
+    'installable': True,
+}

+ 3 - 0
models/__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import purchase_order

+ 25 - 0
models/purchase_order.py

@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    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/>.      #
+#                                                                               #
+#################################################################################
+
+from openerp import models, fields, api
+
+class purchase_order(models.Model):
+    _inherit = 'purchase.order'
+    _name = 'purchase.order'
+
+    referencia_venta = fields.Char('Referencia venta')

BIN
static/description/icon.png


+ 16 - 0
views/purchase_order_view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+      <record id="purchase_extra_view_order_form" model="ir.ui.view">
+          <field name="name">purchase.order.extra.form</field>
+          <field name="model">purchase.order</field>
+          <field name="inherit_id" ref="purchase.purchase_order_form"/>
+          <field name="arch" type="xml">
+              <field name="partner_id" position="after">
+                  <field name="referencia_venta"/>
+              </field>
+          </field>
+      </record>
+    </data>
+</openerp>