فهرست منبع

Agregar al formulario ventas campos extras como validez de oferta y plazo de entrega

sebas 3 سال پیش
کامیت
c26e3c15be
7فایلهای تغییر یافته به همراه71 افزوده شده و 0 حذف شده
  1. 3 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 21 0
      __openerp__.py
  4. 4 0
      models/__init__.py
  5. 26 0
      models/sale_order.py
  6. BIN
      static/description/icon.png
  7. 17 0
      views/sale_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': 'Eiru ventas extras',
+    'summary': 'Añadir campos extras en ventas',
+    'category': 'extra',
+    'version': '0.1',
+    'description': """Añadir campos extras en ventas como plazo de entrega y validez de oferta
+    """,
+    'author': 'Eiru Software',
+    'website': 'https://www.eiru.com.py',
+    'depends': [
+        'base',
+        'sale',
+    ],
+    'data': [
+        'views/sale_order_view.xml'
+    ],
+    'test': [
+    ],
+    'installable': True,
+}

+ 4 - 0
models/__init__.py

@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+
+from . import sale_order
+

+ 26 - 0
models/sale_order.py

@@ -0,0 +1,26 @@
+# -*- 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 sale_order(models.Model):
+    _inherit = 'sale.order'
+    _name = 'sale.order'
+
+    plazoentrega = fields.Char('Plazo de entrega')
+    validez = fields.Char('Validez de oferta')

BIN
static/description/icon.png


+ 17 - 0
views/sale_order_view.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+      <record id="sale_extra_view_order_form" model="ir.ui.view">
+          <field name="name">sale.order.extra.form</field>
+          <field name="model">sale.order</field>
+          <field name="inherit_id" ref="sale.view_order_form"/>
+          <field name="arch" type="xml">
+              <field name="partner_id" position="after">
+                  <field name="plazoentrega"/>
+                  <field name="validez"/>
+              </field>
+          </field>
+      </record>
+    </data>
+</openerp>