Odoo - Import Product Description of Other Language - odoo

On Odoo 12 instance, we have two languages configured - English and Arabic. Now, I want to import the product descriptions - for English and Arabic. What is the best suitable way for doing this? Can someone please suggest.
Many Thanks

For translatable fields, the value you update on an XLS or CSV import depends on the language the user has selected when the import is done.
So the way to do it is:
Select language X on your user settings
Import the X language descriptions for your products
Repeat the above steps for every language.

Related

OpenRefine: after reconciliation, I want to retrieve the title of Wikidata items in other languages

In the same way I can obtain geographic coordinates for, let's say a list of cities, I'd like to create columns in OpenRefine with the names of those cities in different languages (Venice, Venezia, Wenecja, Wenedig…). Is it possible? Apparently there is no property like that in Wikidata.
Wikidata screenshot
You can fetch those using special property codes in OpenRefine. To fetch the label in a given language, find out the language code for it, and then prepend L to it. For instance, Lit will give you the label in Italian.
You can also do Dfr (French description) or Ade (German aliases).
This is documented at https://wikidata.reconci.link/

Underscore and dash in column names after JSON import

I've been using OpenRefine very successfully for a couple of years, working solely with CSV (and TSV) source files. Recently I had some tables from an sql database that I wanted to bring into OpenRefine so I exported them (from SQL) as JSON and then used OpenRefine's JSON import feature. It works beautifully except that the column names all begin with _ - . For example, my JSON records start with
{"ID":"97247",
and OpenRefine made the first column name _ - ID instead of just ID (which I'd prefer - I know I can edit them later, but I have hundreds of fields). I can't see any settings in the parsing page that might help this. Does anyone know if there is a way to import without the extra characters (or if there's an explanation for the underscore dash)? I'm considering submitting a feature request but I thought I'd check to see what other users may know.
This is a known issue.
There has also been a proposal to switch to a standard representation for JSON paths.
Feel free to comment on either tickets to indicate which solution you would prefer.

Postgres: Is there a way to target specific tables based on your data?

I'm new to SQL and I'm currently thinking about an effective way to build out my database. It's a language learning application and I'm torn between two approaches:
Keeping all of my words, regardless of their language, in one giant words table
Splitting my words into separate tables based on their language, ie: words_french, words_italian, etc.
In the second scenario, are there approaches that I can use (perhaps within Postgres) that would allow me target the words_french table in the event that I'm currently working through french lessons / content and need to lookup associated french words?
I feel like there would be some sort of concat process like so: words_${language} and as of this moment I'd figure i'd have to resolve this within JS or something else on the frontend.
-- also, is breaking words and other content into their respective table_language even a valid approach?
Any ideas?
Use Option 1. Option 2 would be horribly difficult to work with.
Word table:
WordId
Word
Language
1
a
English
2
un
French
As Dimitar Spasovski suggests, if you have a need for additional attributes associated with the language, you should also have a Language table. Then replace the Language column in the Word with LanguageId to make the relationship.
Watching or reading some data modeling or data architecture classes online will help.

SOLR indexing SQL data per language /multi language

I know that there are similar questions about SOLR, some give insights but not a solution for exaclty what I am trying to do.
I would like to create one core having multi language data.
For exemple it is possible to have field like description_fr, description_en. I would like to send description fr when the request whant the data in french and do not send the description_en.
Some of my questions :
How do I define the data to be indexed
How do I tell the application to request the search against the English or French version of the fields ?
Thanks a lot
I would recommend a talk from a friend of mine at the latest Berlin Buzzwords [1]
This could be interesting to you for the future.
Sticking to your current question I would proceed identifying the language of the query ( which is an hard task as the query is usually composed by few terms).
Then, depending on the language I would sent to Solr a request to return only 1 stored field for the content.
e.g.
In the index I have :
description_it, description_en
q = "prodotto scalare"
Language Identified : it
Request : http://localhost:8983/solr/select?q=prodotto scalare&fl=description_it
You just need a library to detect the language[2] and a mapping between the language ISO code and your solr fields.
You can build this at API time or directly in Solr as a plugin.
[1] https://berlinbuzzwords.de/sites/berlinbuzzwords.de/files/media/documents/embracing_diversity_searching_over_multiple_languages.pdf
[2]
A couple of popular examples :
Tika - https://www.programcreek.com/java-api-examples/index.php?api=org.apache.tika.language.LanguageIdentifier
Google - https://github.com/shuyo/language-detection

Lucene/Solr Searching problem?

I have a problem that i want to search in the specific locations in the indexed text, let we have a lucene document that contains text as
<Cover>
This document contains following items
1. Business overview.
2. Risk Factors.
3. Management
</Cover>
<BusinessOverview>
our business is xyz
</BusinessOverview>
<RiskFactors>
we have xyz risk factors
</RiskFactors>
<Management>
we have xyz type of management
</Mangement>
now in above code html tags(could be any thing) divide main document in sections now i want to have a functionality if user give some text to search and does not mention any specific section the text should be searched in whole document but user if user specify some section along with text to search, the search should be done only in that particular section. I want to know is this type of search is possible with solr/lucene.
Regards
Ahsan
You can use the <copyField> option to have a "field of fields"
se here:
http://wiki.apache.org/solr/FAQ#How_do_I_use_copyField_with_wildcards.3F
http://www.ibm.com/developerworks/java/library/j-solr1/
Your schema should reflect that need ; the data sent to the indexer would have then to match this schema properly. Once done, you'll be able to query against scpcific fields.
You could also use an xml importer.
I have never worked with solr but lucene itself has very flexible query language, see this link. So answer is yes it is possible.