Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4860 Widoki

I noticed I cannot export product categories while exporting account.invoice records. I dig into the code a bit and found this:

<div t-name="Export.TreeItems"

t-foreach="fields" t-as="field"

t-att-data-id="field.id"

class="o_export_tree_item"

tabindex="-1"> <!-- tabindex make the div focusable -->

<span t-if="field.children &amp;&amp; (field.id).split('/').length != 3"

class="o_expand_parent fa fa-plus"/>

<span class="o_tree_column"><t t-esc="field.string"/></span>

</div>

I removed this condition that check how many text block there is after splitting with "/" character, which is how many levels:

&amp;&amp; (field.id).split('/').length != 3

But still, it doesn't show any + signs after 3 levels :(

I suspect in the code something that would set field.children to false when getting to level 3, I don't know.

My next question will be how to make a module that change this. I want to allow drilling to 5 levels.


Awatar
Odrzuć
Najlepsza odpowiedź

in function get_fields on module web you can change iflen(id.split('/')) < 3 and'relation'infield: this part

Awatar
Odrzuć
Najlepsza odpowiedź

Hi, I wrote a module that solves this problem. I used your research. Thanks
https://github.com/xpheragroup/Keralty/tree/export_3level/export_deep_edit

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
1569
3
lut 25
14768
1
kwi 25
2029
Export Import Rozwiązane
1
kwi 25
1871
0
paź 23
1318