Commits

Andres Vargas  committed 79b6112

adding method pay

  • Participants
  • Parent commits 4307395

Comments (0)

Files changed (3)

File configuration.pyc

Binary file removed.
+# encoding: utf-8
+
+from trytond.model import ModelSQL, ModelView, fields
 from trytond.report import Report
 from trytond.pool import Pool
 from trytond.transaction import Transaction
         return toWord(number)
 
 InvoiceReport()
+
+CHEQUE = u'Cheque'
+DEBITO = u'Tarjeta de Débito'
+CREDITO = u'Tarjeta de Crédito'
+TRANS = u'Transferenca Bancaria'
+EFE = u'Efectivo'
+DEP = u'Deposito Bancario'
+
+OPTIONS = [
+    (CHEQUE,CHEQUE),
+    (DEBITO,DEBITO),
+    (CREDITO, CREDITO),
+    (TRANS,TRANS),
+    (EFE, EFE),
+    (DEP,DEP),
+]
+
+
+class InvoiceInvoice(ModelSQL, ModelView):
+    _name="account.invoice"
+
+    method_pay = fields.Selection(OPTIONS,"Method Pay")
+
+InvoiceInvoice()
             <field name="model">account.invoice,-1</field>
             <field name="action" ref="report_ati"/>
         </record>
+
+        <record model='ir.ui.view' id="id_invoice_view_form">
+            <field name="model">account.invoice</field>
+            <field name="inherit" ref="account_invoice.invoice_view_form" />
+            <field name="arch" type="xml">
+                <![CDATA[
+                    <data>
+                        <xpath expr="/form/notebook/page/field[@name=&quot;payment_term&quot;]" position='after'>
+                        <label name="method_pay"/>
+                        <field name="method_pay"/>
+                    </xpath> 
+                    </data>
+                ]]>
+            </field>
+            
+        </record>
+
     </data>
 </tryton>