summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaetitia Gangloff <laetitia.gangloff@acsone.eu>2015-02-09 11:05:48 +0100
committerAntony Lesuisse <al@openerp.com>2015-03-01 03:23:01 +0100
commiteda2736e4c251e05ab50eb1db9c2cd9889088f30 (patch)
treeb52f02957f38422043281f49ea69ae95a139c7ad
parent323233dd028b9db3e28faca65a89ec569738145b (diff)
[FIX] account: journal_id should be readonly when there is already invoice internal number
Closes #5162, #5167
-rw-r--r--addons/account/account_invoice_view.xml8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index f353877dd21..1106bd532d9 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -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"/>