[FIX] account_voucher: unreconcile with deleted journal items

Inspired from e2d16ea

When cancelling a voucher from a customer payment receipt,
the voucher lines linked to the deleted account move lines
have to be updated by clicking on button "unreconcile".

opw:683258
This commit is contained in:
Goffin Simon 2016-08-16 11:45:44 +02:00
parent 6cb84a1048
commit 3846d35d02
1 changed files with 4 additions and 2 deletions

View File

@ -454,10 +454,11 @@
<label for="line_cr_ids" invisible="context.get('line_type', False)"/>
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="state" invisible="1"/>
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
attrs="{'required': [('state', 'in', [False, 'draft'])]}"
groups="account.group_account_user"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
@ -471,10 +472,11 @@
<label for="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
<field name="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Credits" editable="bottom" colors="gray:amount==0">
<field name="state" invisible="1"/>
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"/>
attrs="{'required': [('state', 'in', [False, 'draft'])]}"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>