python - AttributeError: 'float' object has no attribute 'get' -


here error

2013-03-13 10:31:50,358 11345 error openerp_db openerp.osv.osv: uncaught exception traceback (most recent call last):   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 131, in wrapper     return f(self, dbname, *args, **kwargs)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 197, in execute     res = self.execute_cr(cr, uid, obj, method, *args, **kw)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 185, in execute_cr     return getattr(object, method)(cr, uid, *args, **kw)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/orm.py", line 4479, in create     self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/orm.py", line 4627, in _store_set_values     result = self._columns[f].get(cr, self, ids, f, superuser_id, context=context)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/fields.py", line 1137, in     elif result.get(id): attributeerror: 'float' object has no attribute 'get' 2013-03-13 10:31:50,363 11345 error openerp_db openerp.netsvc: 'float' object has no attribute 'get' traceback (most recent call last):   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/netsvc.py", line 293, in dispatch_rpc     result = exportservice.getservice(service_name).dispatch(method, params)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/service/web_services.py", line 618, in dispatch     res = fn(db, uid, *params)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 188, in execute_kw     return self.execute(db, uid, obj, method, *args, **kw or {})   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 131, in wrapper     return f(self, dbname, *args, **kwargs)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 197, in execute     res = self.execute_cr(cr, uid, obj, method, *args, **kw)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/osv.py", line 185, in execute_cr     return getattr(object, method)(cr, uid, *args, **kw)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/orm.py", line 4479, in create     self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/orm.py", line 4627, in _store_set_values     result = self._columns[f].get(cr, self, ids, f, superuser_id, context=context)   file "/home/priyan/software/openerp-7.0-20130309-002120/openerp/osv/fields.py", line 1137, in     elif result.get(id): attributeerror: 'float' object has no attribute 'get' 2013-03-13 10:31:50,369 11345 info openerp_db werkzeug: 127.0.0.1 - - [13/mar/2013 10:31:50] "post /web/dataset/call_kw http/1.1" 200 - 

and here module source code

class namelistupdate(osv.osv):      def _invoiced_rate(self, cr, uid, ids, name, args, context):         amount_untaxed = 1         if amount_untaxed == 0:             res = 100.0         else:             res = 50.0         print (res)         return res      _name = "checkroll.namelist.update"     _description = "this table keeping name list updates"     _columns = {                 'date': fields.date("date"),         'value': fields.function(_invoiced_rate, method=true, type='float', string='test', store=true),     }  namelistupdate() 

i checked in backend table also.they correctly created , fileds correctly manipulated.please check , inform me whats issue

here shows view.xml file

    <record model="ir.ui.view" id="namelist_update_form">         <field name="name">name list update</field>         <field name="model">checkroll.namelist.update</field>         <field name="type">form</field>         <field name="arch" type="xml">             <form string="namelist_update">                 <field name="date" />                 <field name="value" />             </form>         </field>     </record>      <record model="ir.ui.view" id="namelist_update_list">         <field name="name">name list update</field>         <field name="model">checkroll.namelist.update</field>         <field name="type">tree</field>         <field name="arch" type="xml">             <tree string="namelist_update">                 <field name="value" />             </tree>         </field>     </record>      <record model="ir.actions.act_window" id="action_namelist_update">         <field name="name">name list update</field>         <field name="res_model">checkroll.namelist.update</field>         <field name="view_type">form</field>         <field name="view_mode">tree,form</field>     </record> 

would please check function code. it's not openerp function code.

can check question link: how add function in openerp 7?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -