This question has been flagged
5 Replies
12034 Views

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)


Avatar
Discard
Best Answer


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 │    │                                 │
│ └────┴───┘    │                                 │
├───────┬───────┼────────────────┬────────────────┤
│       │       │                │                │
  


Avatar
Discard
Best Answer

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.


Avatar
Discard
Best Answer

I can't apply these edits to my site

Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

Hello 

please update your package odoo Error solved :) 

Avatar
Discard