Skip to Content
Menu
This question has been flagged

When we import a statement in Accounting


With developer mode we can see this field:



And without developer mode we cant see this field


I found this field into addons/base_import/static/src/base_import.xml but I didnt see modifier that hides the field normally.


How I can use this field without developer mode? Help please

Avatar
Discard
Author

Update:

Checkbox appearance is affected by javascript described in addons /base_import/static/src/js/import_action.js

$fields.each(function (k,v) {

var filtered_data = self.generate_fields_completion(result, k);

var $thing = $();

var bind = function (d) {};

if (config.isDebug()) {

$thing = $(QWeb.render('ImportView.create_record_option')).insertAfter(v).hide();

bind = function (data) {

switch (data.type) {

case 'many2one': case 'many2many':

$thing.find('input').attr('field', data.id);

$thing.show();

break;

default:

$thing.find('input').attr('field', '').prop('checked', false);

$thing.hide();

}

}

}

I am trying to modify this file, but so far I have been able to influence the appearance of the checkbox in developer mode. Unfortunately, I'm not a javascript professional. I will be looking for a way to display a checkbox without developer mode

Best Answer

Hello Nikita,

remove "if (config.isDebug())"  this if condition and try.. hope it will be give you desired output

Thanks & Regards

Ankit Vaghela

Avatar
Discard
Author

Hello Ankit,

I tried to do like this "if (true)" but it's not working. And when I tried remove this - it's working! Im surprised!

Thank you so much!

Related Posts Replies Views Activity
3
Apr 24
2037
2
Sep 22
3168
1
Jul 21
7077
1
Apr 24
6323
0
May 24
754