Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

how to create multiple fields in a existing module???

By
R.sridevi
on 11/25/13, 10:20 AM 956 views

I want to create extra fields in acounting-> customer invoice.....i want to create two fields below fiscal positon field and three fields below Amount field....plese some body help me

0
Muthumani
On 11/27/13, 8:07 AM
        hi sri,

        .py file

            _inherit = 'account.invoice'
            _columns = {
                    'test1':fields.char('Test1', size=64),
                    'test2':fields.char('Test2', size=64),
                    }


            _inherit = 'account.invoice.line'
            _columns = {
                    'line1':fields.char('Line1', size=64),
                    'line2':fields.char('Line2', size=64),
                    'line3':fields.char('Line3', size=64),
                }
       ****** XML file
<xpath expr="//form/sheet/group/group//field[@name='fiscal_position']" position="after">
             <field name="test1"/>
             <field name="test2"/>
</xpath>
<xpath expr="//form/sheet/notebook/page//field/tree//field[@name='price_subtotal']" position="before">
              <field name="line1"/>
              <field name="line2"/>
              <field name="line3"/>
</xpath>

this code is work perfectly use it

Muthumani
on 11/27/13, 8:11 AM

wow thankyou very much

R.sridevi
on 11/28/13, 6:14 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 11/25/13, 10:20 AM
Seen: 956 times
Last updated: 3/16/15, 8:10 AM