[IMP] when we unselect allow multi currency, values of Gain Exchange Rate Account and Loss Exchange Rate Account will become false.
bzr revid: jar@tinyerp.com-20140421053456-zc7x5mvy4rk34al8
This commit is contained in:
parent
0c38696de3
commit
fcc4d29240
|
@ -259,6 +259,11 @@ class account_config_settings(osv.osv_memory):
|
|||
def onchange_tax_rate(self, cr, uid, ids, rate, context=None):
|
||||
return {'value': {'purchase_tax_rate': rate or False}}
|
||||
|
||||
def onchange_multi_currency(self, cr, uid, ids, group_multi_currency, context=None):
|
||||
if not group_multi_currency:
|
||||
return {'value': {'income_currency_exchange_account_id': False, 'expense_currency_exchange_account_id': False}}
|
||||
return {}
|
||||
|
||||
def onchange_start_date(self, cr, uid, id, start_date):
|
||||
if start_date:
|
||||
start_date = datetime.datetime.strptime(start_date, "%Y-%m-%d")
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<label for="id" string="Features"/>
|
||||
<div>
|
||||
<div name="group_multi_currency">
|
||||
<field name="group_multi_currency" class="oe_inline"/>
|
||||
<field name="group_multi_currency" class="oe_inline" on_change="onchange_multi_currency(group_multi_currency)"/>
|
||||
<label for="group_multi_currency"/>
|
||||
</div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue