[IMP] l10n_us: improved code to set default recivable and payble accounts.
authorTurkesh Patel (Open ERP) <tpa@tinyerp.com>
Mon, 2 Sep 2013 11:29:43 +0000 (16:59 +0530)
committerTurkesh Patel (Open ERP) <tpa@tinyerp.com>
Mon, 2 Sep 2013 11:29:43 +0000 (16:59 +0530)
bzr revid: tpa@tinyerp.com-20130902112943-cj3jbtn1bt5n15y2

addons/account/account.py
addons/l10n_us/account_chart_template_after.xml

index c298a15..45308a9 100644 (file)
@@ -3030,6 +3030,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
     }
 
     def onchange_company_id(self, cr, uid, ids, company_id, context=None):
+        if context is None:context = {}
         if context.get('default_currency_id', False):
             dummy, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', context.get('default_currency_id'))
             return {'value': {'currency_id': view_id}}
index 5ca3a16..4dea930 100644 (file)
@@ -6,6 +6,8 @@
             <field name="account_root_id" ref="coa_basic"/>
             <field name="bank_account_view_id" ref="cash_expenditure"/>
             <field name="tax_code_root_id" ref="tax_code_chart_root"/>
+            <field name="property_account_receivable" ref="account_receivable"/>
+            <field name="property_account_payable" ref="account_payable"/>
         </record>
         <record id="account_chart_template_advertising" model="account.chart.template">
             <field name="bank_account_view_id" ref="cash_expenditure"/>