[FIX] account: journal_id should be readonly when there is already invoice internal number

Closes #5162, #5167
This commit is contained in:
Laetitia Gangloff
2015-03-01 03:23:01 +01:00
committed by Antony Lesuisse
parent 323233dd02
commit eda2736e4c
+6 -2
View File
@@ -181,8 +181,10 @@
<field name="date_due"/>
<field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
name="account_id" groups="account.group_account_user"/>
<field name="internal_number" invisible="1"/>
<field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
on_change="onchange_journal_id(journal_id, context)" widget="selection"
attrs="{'readonly':[('internal_number','!=',False)]}"/>
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="check_total" groups="account.group_supplier_inv_check_total"/>
</group>
@@ -327,8 +329,10 @@
</group>
<group>
<field name="date_invoice"/>
<field name="internal_number" invisible="1"/>
<field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
on_change="onchange_journal_id(journal_id, context)" widget="selection"
attrs="{'readonly':[('internal_number','!=',False)]}"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/>