Rodney Enciso Arias 7 anni fa
commit
0af74f5eaa
7 ha cambiato i file con 87 aggiunte e 0 eliminazioni
  1. 6 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 51 0
      __openerp__.py
  4. 12 0
      attachment.py
  5. BIN
      attachment.pyc
  6. BIN
      res_store.pyc
  7. 18 0
      views/attachment_view.xml

+ 6 - 0
__init__.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+# For copyright and license notices, see __openerp__.py file in module root
+# directory
+##############################################################################
+from . import attachment

BIN
__init__.pyc


+ 51 - 0
__openerp__.py

@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2015  ADHOC SA  (http://www.adhoc.com.ar)
+#    All Rights Reserved.
+#
+#    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/>.
+#
+##############################################################################
+{
+    'name': 'Invoice Attachment',
+    'version': '8.0.1.0.0',
+    'category': '',
+    'sequence': 14,
+    'summary': '',
+    'description': """
+Crea una relacion tipo One2many entre el modelo account.invoice y el ir.attachment.
+===================================================================================
+
+    """,
+    'author':  'Eiru Software / Rodney Enciso Arias.',
+    'website': 'www.eiru.com.py',
+    'license': 'AGPL-3',
+    'images': [
+    ],
+    'depends': [
+        'account',
+    ],
+    'data': [
+        'views/attachment_view.xml',
+    ],
+    'demo': [
+    ],
+    'test': [
+    ],
+    'installable': True,
+    'auto_install': False,
+    'application': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 12 - 0
attachment.py

@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+# For copyright and license notices, see __openerp__.py file in module root
+# directory
+##############################################################################
+from openerp import models, fields
+
+
+class AccountInvoice(models.Model):
+    _inherit = 'account.invoice'
+
+    attachment_ids = fields.One2many('ir.attachment', 'res_id', 'Attachment')

BIN
attachment.pyc


BIN
res_store.pyc


+ 18 - 0
views/attachment_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+        <!-- <record id="account_invoice_form_view" model="ir.ui.view">
+            <field name="name">account.invoice.form</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//notebook/page[@string='Other Info']" position="after">
+                    <page string="Adjuntos" groups="base.group_user">
+                        <separator colspan="4" string="Archivos Adjuntos"/>
+                        <field colspan="4" name="attachment_ids" nolabel="1" context="{'form_view_ref':'base.view_attachment_form'}"/>
+                    </page>
+                </xpath>
+            </field>
+        </record> -->
+    </data>
+</openerp>