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

i want to create a user using my custom module, for i am inheriting res.users and res.partners in my custom module but nothing happens it gives me error

Here is the code


class tact_customer(osv.osv):

_name = 'tact.customer'

_inherit =['res.partner','res.users']

_columns = {

'longitude': fields.char('Longitude',size=40,required=True, help='longitude'),

'latitude': fields.char('Latitude',size=40,required=True, help='latitude'),

}

customer()

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

Sorry but your class name is tact_customer so what is the customer() in the end?

Câu trả lời hay nhất

hello

you have to use many2one field like,

'user' : fields.many2one('res.partner','User'),

 and also make xml file for that field

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
6301
2
thg 7 25
874
2
thg 2 23
6398
0
thg 3 21
2639
2
thg 6 20
10133