Hi buddies:
I have a TransientModel class (credit.card.reconciliation.wz) with a field defined like this:
'voucher_payment_ids': fields.one2many('voucher.payment', 'wizard_id', 'Payments', readonly=True),
In my view file I have the following fields (among others):
...
<field name="period_id" domain="[('fiscalyear_id', '=', fiscal_year)]" />
<button name="action_execute_reconciled" icon="gtk-execute" type="object" string="Reconciled"/>
<button name="action_execute_not_reconciled" icon="gtk-execute" type="object" string="Not Reconciled"/>
</group>
<separator string="Payments" colspan="4"/>
<group>
<field name="voucher_payment_ids" nolabel="1">
<tree>
<field name="date" string="Date"/>
<field name="amount" string="Amount" widget="currency"/>
<field name="commission" string="Comission"/>
<field name="bank_id" string="Bank"/>
<field name="date_rc" string="Date RC"/>
</tree>
</field>
</group>
...
I wanna load data in the tree (field voucher_payment_ids) when <button name="action_execute_reconciled" ...> is clicked. I need the current form to stay open, and show data in the tree view for users to select (checkboxes) the records they want to submit later.
The records I want to load (to show in tree view field) will be retrieved using a domain, according to values of another fields in my view.
So, how to load/show data in current form, in that one2many field?
I am using OpenERP 7.
Cheers.