openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #27277
[Bug 1280308] [NEW] [7.0] moves can have tax amount NULL -> _sum in account.tax.code crashes
Public bug reported:
Observed in v7.0.
The field tax_amount of the move_line can be NULL (as opposed to 0.0).
If you have all moves with a certain tax code with a tax_amount = NULL,
and then open the form view of the tax code from the web interface, it
crashes because it is trying to round a NULL.
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/lpistone/w/oe/server/openerp/osv/orm.py", line 3622, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/lpistone/w/oe/server/openerp/osv/orm.py", line 3743, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/home/lpistone/w/oe/server/openerp/osv/fields.py", line 1142, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/home/lpistone/w/oe/addons/account/account.py", line 1852, in _sum_year
where=where, where_params=where_params)
File "/home/lpistone/w/oe/addons/account/account.py", line 1829, in _sum
res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account'))
TypeError: a float is required
Thanks!
** Affects: openobject-addons
Importance: Undecided
Status: New
** Summary changed:
- moves can have tax amount NULL -> _sum in account.tax.code crashes
+ [7.0] moves can have tax amount NULL -> _sum in account.tax.code crashes
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1280308
Title:
[7.0] moves can have tax amount NULL -> _sum in account.tax.code
crashes
Status in OpenERP Addons (modules):
New
Bug description:
Observed in v7.0.
The field tax_amount of the move_line can be NULL (as opposed to 0.0).
If you have all moves with a certain tax code with a tax_amount =
NULL, and then open the form view of the tax code from the web
interface, it crashes because it is trying to round a NULL.
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 132, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 199, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/lpistone/w/oe/server/openerp/osv/osv.py", line 187, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/lpistone/w/oe/server/openerp/osv/orm.py", line 3622, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/lpistone/w/oe/server/openerp/osv/orm.py", line 3743, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/home/lpistone/w/oe/server/openerp/osv/fields.py", line 1142, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/home/lpistone/w/oe/addons/account/account.py", line 1852, in _sum_year
where=where, where_params=where_params)
File "/home/lpistone/w/oe/addons/account/account.py", line 1829, in _sum
res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account'))
TypeError: a float is required
Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1280308/+subscriptions
Follow ups
References