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"/>
<separator string="Payments" colspan="4"/>
<field name="voucher_payment_ids" nolabel="1">
<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"/>
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.
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
|Asked: 8/27/14, 12:18 PM|
|Seen: 1046 times|
|Last updated: 3/16/15, 8:10 AM|