This question has been flagged
2 Replies
4190 Views

I try Confirming a Production Order, and what I get is this error, I have searched a thousand ways to solve even formated my computer and still the problem:



Client Traceback (most recent call last):
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ http.py", line 204, in dispatch
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ controllers \ main.py", line 1139, in exec_workflow
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ session.py", line 147, in exec_workflow
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ session.py", line 30, in proxy_method
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ session.py", line 103, in send


Server Traceback (most recent call last):
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ web \ session.py", line 89, in send
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ netsvc.py.", Line 296, in dispatch_rpc
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ service \ web_services.py.", Line 626, in dispatch
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ osv \ osv.py.", Line 132, in wrapper
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ osv \ osv.py.", Line 222, in exec_workflow
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ osv \ osv.py.", Line 215, in exec_workflow_cr
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ osv \ orm.py.", Line 4002, in _workflow_signal
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ wkf_service.py.", Line 119, in trg_validate
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ instance.py.", Line 43, in validate
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ workitem.py.", Line 60, in process
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ workitem.py.", Line 157, in _split_test
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ wkf_expr.py.", Line 80, in check
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ workflow \ wkf_expr.py.", Line 57, in _eval_expr
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ tools \ safe_eval.py.", Line 285, in safe_eval
   File "", line 1, in <module>
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ \ openerp \ osv \ orm.py.", Line 377, in function_proxy
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ mrp \ mrp.py", line 886, in test_if_product
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ mrp \ mrp.py", line 640, in _action_compute_lines
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ product \ product.py", line 171, in _compute_qty
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ product \ product.py", line 183, in _compute_qty_obj
   File "C: \ Program Files \ OpenERP 7.0-20140525-231206 \ Server \ server \ openerp \ addons \ product \ _common.py", line 32, in ceiling
TypeError: float_round () got an unexpected keyword argument 'rounding_method'


PLEASE HELP!

Avatar
Discard
Best Answer

Dear , 

I got approxim    tly a same error when recieving goods when adding a first purchase order .

Can you advice.

OpenERP Server Error


Client Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\http.py", line 204, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\controllers\main.py", line 1132, in call_button
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\session.py", line 42, in proxy
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\session.py", line 30, in proxy_method
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\session.py", line 103, in send


Server Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\web\session.py", line 89, in send
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\netsvc.py", line 292, in dispatch_rpc
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\service\web_services.py", line 626, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\osv\osv.py", line 188, in execute_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\osv\osv.py", line 131, in wrapper
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\osv\osv.py", line 197, in execute
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\.\openerp\osv\osv.py", line 185, in execute_cr
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\stock\wizard\stock_partial_picking.py", line 193, in do_partial
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\product\product.py", line 171, in _compute_qty
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\product\product.py", line 183, in _compute_qty_obj
  File "C:\Program Files (x86)\OpenERP 7.0-20130831-231117\Server\server\openerp\addons\product\_common.py", line 32, in ceiling
TypeError: float_round() got an unexpected keyword argument 'rounding_method
Avatar
Discard
Best Answer

Try to check the following:

1./ Go to openerp -> tools -> float_utils.py
2./ Under it you will find the function float_round.
3./ Check the arguments/parameters of it.

Here I think the parameter 'rounding_method' is may be missing !!. If it is missing, then you may be facing this error.

I am posting the function with 'rounding_method' parameter here if it helps you.

def float_round(value, precision_digits=None, precision_rounding=None, rounding_method='HALF-UP'):
    """Return ``value`` rounded to ``precision_digits`` decimal digits,
       minimizing IEEE-754 floating point representation errors, and applying
       the tie-breaking rule selected with ``rounding_method``, by default
       HALF-UP (away from zero).
       Precision must be given by ``precision_digits`` or ``precision_rounding``,
       not both!

       :param float value: the value to round
       :param int precision_digits: number of fractional digits to round to.
       :param float precision_rounding: decimal number representing the minimum
           non-zero value at the desired precision (for example, 0.01 for a
           2-digit precision).
       :param rounding_method: the rounding method used: 'HALF-UP' or 'UP', the first
           one rounding up to the closest number with the rule that number>=0.5 is
           rounded up to 1, and the latest one always rounding up.
       :return: rounded float
    """
    rounding_factor = _float_check_precision(precision_digits=precision_digits,
                                             precision_rounding=precision_rounding)
    if rounding_factor == 0 or value == 0: return 0.0

    # NORMALIZE - ROUND - DENORMALIZE
    # In order to easily support rounding to arbitrary 'steps' (e.g. coin values),
    # we normalize the value before rounding it as an integer, and de-normalize
    # after rounding: e.g. float_round(1.3, precision_rounding=.5) == 1.5

    # TIE-BREAKING: HALF-UP (for normal rounding)
    # We want to apply HALF-UP tie-breaking rules, i.e. 0.5 rounds away from 0.
    # Due to IEE754 float/double representation limits, the approximation of the
    # real value may be slightly below the tie limit, resulting in an error of
    # 1 unit in the last place (ulp) after rounding.
    # For example 2.675 == 2.6749999999999998.
    # To correct this, we add a very small epsilon value, scaled to the
    # the order of magnitude of the value, to tip the tie-break in the right
    # direction.
    # Credit: discussion with OpenERP community members on bug 882036

    normalized_value = value / rounding_factor # normalize
    epsilon_magnitude = math.log(abs(normalized_value), 2)
    epsilon = 2**(epsilon_magnitude-53)
    if rounding_method == 'HALF-UP':
        normalized_value += cmp(normalized_value,0) * epsilon
        rounded_value = round(normalized_value) # round to integer

    # TIE-BREAKING: UP (for ceiling operations)
    # When rounding the value up, we instead subtract the epsilon value
    # as the the approximation of the real value may be slightly *above* the
    # tie limit, this would result in incorrectly rounding up to the next number
    # The math.ceil operation is applied on the absolute value in order to
    # round "away from zero" and not "towards infinity", then the sign is
    # restored.

    elif rounding_method == 'UP':
        sign = cmp(normalized_value, 0)
        normalized_value -= sign*epsilon
        rounded_value = math.ceil(abs(normalized_value))*sign # ceil to integer

    result = rounded_value * rounding_factor # de-normalize
    return result

Even you can download the latest source code which may solve your issue.

Hope this helps !!

Avatar
Discard