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

Can we create a module which depends on the other and does not contain any field and only has a function which is called by its only button in a view?

아바타
취소
베스트 답변

Yes evaon, Yes you can create module without fields.

아바타
취소
작성자

I have a module that depends on account and inherit from invoice.py so i wish to work on the invoice with the use of a button in this new module. I tried creating it but my view points to process transition view. please check

Are you getting any error? if yes then past your error here.

작성자

no there is no error but what my view should be it is not like that. I have only a button on my view and when i click on the menu of my module process transition view appears. I don't understand why or probably the module without columns is not possible!

please post your code over here.

작성자

class demo(osv.osv): _name = 'demo' # _inherit = 'account.invoice'

def test_fun(self, cr, uid, ids,context):
    res = {}
    amount = 100
    raise orm.except_orm(_('Fees amount'), str(amount))
    return True

demo()

베스트 답변

Yes you can do it. Maybe something in your code is wrong. Could you please post here your py and xml code? It's going to be helpful to see where is the error. I made that many times and it never failed

아바타
취소
작성자

Yes i did it! there was a mistake in my xml thanks.

관련 게시물 답글 화면 활동
3
12월 23
20074
0
12월 24
1404
2
7월 25
4376
1
10월 23
3616
2
9월 22
8588