Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4020 Vizualizări

can I change the format of an invoice? can I do it by changing the coding?

Imagine profil
Abandonează

Which type of changes you want do ?

Autor

I need to add and remove some fields and change the headings.

Cel mai bun răspuns

Hi,

Add this code in py file in your new module to add new field.

 class account_invoice(osv.osv):

    _inherit = "account.invoice"

    _columns = {

            'test_name' : fields.char('Test name', size='120'),

  }
account_invoice()

Add in xml file in new module to add new field.

    <record id="inherit_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_supplier_form"/>
        <field name="arch" type="xml">
            <field name="account_id" position="after">
                <field name="test_name"/>
            </field>
        </field>
     </record>

Try this

Thanks

Imagine profil
Abandonează
Autor

Thanks jack :)