コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1324 ビュー

Hello everyone,


in the CRM Module (Odoo 17) i have created a custom field to label the Industry of the leads' company.

However when i include the field in an .xsl $ export i do not just get the industry-label i have entered for the field, but also some code which seems to resemble the field.

--> This code is the same for every lead and industry-label.

e.g.: {'7b6eb78b0e52904b': ['healthcare']}


My goal is to be able to export the field without the code and solely the industry-label.


Any ideas?



Thanks for ur help and kind regards

Paul

アバター
破棄
最善の回答

Hello Paul Brueckel,

If the field is a Many2one relation, when exporting Lead data, make sure to select "Industry of the leads/Name" or "Industry of the leads/Industry Label" in the export popup. This will ensure that only the label appears in the Excel file.

Thanks!

アバター
破棄
著作者

Hi Yatrik,
currently the field type is "keyword" as we use the keyword field in the contacts module for labeling as well.
In the export popup i can therefore only select "characteristic".

By setting up a Many2one field i can't put individual labels as i would like, or am i mistaken?

Kind regards and thanks for your help

Hi Paul Brueckel,

Could you please share a video or screenshot to help me better understand the issue?
I’m a bit confused since Odoo doesn’t support a field type called "keyword," so seeing it in action might clarify things.

Thanks!

著作者

Please see the photo i attached to the message above. Can't share videos yet i think.

著作者

Our system runs in german in case you want to translate something

Hello,

I’ve seen the image, and it looks like you’re trying to export the *Branche* field from the CRM lead, correct?
Could you also share a screenshot of the Excel file to show how it’s currently appearing and how you’d like it to appear?

Thanks!

著作者

Exactly!
I have attached the photo above once again as i can't pin it to the comment.
I want the text within the square brackets to be the only thing exported into the excel.

Here are two methods to extract values inside square brackets:
1. In Odoo:
You can create a computed field either using Odoo Studio or by adding it to a custom module.

key_value = fields.Char(string="Key Value", compute='_compute_key_value')
def _compute_key_value(self):
for record in self:
if record.json_field and 'key_name' in record.json_field:
record.key_value = record.json_field['key_name']

Replace json_field with the technical name of your field.
Replace key_name with the actual key, e.g., '7b6eb78b0e5290b'.

Make sure to set this field as Import-Export Compatible so it can be selected in the export popup.

2. In Excel:
You can use the following formula to extract just the label:

=TEXTAFTER(TEXTBEFORE(A1, "']}"), "{'7b6eb78b0e5290b': ['")

Create a new column and paste this formula.
This will extract the label inside the square brackets.

Thanks!

著作者 最善の回答

Hi Yatrik,
currently the field type is  "keyword" as we use the keyword field in the contacts module for labeling as well.
In the export popup i can therefore only select "characteristic".


By setting up a Many2one field i can't put individual labels as i would like, or am i mistaken?

Kind regards and thanks for your help


アバター
破棄
関連投稿 返信 ビュー 活動
2
12月 23
17258
0
3月 15
3848
2
5月 24
2967
2
8月 25
459
1
7月 25
1750