Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2842 Lượt xem

I have this but when I update my module it appends the same tuple

class account_journal_inherit(osv.osv):
 
    _inherit='account.journal'

    def __init__(self, pool, cr):
            
            _type=super(account_journal_inherit, self)._columns['type'].selection
            _type.append(('credit_payment', 'Prepaid Credit'))
            
            return super(account_journal_inherit, self).__init__(pool,cr)

 

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Could you elobrate more...

or you trying to say you want your own set of typle values for selection field "type" ?

If So then Override it... Re-define type under columns in your custom module.. that one can override its original values.. or extend it too...

Ảnh đại diện
Huỷ bỏ