콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

I am adding some monetary amounts to the Stock.Picking / Stock.Move reports.

I get the following error:

  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 1001, in _format
    precision = int(round(math.log10(display.rounding)))
QWebException: 'int' object has no attribute 'rounding'
While trying:

 <span class="text-right" t-esc="move.order_price" t-esc-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;1&quot;}"/>


move.order_price has been added to the model and it is basically sale order line's price_subtotal; while move is the iteration over stock moves in the qweb report

Note that as I am not in invoice or sale order I lack currency_id and therefore I am hardcoding "1" Euro to the report.


class StockMove(models.Model):
    _inherit = 'stock.move'
    order_price = fields.Float(string="Purchase subtotal", related='purchase_line_id.price_subtotal')

 


Any help is really welcomed,

아바타
취소
관련 게시물 답글 화면 활동
1
2월 16
9959
3
2월 16
5964
1
2월 16
4023
Invoice Stock Move 해결 완료
1
9월 23
3939
4
5월 23
11155