콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3199 화면

How to concatenate single cell values ? (all version)

아바타
취소
작성자 베스트 답변

Importing variants, tags, etc.often requires to format the structured file before importing it. Unfortunately, Odoo only allows values separated by commas. So it could be painful to reformat the file with the aim to concatenate each value in a single cell.

The solution is the "M2M Concatenator" tool available by creating this following Gspreadsheet : 


Under the Script menu, you will find two modes of concatenation handled by GScript.

Single ID Mode

This mode works if your file contains one ID per group of lines, for example :

IDValue
1A

B
2X

Y

Z

Using this mode will generate the following table :

IDValueConcatenation
1AA,B

B
2XX,Y,Z

Y

Z

Duplicated ID Mode

This mode works if your file contains one ID per line even if multiple lines are related to the same ID, for example :

IDValue
1A
1B
2X
2Y
2

Z

Using this mode will generate the following table :

IDValueConcatenation
1AA,B
1B
2XX,Y,Z
2Y
2Z
Instructions to use
1. Make a copy of the sheet in your own Google Drive.
2. The GSheet has to contain at least the following columns : id & value.
3. Depending on the structure of your file, run the right concatenation mode described above.
4. The script will create the column "Concatenation" with the concatenated values.
5. Note that the concatenation automatically removes the duplicated values and this system is not case sensitive. It means that if, for the same ID, the column "Value" contains "Red" and "red", the "Concatenation" column will only contain "Red".
6. Save the GSheet as Excel or CSV.
7. Remove the lines without concatenation by sorting on it.
8. Import your file in Odoo.

아바타
취소
베스트 답변

Can you provide us the Google Spreadsheet link of this useful M2M Concatenator?

아바타
취소
관련 게시물 답글 화면 활동
6
8월 24
4678
1
9월 15
6282
2
12월 24
7326
2
12월 23
1765
1
11월 23
1265