Ver Fonte

commit tipo_cobro_fielda

sebas há 8 anos atrás
commit
bb6e29bb36
7 ficheiros alterados com 121 adições e 0 exclusões
  1. 23 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 35 0
      __openerp__.py
  4. BIN
      static/description/icon.png
  5. 34 0
      tipo_cobro_fields.py
  6. BIN
      tipo_cobro_fields.pyc
  7. 29 0
      tipo_cobro_fields_view.xml

+ 23 - 0
__init__.py

@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    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/>.
+#
+##############################################################################
+
+import tipo_cobro_fields
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
__init__.pyc


+ 35 - 0
__openerp__.py

@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    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': 'Contratos con vencimiento 1/15',
+    'version': '1.0',
+    'category': 'Tools',
+    'description': """This module allows to add type due fields to the partners contract.""",
+    'author': 'Eiru/Sebastian Penayo',
+    'website': '',
+    'depends': ['account_analytic_analysis','analytic'],
+    'data': ['tipo_cobro_fields_view.xml',
+            ],
+    'installable': True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
static/description/icon.png


+ 34 - 0
tipo_cobro_fields.py

@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    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.osv import osv, fields
+
+class tipo_cobro(osv.osv):
+    '''
+    Añadir dia de cobro en contrato.
+    '''
+    _name = 'account.analytic.account'
+    _inherit = 'account.analytic.account'
+    _description = 'Añadir dia de cobro en contrato'
+
+    _columns = {
+        'tipo_cobro':fields.selection([('1','Uno'),('15','Quince')],'Dia de Cobro'),
+    }

BIN
tipo_cobro_fields.pyc


+ 29 - 0
tipo_cobro_fields_view.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+        <record id="view_tipo_cobro_form" model="ir.ui.view">
+            <field name="name">account.analytic.account.inherit</field>
+            <field name="model">account.analytic.account</field>
+            <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
+            <field name="arch" type="xml">
+                <field name="manager_id" position="after">
+                    <field name="tipo_cobro"/>
+                </field>
+            </field>
+        </record>
+
+        <record id="view_tipo_cobro_search1" model="ir.ui.view">
+            <field name="name">account.analytic.account.filter.search1</field>
+            <field name="model">account.analytic.account</field>
+            <field name="inherit_id" ref="account_analytic_analysis.view_account_analytic_account_overdue_search" />
+            <field name="arch" type="xml">
+              <search>
+                  <separator/>
+                    <filter name="tipo_cobro" string="Vence dia 1" domain="[('tipo_cobro','=','1')]"/>
+                    <filter name="tipo_cobro" string="Vence dia 15" domain="[('tipo_cobro','=','15')]"/>
+               </search>
+            </field>
+        </record>
+
+    </data>
+</openerp>