Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How To Add Extra Fields in account module in openerp

    • 0
    • 3
    • 2
    • 0
    • 1
    • 0
    • 0
    • 0
    • 374
    Comment on it

    To Add Extra Fields in account module in openerp use below code
    In OpenERP Add Extra fields in account module to create new module name is invoice_cartage and add these 4 file.

    1- __init__.py file ---
    
      import invoice_crtage
    

    2- __openerp__.py file ---

    {
    "name" : "Account Invoice Inherit",
    "version" : "1.1",
    "author" : "SACHIN SINGH",
    "category" : "Generic Modules/Account",
    "website" : "http://www.openerp.com",
    "description": "Module to inherit sales order view.",
    "depends" : ["account"],
    "init_xml" : [],
    "update_xml" : ["invoice_order_form_inherit_view.xml"],
    "active": False,
    "installable": True
    }
    

    3- invoice_cartage.py file --

    from osv import fields, osv
    class invoice_order_test(osv.osv):
        _name='account.invoice'
        _inherit='account.invoice'
        _columns={
                 'cartage':fields.float('Cartage',readonly=False),
             'previous_balance':fields.boolean('Show Balance', help="Show User balance on bill"),
    
                }
    

    4- invoice_order_form_inherit_view.xml.xml file --

    <!--?xml version="1.0" encoding="UTF-8"?-->
    <openerp>
    <data>
        <record id="invoice_form" model="ir.ui.view">
        <field name="name">account.invoice.form.inherit</field>
        <field name="model">account.invoice</field>
        <field name="inherit_id" ref="account.invoice_form">
        <field name="arch" type="xml">
        <data>
              <field name="fiscal_position" position="after">
                  <field name="cartage">
                  <field name="previous_balance">
             </field>
             </field></field></data>
             </field>
          </field></record>
      </data>
    </openerp>
    

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: