Odoo Help

0

0
4 Answers
1
Avatar

Aswani P C

--Aswani P C--

7407
| 3 1 4
Calicut, India
--Aswani P C--
Aswani P C
6/13/19, 5:15 AM

Hi,

This is happening due to the 'section_and_note_one2many'  and 'section_and_note_text' widgets. In the code they are displaying section and notes in the place of field 'name'.

You can achieve this by extend  SectionAndNoteListRenderer with following code:

_renderBodyCell: function (record, node, index, options) {
var $cell = this._super.apply(this, arguments);
if (node.attrs.name === "name" && record.model === 'sale.order.line'){
return $cell.addClass('o_hidden');
}
return $cell;
},
_getNumberOfCols: function () {
var n = this._super();
if(this.state.model === 'sale.order.line'){
n--;
}
return n;
},
_renderHeaderCell: function (node) {
if (node.attrs.name === "name" && this.state.model === 'sale.order.line'){
return;
}
else{
var $th = this._super.apply(this, arguments);
return $th;
}
}

 Thanks

1
GiusyG
6/12/19, 11:00 AM

Hi, 

the right code is:

 <xpath  expr="//page[@name=''order_lines]//tree/field[@name='name']" position="attributes">   

   <attribute name="invisible">1</attribute>  

<xpath>


Ask a Question
Writer
Tag
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now