Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I build a custom odoo module where in the models form view you can click on a page in a notebook and a js canvas will visualize your data. this is what it looks like (I reduced it to the essential parts):

...

notebook

page string="plan"

    canvas

    script (this script draws on the canvas)

page


...

Now, within that script which is just directly embedded in the form (and not part of a js module with src/js/... and so on) how is it possible that I can get data from the model that the form is part of?


example: 

the model is called "rtm.hall". it has properties like name, height, width and so on..

within the at the top mentioned script I need exactly these values in javascript like for example

model.width = 10 and model.height = 20 and so on


thank you very much for helping me, this is extremely important

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 21
3117
1
thg 7 16
11219
1
thg 5 25
8045
1
thg 12 24
4495
1
thg 11 24
4682