Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-909014-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #909014 in OpenERP Addons: "[trunk]Not Create Account form Account 
Templates"
  https://bugs.launchpad.net/openobject-addons/+bug/909014

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-909014-mdi/+merge/86999

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/909014 
"Not Create Account form Account Templates".

Thanks and Regards,

Divyesh Makwana(MDI)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-909014-mdi/+merge/86999
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-909014-mdi.
=== modified file 'account/account.py'
--- account/account.py	2011-12-23 08:31:08 +0000
+++ account/account.py	2011-12-28 09:51:33 +0000
@@ -2443,7 +2443,7 @@
     _columns = {
         'name': fields.char('Name', size=256, required=True, select=True),
         'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
-        'code': fields.char('Code', size=64, select=1),
+        'code': fields.char('Code', size=64, required=True, select=1),
         'type': fields.selection([
             ('receivable','Receivable'),
             ('payable','Payable'),
@@ -2592,7 +2592,7 @@
         acc_obj = self.pool.get('account.account')
         tmpl_obj = self.pool.get('account.account.template')
         data = self.read(cr, uid, ids)
-        company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0]
+        company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']][0][0], ['company_id'])['company_id'][0]
         account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids'])
         vals = {
             'name': account_template.name,
@@ -2603,7 +2603,7 @@
             'reconcile': account_template.reconcile,
             'shortcut': account_template.shortcut,
             'note': account_template.note,
-            'parent_id': data[0]['cparent_id'],
+            'parent_id': data[0]['cparent_id'][0],
             'company_id': company_id,
             }
         acc_obj.create(cr, uid, vals)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to