[FIX] account_voucher: fixed view that have an onchange function returning a field which is not in the view

bzr revid: qdp-launchpad@openerp.com-20121004171245-xvvqlqomkd1pcqvw
This commit is contained in:
Quentin (OpenERP) 2012-10-04 19:12:45 +02:00
parent 5dacf35d16
commit df78f29db7
3 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,7 @@
-
Demo for Account Voucher
-
!record {model: account.voucher, id: account_voucher_voucheraxelor0again}:
!record {model: account.voucher, id: account_voucher_voucheraxelor0again, view: view_sale_receipt_form}:
account_id: account.cash
company_id: base.main_company
journal_id: account.bank_journal

View File

@ -1,7 +1,7 @@
-
Creating a Voucher Receipt for partner Seagate with amount 30000.0
-
!record {model: account.voucher, id: account_voucher_seagate_0}:
!record {model: account.voucher, id: account_voucher_seagate_0, view: view_sale_receipt_form}:
account_id: account.a_recv
amount: 30000.0
company_id: base.main_company

View File

@ -95,10 +95,12 @@
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<!-- TODO: onchange_partner_id() should not returns [pre_line,line_dr_ids] for type sale, and not [pre_line,line_cr_ids] for type purchase -->
<!-- TODO: onchange_partner_id() should not returns [line_ids, pre_line, line_dr_ids...] for type sale, and not [line_ids, pre_line, line_cr_ids,...] for type purchase -->
<!-- in the meanwhile, bellow lines must be there because the fields must be present in the view if the onchange returns a value for them-->
<field name="line_dr_ids" invisible="1"/>
<field name="pre_line" invisible="1"/>
<field name="line_ids" invisible="1"/>
<field name="payment_rate" invisible="1"/>
<field name="line_dr_ids" invisible="1"/>
<group>
<field name="narration" placeholder="Internal Notes" nolabel="1"/>
<group class="oe_subtotal_footer oe_right">
@ -253,10 +255,12 @@
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<!-- TODO: onchange_partner_id() should not returns [pre_line,line_dr_ids] for type sale, and not [pre_line,line_cr_ids] for type purchase -->
<!-- TODO: onchange_partner_id() should not returns [line_ids, pre_line, line_dr_ids...] for type sale, and not [line_ids, pre_line, line_cr_ids,...] for type purchase -->
<!-- in the meanwhile, bellow lines must be there because the fields must be present in the view if the onchange returns a value for them-->
<field name="line_cr_ids" invisible="1"/>
<field name="pre_line" invisible="1"/>
<field name="line_ids" invisible="1"/>
<field name="payment_rate" invisible="1"/>
<field name="line_cr_ids" invisible="1"/>
<group>
<field name="narration" placeholder="Internal Notes" nolabel="1"/>
<group class="oe_subtotal_footer oe_right">