[IMP] account.config.settings: improve onchange_company_id

bzr revid: rco@openerp.com-20120328094706-a2ilxmxfy3nz5fms
This commit is contained in:
Raphael Collet
2012-03-28 11:47:06 +02:00
parent 2b08d2f074
commit 19c87beefe
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -226,6 +226,12 @@ class account_configuration(osv.osv_memory):
'paypal_account': company.paypal_account,
'company_footer': company.rml_footer2,
}
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
values.update({
journal_type + '_journal_id': False,
journal_type + '_sequence_prefix': False,
journal_type + '_sequence_next': False,
})
journal_obj = self.pool.get('account.journal')
journal_ids = journal_obj.search(cr, uid, [('company_id', '=', company_id)])
for journal in journal_obj.browse(cr, uid, journal_ids):
+2 -1
View File
@@ -26,7 +26,8 @@
<button name="configure_fiscalyear" string="Configure Fiscalyear" icon="gtk-execute" type="object"/>
</group>
</group>
<field name="company_id" widget="selection" readonly="1" on_change="onchange_company_id(company_id)" attrs="{'invisible': [('has_default_company', '=', True)]} " />
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<separator string="Accounting Configuration" colspan="4"/>
<group col="4" colspan="4">
<field name ="complete_tax_set" invisible="1"/>