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

How can I put subtotal result into untaxed result when I changed the item fields?

For example I add a item (100$), subtotal is 100$, so the untaxed amount it will be 100$

and if I change the quantity for two items the amounts change to 200$.

아바타
취소
베스트 답변

Does it not already do so? Or do you mean literally after every change on the object? If so, you might want to consider calling the "update" button from your on_change methods.

아바타
취소
작성자

yes its that! I only have to call it like self.button_dummy(self, cr, uid, ids) ?

Should be enough yes. Give it a try.

베스트 답변

You can also try this one...

In Order object: write an onchange which takes "order_lines" as parameter... and also in xml view, specify the onchange on the "order_lines" [o2m field]

So now in the onchange method, you can evaluate the lines,

by using orm method "resolve_o2m_commands_to_record_dicts" , which will help you to retrive the values of One2many lines in either case (i.e, saved or unsaved records)

Even I had the same requirement, and this works just perfect....

 

아바타
취소