Hi everyone.
I'm trying to put a new button on sales invoice which will print my customized version of invoice. So I've created new addon"my" and now need to connect this button click with function in "my" module. Can you please suggest, how can I refernce function in my model when hitting my new print button. The "print_invoice_my" refers to account.invoice model, while it should refernce to "my" model. Therefore I get an error when trying to run, it says it can not find "print_invoice_my" in account.invoice.Here is my xml:
<openerp>
<data>
<record id="invoice_form_my" model="ir.ui.view">
<field name="name">account.invoice.form.my</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_print" position="after">
<button type="object" name="print_invoice_my" string="my Invoice"/>
</button>
</field>
</record>
</data>
</openerp>
Much thanks, Arcull