<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Preformattato HTML Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PreformattatoHTMLCarattere
        {mso-style-name:"Preformattato HTML Carattere";
        mso-style-priority:99;
        mso-style-link:"Preformattato HTML";
        font-family:"Courier New";
        mso-fareast-language:IT;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=IT link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial",sans-serif'>Buongiorno,<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial",sans-serif'>mi trovo in questa situazione in cui dovrei calcolare la percentuale dello sconto/montante (‘<span style='background:yellow;mso-highlight:yellow'>sale_sale</span>’ e ‘<span style='background:yellow;mso-highlight:yellow'>sale_montante</span>’) sull’ammontare non tassato (‘<span style='background:lime;mso-highlight:lime'>amount_untaxed</span>’).<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial",sans-serif'>Queste sono le mie righe di codice:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:blue'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:blue'>def</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> <b>_sumqty_all</b>(<i>self</i>, cr, uid, ids, field_name, arg, context=</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>None</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>):</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        cur_obj = <i>self</i>.pool.get(</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'res.currency'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        res = {}</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>for</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> order </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>in</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> <i>self</i>.browse(cr, uid, ids, context=context):</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            res[order.id] = {</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B;background:lime;mso-highlight:lime'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: </span><span style='font-size:10.0pt;font-family:Consolas;color:maroon'>0.0</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_tax'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: </span><span style='font-size:10.0pt;font-family:Consolas;color:maroon'>0.0</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_total'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: </span><span style='font-size:10.0pt;font-family:Consolas;color:maroon'>0.0</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B;background:yellow;mso-highlight:yellow'>'sale_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: sale_order.sale_sale,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B;background:yellow;mso-highlight:yellow'>'sale_montante'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: sale_order.sale_montante,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'sale_override'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: sale_order.sale_override,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'percentage_for_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>: </span><span style='font-size:10.0pt;font-family:Consolas;color:maroon'>0.01</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>,</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            }</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            val = val1 = </span><span style='font-size:10.0pt;font-family:Consolas;color:maroon'>0.0</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            cur = order.pricelist_id.currency_id</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>for</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> line </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>in</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> order.order_line:</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] += line.price_subtotal</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                val += <i>self</i>._amount_line_tax(cr, uid, line, context=context)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'sale_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]:</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                val1 = res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] - (res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] * (res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B;background:yellow;mso-highlight:yellow'>'sale_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] * res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'percentage_for_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]))    </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>elif</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'sale_montante'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]:</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                val1 = res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] + (res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] * (res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B;background:yellow;mso-highlight:yellow'>'sale_montante'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] * res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'percentage_for_sale'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]))</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>elif</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'sale_override'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]:</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                val1 = res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'sale_override'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>                </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_tax'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] = cur_obj.round(cr, uid, cur, val)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] = cur_obj.round(cr, uid, cur, val1)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>            res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_total'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] = res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_untaxed'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>] + res[order.id][</span><i><span style='font-size:10.0pt;font-family:Consolas;color:#C9802B'>'amount_tax'</span></i><span style='font-size:10.0pt;font-family:Consolas;color:black'>]</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>print</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>(val1)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas;color:silver'>#print("stasmp")        </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'>        </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>return</span><span style='font-size:10.0pt;font-family:Consolas;color:black'> res<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>Nella compilazione mi torna il seguente problema:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>Traceback (most recent call last):<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 530, in _handle_exception<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return super(JsonRequest, self)._handle_exception(exception)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 567, in dispatch<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    result = self._call_function(**self.params)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 303, in _call_function<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return checked_call(self.db, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\service\model.py", line 113, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return f(dbname, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 300, in checked_call<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return self.endpoint(*a, **kw)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 796, in __call__<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return self.method(*args, **kw)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 396, in response_wrap<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    response = f(*args, **kw)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\addons\web\controllers\main.py", line 949, in call_kw<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return self._call_kw(model, method, args, kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\addons\web\controllers\main.py", line 932, in _call_kw<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    records = getattr(request.session.model(model), method)(*args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\http.py", line 900, in proxy<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    result = meth(cr, request.uid, *args, **kw)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\api.py", line 241, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return old_api(self, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\models.py", line 5130, in search_read<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    result = self.read(cr, uid, record_ids, fields, context=read_ctx)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\api.py", line 241, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return old_api(self, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\models.py", line 3128, in read<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    result = BaseModel.read(records, fields, load=load)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\api.py", line 239, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return new_api(self, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\models.py", line 3163, in read<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    self._read_from_database(stored, inherited)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\api.py", line 239, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return new_api(self, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\models.py", line 3328, in _read_from_database<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    res2 = self._columns[fs[0]].get(cr, self._model, ids, fs, user, context=context, values=result)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\osv\fields.py", line 1365, in get<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\aurema_HEAD\odoo\openerp\addons\na_aurema_project\models\sale.py", line 44, in _sumqty_all_wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return self._sumqty_all(cr, uid, ids, field_name, arg, context=context)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\odoo\openerp\api.py", line 241, in wrapper<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    return old_api(self, *args, **kwargs)<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>  File "C:\nexapp\source\Svil\aurema_HEAD\odoo\openerp\addons\na_aurema_project\models\sale.py", line 66, in _sumqty_all<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>    val1 = res[order.id]['amount_untaxed'] - (res[order.id]['amount_untaxed'] * (res[order.id]['sale_sale'] * res[order.id]['percentage_for_sale']))<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;line-height:13.95pt;background:white;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:IT'>TypeError: unsupported operand type(s) for *: 'Float' and 'float'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>Presumo che il primo tipo di variabile sia una variabile built-in float, mentre la seconda una float normale.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>Come posso eseguire operazioni tra una variabile built-in Float e una variabile primitiva float?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>Grazie in anticipo, buon lavoro.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>Cristian<o:p></o:p></span></p></div></body></html>