Kaynağa Gözat

Agrega campo como cobrador y estado en account invoice

sebas 4 yıl önce
işleme
d9091a8c73

+ 12 - 0
__init__.py

@@ -0,0 +1,12 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#                                                                               #
+#    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/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product Brand is an Openobject module wich enable Brand management for products #
+###################################################################################
+from . import account_invoice

BIN
__init__.pyc


+ 35 - 0
__openerp__.py

@@ -0,0 +1,35 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#
+#                                                                               #
+#    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/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product features is an Openobject module wich enable features management for products #
+###################################################################################
+{
+    'name': 'Cobrador (hr) extra en account invoice',
+    'version': '0.1',
+    'category': 'Product',
+    'description': """
+Cobrador (hr) extra en account invoice
+========================================
+
+Cobrador (hr) extra en account invoice y estado si está la factura con él
+
+    """,
+    'author': 'Eiru/Sebastian Penayo',
+    'website': 'http://www.eiru.com',
+    'depends': ['base','account'],
+    'data': [
+        'account_invoice_view.xml'
+    ],
+    'installable': True,
+}

+ 34 - 0
account_invoice.py

@@ -0,0 +1,34 @@
+# -*- 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 account_invoice(models.Model):
+    _inherit = 'account.invoice'
+    _name = 'account.invoice'
+
+    factconcobrador = fields.Boolean('Factura con cobrador')
+    employee_id = fields.Many2one(
+        comodel_name='hr.employee',
+        string='Cobrador'
+    )
+
+
+    _defaults = {
+        'factconcobrador': False
+    }

BIN
account_invoice.pyc


+ 17 - 0
account_invoice_view.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+        <record id="account_invoice_cobrador" model="ir.ui.view">
+            <field name="name">account.invoice.cobrador</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form" />
+            <field name="arch" type="xml">
+                <field name="account_id" position="after">
+                        <field name="employee_id"/>
+                        <field name="factconcobrador"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

BIN
static/description/icon.png