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

hello any help please

I use odoo 12, when generating payslip lots an error message is displayed:

Uncaught TypeError: Cannot read property 'colspan' of undefined
http://localhost:8069/web/content/685-931e013/web.assets_backend.js:1623
Retraçage :
TypeError: Cannot read property 'colspan' of undefined
    at http://localhost:8069/web/content/685-931e013/web.assets_backend.js:1623:34
    at Function._.each._.forEach (http://localhost:8069/web/content/662-3020b2c/web.assets_common.js:12:558)
    at Class._renderInnerGroup (http://localhost:8069/web/content/685-931e013/web.assets_backend.js:1622:63)
    at Class._renderTagGroup (http://localhost:8069/web/content/685-931e013/web.assets_backend.js:1636:228)
    at Class._renderNode [as _super] (http://localhost:8069/web/content/685-931e013/web.assets_backend.js:1628:246)
    at Class._renderNode (http://localhost:8069/web/content/685-931e013/web.assets_backend.js:3265:50)
    at Class.<anonymous> (http://localhost:8069/web/content/662-3020b2c/web.assets_common.js:3540:371)
    at Class._renderNode (http://localhost:8069/web/content/685-931e013/web.assets_backend.js:3389:57)
    at Class._renderNode (http://localhost:8069/web/content/662-3020b2c/web.assets_common.js:3540:371)
    at Function._.map._.collect (http://localhost:8069/web/content/662-3020b2c/web.assets_common.js:13:270)


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


Every form view container (form itself, group, page, I think there are more) in OpenERP consists of 4 columns to start with.

<form>
┌───┬───┬───┬───┐
│ 1 │ 2 │ 3 │ 4 │
└───┴───┴───┴───┘
</form> 

Every <field> takes 2 columns: label & input field

<field name="input" />
<field name="inpt2" />
┌───────┬───────┬───────┬───────┐
│ label │ input │ labl2 │ inpt2 │
└───────┴───────┴───────┴───────┘ 

With colspan, you can widen items.

<field name="inpt4" colspan="4"/>
<field name="input" />
<field name="inpt2" />
┌───────┬───────────────────────┐
│ labl4 │ inpt4_______________  │
├───────┼───────┬───────┬───────┤
│ label │ input │ labl2 │ inpt2 │
└───────┴───────┴───────┴───────┘

<field name="input" />
<field name="inpt4" colspan="4"/>
<field name="inpt2" />

┌───────┬───────┬───────┬───────┐
│ label │ input │       │       │
├───────┼───────┴───────┴───────┤
│ labl4 │ inpt4_______________  │
├───────┼───────┬───────┬───────┤
│ labl2 │ inpt2 │       │       │
└───────┴───────┴───────┴───────┘ 

When you add additional containers, like a page, you can tell OpenERP to use more or less columns.

<group col="2" colspan="2">
    <field name="a" />
    <field name="b" />
</group>
<group col="6" colspan="2">
    <field name="d" />
    <field name="e" />
    <field name="f" />
</group>
│       │       │                │                │
├───────┴───────┼────────────────┴────────────────┤
│ ┌────┬───┐    │  ┌────┬───┬────┬───┬────┬───┐   │
│ │ lb │ a │    │  │ lb │ d │ lb │ e │ lb │ f │   │
│ ├────┼───┤    │  └────┴───┴────┴───┴────┴───┘   │
│ │ lb │ b │    │                                 │
│ └────┴───┘    │                                 │
├───────┬───────┼────────────────┬────────────────┤
│       │       │                │                │
  


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

Mostly this issue comes because of the wrong tag closing in XML files.

Example ; 

< field name ="discountP" attrs ="{'readonly':[('name','!=','New')]}" />/>


// here you can see I use />/> and also editor does not give you any warning on this.


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

I can't apply these edits to my site

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

Please i have the same problem. Can you help me to resolve this error please.

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

Hello 

please update your package odoo Error solved :) 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
2008
0
thg 10 16
5183
1
thg 9 23
4009
0
thg 5 20
2378
0
thg 8 19
4452