You need to use a Wizard:
Wizards describe interactive sessions with the user (or dialog boxes) through dynamic forms
Use this for your test_wizard.xml file:
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="wizard_form_view">
<field name="name">wizard.form</field>
<field name="model">your_module.wizard</field>
<field name="arch" type="xml">
<form string="Lorem Ipsum">
<group>
<field name="input_field"/>
</group>
<footer>
<button name="button_accept" type="object"
string="Accept" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window id="action_wizard"
name="Title of the wizard"
res_model="your_module.wizard"
view_mode="form"
target="new"
key2="client_action_multi"/>
</data>
</openerp>
and this for your test_wizard.py file:
class Wizard(models.TransientModel):
_name = 'your_module.wizard'
input_field = fields.Char(string="Your Input Field", required=True)
@api.multi
def button_accept(self):
for record in self:
auxiliar = record.input_field
print 'You have entered this input:' auxiliar
return {}
For more official information, take a look HERE